Copy link to clipboard
Copied
Hi,
I've been looking at the @adobe/pdfservices-node-sdk documentation but I don't see anything related to getting the current page in the HTML.
Is it possible to get it from there? My idea is to make a custom footer and add the current page number along with other information.
This is not currently possible with the API.
Copy link to clipboard
Copied
It's generally considered that HTML is not divided into pages, but a continuous stream. A conversion of HTML to PDF will be in pages, but that is not a property of the HTML.
Copy link to clipboard
Copied
Hi, thanks for the reply
In the mPDF library, these variables {PAGENO}/{nbpg} can be used in the html, which are transformed into: current page / number of total pages. The includesHeaderFooter method of the adobe api generates something similar in the default footer.
That's why I'm asking if it's possible to get that in a custom footer.
Thank you in advance
Copy link to clipboard
Copied
Ah, so it isn't actually a page number for the HTML (which wouldn't mean anything), it's a dynamic reference to the page number it WILL have in the PDF when converted. I see now. I hope someone has a suggestion for you. {nbpg} is interesting. It's convenient, but requires either a complete dummy run just to get the total page count before starting, or going back over the converted pages to stamp them later on... sometimes nice things come at a big cost.
Copy link to clipboard
Copied
Correct, it's a dynamic reference. Sorry for my english.
There is an includesHeaderFooter method in the api, but it only adds the default adobe footer
So just to confirm, the api doesn't allow you to do that in a custom footer? Like this example
Thank you in advance
Copy link to clipboard
Copied
This is not currently possible with the API.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now