Trying to print out of Servoy Client 3.5. Using the method below, I combine 5 forms in to a PDF document. User can choose to save or print.
My first two forms should print portrait, and the next three landscape. DefaultPageFormat for each form is set as such.
The first landscape page it encounters (page3) always prints as portrait, the the rest of the landscape pages print correctly (page 4 and 5). This is consistent regardless of which page I place first in the order. The first one always prints as portrait, and the rest are fine. Is there a way, other than setting the DefaultPageFormat property to force it to print as landscape?
//Show a save open dialog and retrieve the file
var file = plugins.file.showFileSaveDialog(".pdf");
//to print multiple forms to one pdf document (on file system).
var success = plugins.pdf_output.startMetaPrintJob(file)
if (success)
{
forms.page1.controller.print(true,false,plugins.pdf_output.getPDFPrinter()); //portrait
forms.page2.controller.print(true,false,plugins.pdf_output.getPDFPrinter()); //portrait
forms.page3.controller.print(true,false,plugins.pdf_output.getPDFPrinter()); //landscape
forms.page4.controller.print(true,false,plugins.pdf_output.getPDFPrinter()); //landscape
forms.page5.controller.print(true,false,plugins.pdf_output.getPDFPrinter()); //landscape
}
plugins.pdf_output.endMetaPrintJob()
Forms are simple forms without tabpabels.