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

pageAdded event not called for first page with autoFirstPage: true #1529

Open
nstdspace opened this issue Jun 23, 2024 · 0 comments
Open

pageAdded event not called for first page with autoFirstPage: true #1529

nstdspace opened this issue Jun 23, 2024 · 0 comments

Comments

@nstdspace
Copy link

Bug Report

See title.

const pdf = new PDFDocument();
pdf.on("pageAdded", () => {
    pdf.text("header");
  });

This code will not add the text "header" on the first page as expected. The first by default auto generated page does not
leed to the event "pageAdded" being invoked, thus the callback does not run.

  • pdfkit version: 0.15.0
  • Node version: v20.11.0
  • Browser version (if applicable): serverless (nuxt)
  • Operating System: Mac OS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant