How to get pdf page number.



  • Hi, now I'm stuck in get PDF page number when I use pdf utils to merge and I want to detect what page is it in the MAIN pdf that call the other one. (chrome-pdf, handlebars)



  • You can't get the page number in the main, because the information about pdf isn't ready before the main pdf rendering finished. What you can do is render the main, parse it, and render it again, but now with the information you collected during the parse.

    See this part of the documentation
    https://jsreport.net/learn/pdf-utils#usage-in-script


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.