New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

astro-pdf

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

astro-pdf

A simple Astro integration to generate PDFs from built pages


Version published
Weekly downloads
131
increased by111.29%
Maintainers
0
Weekly downloads
 
Created

astro-pdf

A simple Astro integration to generate PDFs from built pages.

This package is still under developement and is not stable yet.

Example

// astro.config.mjs
import { defineConfig } from 'astro/config';
import astroPdf from 'astro-pdf'

// https://astro.build/config
export default defineConfig({
    integrations: [
        astroPdf({
            // pages will receive the pathname of each page being built
            pages: path => {
                if (path === 'testing/') {
                    return { // return options for pages to be generated
                        path: 'testing.pdf', // output path
                        pdf: { // puppeteer PDFOptions
                            format: 'A4',
                            printBackground: true
                        }
                    }
                }
            }
        })
    ]
});

FAQs

Package last updated on 25 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts