Hi, Is it possible to print with a custom page size? I wanted to generate a 3inch x 5inch PDF document.
I checked out web-contents.js and it seems it defaults to A4 and only from a set of discrete values.
This PR suggested that it was possible to have custom dimensions.
I was wondering If I just change those lines in a custom build and pass my own set of dimensions will that work?
Was able to find a work around.
It seems if you add this CSS to your page:
@page {
size: 3in 5in;
}
Then the CSS is able to change the page layout and printToPDF
works as expected. Found a test case in Blink using custom page sizes by the above method.
Most helpful comment
Was able to find a work around.
It seems if you add this CSS to your page:
Then the CSS is able to change the page layout and
printToPDF
works as expected. Found a test case in Blink using custom page sizes by the above method.