pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Александр Свиридов <ooo_satu...@mail.ru>
Subject PdfBox 2.0 scale to A4 while printing document
Date Sun, 28 Jun 2015 14:43:26 GMT
 When I print pdf document it doesn't stretch to take normal A4 page area. I mean that margins
are too big and document is smaller then it could be and is located in center of the page.

My code:
PrinterJob job = PrinterJob.getPrinterJob();
Paper paper=new Paper();
paper.setSize(72d*8.267d, 72d*11.692);
PDFPrinter pDFPrinter=new PDFPrinter(document,Scaling.SCALE_TO_FIT, Orientation.PORTRAIT,paper);

Please help me to solve this problem.

Alex Sviridov
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message