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 for
astro-pdf. -
PageOptionsβSpecifies options for generating each PDF.
-
ServerOutputβThe return type of the
serveroption.
Type Aliases:
-
PagesEntryβDefines the options for generating a single PDF file in a
PagesMaporPagesFunction. -
PagesFunctionβDefines the pages generated by
astro-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βs
page.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' } })]})