HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › PD4ML Tips & Tricks › Dynamic change of PDF page orientation › Re: Re: Dynamic change of PDF page orientation
March 15, 2010 at 16:25
#27597
As I wrote before the scale factor is computed this way:
scale = (pageFormat.width – insets.left – insets.right) / htmlWidth
In your case a switch from portrait to landscape means change of pageFormat.width from 595 to 842. You need to correspondingly/proportionally increase htmlWidth parameter.