How to generate a Landscape PDF

dbasi
Tera Contributor
I have a requirement with my client to develop a custom PDF, processing data derived from a catalog request. However, I am having trouble setting the PDF to landscape. I've utilised the GeneralFormAPI script includes and there's even a reference to setting landscape. However, it calls the GeneralPDF script includes setting the Landscape variable to null.
find_real_file.png
 
Does anyone know of a method to set the page to Landscape?
9 REPLIES 9

ohh... i will test it out on my earliest availability and let you know if it works in anyway.

Regards,
Muhammad

dbasi
Tera Contributor

Please let me know if you find a different result! 

Pratiksha Kalam
Kilo Sage

hello,

I think You need to pass variable in place of null value,

https://stackoverflow.com/questions/45895439/servicenow-customized-landscape-pdf-files-using-general...

 

 

If answer is helpful mark correct!

Thanks,

Pratiksha

Hello,

I got same requirement try with this,

 

GeneralPDF.Document = function(landscape, meta, body, html, pageSize, headerImage) {


this.landscape = false;


this.setLandscape = function(la)

{
this.landscape = la;
};

 

if (landscape) {

this.setLandscape(landscape);
}

}

If answer is helpful please mark correct!

 

Thanks,

Pratiksha

@Pratiksha Kalamkar I've tested making these changes but it has no affect on the orientation when the PDF is generated.