Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow passing options directly to Puppeteer's Page.pdf() function #19

Open
jerboa88 opened this issue Jun 4, 2024 · 0 comments
Open
Labels
feature New feature or request
Milestone

Comments

@jerboa88
Copy link
Owner

jerboa88 commented Jun 4, 2024

Allow options to be passed directly to Puppeteer's Page.pdf() like so:

setDefaultOptions({
  puppeteer: {
    pdf: {
      printBackground: false,
      scale: 1.5, 
      tagged: false,
      // ...
    },
    // ...
  },
  // ...
})

Allowing arbitrary options to be passed will give user's more flexibility in case they need to customize the behavior of Page.pdf() for their use case.

Options important for correct behavior of the plugin like path, width, and height should overwrite user-provided options. printBackground should have a default value of true to ensure similar behavior as Page.screenshot(), but we should allow user's to override this value.

@jerboa88 jerboa88 added this to the v2.0.0 milestone Jun 10, 2024
@jerboa88 jerboa88 added the feature New feature or request label Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant