File tree Expand file tree Collapse file tree
pdfbox/src/main/java/org/apache/pdfbox/printing Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -187,20 +187,18 @@ public PageFormat getPageFormat(int pageIndex)
187187 //
188188 // As a workaround, we normalise all Page(s) to be portrait, then flag them as landscape in
189189 // the PageFormat.
190- Paper paper ;
190+ Paper paper = new Paper () ;
191191 boolean isLandscape ;
192192 if (mediaBox .getWidth () > mediaBox .getHeight ())
193193 {
194194 // rotate
195- paper = new Paper ();
196195 paper .setSize (mediaBox .getHeight (), mediaBox .getWidth ());
197196 paper .setImageableArea (cropBox .getLowerLeftY (), cropBox .getLowerLeftX (),
198197 cropBox .getHeight (), cropBox .getWidth ());
199198 isLandscape = true ;
200199 }
201200 else
202201 {
203- paper = new Paper ();
204202 paper .setSize (mediaBox .getWidth (), mediaBox .getHeight ());
205203 paper .setImageableArea (cropBox .getLowerLeftX (), cropBox .getLowerLeftY (),
206204 cropBox .getWidth (), cropBox .getHeight ());
You can’t perform that action at this time.
0 commit comments