[ 
https://issues.apache.org/jira/browse/PDFBOX-2844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14620223#comment-14620223
 ] 

John Hewson edited comment on PDFBOX-2844 at 7/9/15 9:55 AM:
-------------------------------------------------------------

I didn't introduce print() or standardPrint(), they've been around since the 
pre-Apache days, at least 5 years, if not more. Andreas moved them to 
PDFPrinter as part of the push to move AWT code out of the PD model. I've 
enhanced our Printable and Pageable implementations, but those are standard 
Java stuff. I've also attempted to patch some of the shortcomings of print() 
and silentPrint() but to little avail... they're still inflexible and confusing.

It's the recent activity on the mailing list, with users frequently confused 
about printing and how to customise it that have really convinced me that the 
"one size fits all" wrapper methods of print() and silentPrint() cause more 
problems than they solve.

All of the Orientation / Scaling / paper / dpi in our Pageable and Printable 
implementations, so this will remain - the constructor parameters will just be 
on those classes instead of PDFPrinter.


was (Author: jahewson):
I didn't introduce print() or standardPrint(), they've been around since the 
pre-Apache days, at least 5 years, if not more. Andreas moved the to PDFPrinter 
as part of the push to move AWT code out of the PD model. I've enhanced our 
Printable and Pageable implementations, but those are standard Java stuff. I've 
also attempted to patch some of the shortcomings of print() and silentPrint() 
but to little avail... they're still inflexible and confusing.

It's the recent activity on the mailing list, with users frequently confused 
about printing and how to customise it that have really convinced me that the 
"one size fits all" wrapper methods of print() and silentPrint() cause more 
problems than they solve.

All of the Orientation / Scaling / paper / dpi in our Pageable and Printable 
implementations, so this will remain - the constructor parameters will just be 
on those classes instead of PDFPrinter.

> Printing has bigger margins than expected
> -----------------------------------------
>
>                 Key: PDFBOX-2844
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2844
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 2.0.0
>            Reporter: Tilman Hausherr
>         Attachments: PDFBOX-2844.pdf
>
>
> Printing the attached file from PDFReader brings larger margins than 
> expected, and larger than with Adobe Reader. Doing the same with 1.8 has the 
> expected margins (but bad fonts).
> From Александр Свиридов / Alex Sviridov in the mailing list:
> {quote}
> I printed this pdf file with Adobe Reader in mode 100%. And as expected left 
> and right margins are about 2cm. In comparison when I print using pdfbox left 
> margin is 4.5cm, right about 3.5cm.
> The code I use :
> {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);
> pDFPrinter.silentPrint(job);
> {code}
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org

Reply via email to