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 theserver
option.
Type Aliases:
-
PagesEntry
βDefines the options for generating a single PDF file in aPagesMap
orPagesFunction
. -
PagesFunction
βDefines the pages generated byastro-pdf
using 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-pdf
configuration options
Example
import { defineConfig } from 'astro/config'import pdf from 'astro-pdf'export default defineConfig({ integrations: [pdf({ pages: { '/': 'home.pdf' } })]})