Custom paper size with chrome-pdf

  • Hi,

    Is there any way to custom paper size with recipe chrome-pdf. I would like to have a PDF which will be 3 inches width by 1 in height.

    I tried to change size directly in the designer => no effects
    I tried to set it in script => no effects
    I tried to add phantam-pdf instead of chrome-pdf because many posts that i read talk this is the tool to customize paper size, but i was not able to get to it.

    I'm using nodejs version 16.14. I put you some pics to see what I'm trying to do.



  • The chrome property "format" has a higher priority than "width" and "height". So you just need to remove the "Letter" string from the "format" property. Like here

  • Thank you for your answer, it helps me a lot. I already tried this solution first but there was an error that says unknown format then I realize it was not caused only by the size because I've copied an existing report and when I change the size of it, it cause the error. (script iterate in pages probably or something like that)

    So I decided to start a new one from scratch with the right dimension and everything is working well right now.


Log in to reply

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