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

Pagenumbers not working with external documents #241

Open
crsten opened this issue Jan 9, 2021 · 4 comments
Open

Pagenumbers not working with external documents #241

crsten opened this issue Jan 9, 2021 · 4 comments

Comments

@crsten
Copy link

crsten commented Jan 9, 2021

Hi,

I am trying to merge multiple pdfs into one and add pagenumbers after.

See implementation:

let doc = new pdf.Document()
let ext = new pdf.ExternalDocument(src)

doc.addPagesOf(ext)
let footer = doc.footer()
footer.pageNumber((curr, total) => `Page ${curr} / ${total}`)

let result = await doc.asBuffer()

Merging works fine but i cannot se any pagenumbers.

What am I doing wrong?

@Red-Asuka
Copy link

The same problem bothers me.

@rkusa
Copy link
Owner

rkusa commented Mar 9, 2021

Thanks for the report. You aren't doing anything wrong. Page numbers are just not added to external pages right now. They are mostly copy and pasted in your new documented but not modified in any kind.

@vivekkeswaran
Copy link

The problem seems to still exist for us. We recently started using this package and works fine on merging multiple PDFs but doesn't add the footer for page numbers.

@rkusa do we have a workaround or is that something in your roadmap to implement?

@rkusa
Copy link
Owner

rkusa commented Jul 25, 2022

@vivekkeswaran This is not on my roadmap. The only workaround I can think of is to add the external page as an image that spans the whole page. It's quite an ugly workaround and doesn't work well with multiple pages though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants