There can be two workarounds.
-
set
PDF Page Sizeas required from thePrint Settingsdoc. This will be applicable for all print formats. -
You can also pass any options through meta tags in your HTML: Refer to Link
<html>
<head>
<meta name="pdfkit-page-size" content="Legal"/>
<meta name="pdfkit-orientation" content="Landscape"/>
</head>
Hello World!
</html>
N.B: Option One works fine. But did not succeed with Option Two. Only the orientation works in Option Two. frappe overwrites this meta data with the Print Settings attributes called pdf_page_size