astro-pdf
[email protected]This is the documentation for the astro-pdf Astro integration.
For more infomation on how to install and use astro-pdf, refer to the Getting Started guide.
Exports
Interfaces:
-
OptionsβSpecifies options forastro-pdf. -
PageOptionsβSpecifies options for generating each PDF. -
ServerOutputβThe return type of theserveroption.
Type Aliases:
-
PagesEntryβDefines the options for generating a single PDF file in aPagesMaporPagesFunction. -
PagesFunctionβDefines the pages generated byastro-pdfusing a callback, rather than listing all the pages inPagesMap. -
PagesMapβSpecifies the locations of pages to use for generating PDF files. -
PDFOptionsβOptions to pass to Puppeteerβspage.createPDFStream()function.
Signature
export default function (options: Options): AstroIntegration Creates the astro-pdf integration.
Parameters
-
optionsβastro-pdfconfiguration options
Example
import { defineConfig } from 'astro/config'import pdf from 'astro-pdf'export default defineConfig({ integrations: [pdf({ pages: { '/': 'home.pdf' } })]})