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

astro-pdf

Package Overview
Dependencies
Maintainers
0
Versions
20
Alerts
File Explorer

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

  • 0.0.1-beta.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
143
increased by78.75%
Maintainers
0
Weekly downloads
 
Created
Source

astro-pdf

A simple Astro integration to generate PDFs from built pages.

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

Quickstart

Install and add astro-pdf:

npx astro add astro-pdf

and follow the CLI prompts.

Example

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

// https://astro.build/config
export default defineConfig({
    integrations: [
        pdf({
            // 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
                        }
                    }
                }
            }
        })
    ]
});

Keywords

FAQs

Package last updated on 26 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc