[
https://issues.apache.org/jira/browse/PDFBOX-2927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14693029#comment-14693029
]
Pei-Tang Huang commented on PDFBOX-2927:
----------------------------------------
I use the same code to print both pages. Depending on the content of
printRequestAttributeSet, I will call either {{printerJob.print()}} or
{{printerJob.print(attributes)}} :
{code:java}
private void print(PrinterJob printJob, boolean silentPrint,
PrintRequestAttributeSet attributes) throws PrinterException {
if (silentPrint) {
if (attributes == null || attributes.isEmpty()) {
printJob.print();
} else {
printJob.print(attributes);
}
} else {
if (attributes == null || attributes.isEmpty()) {
printJob.printDialog();
} else {
printJob.printDialog(attributes);
}
}
}
{code}
And I found if {{printJob.print(attributes);}} was called with whatever
attributes (e.g. copies or pageRanges)... the output from my *HP LasterJet
P2055dn* will have offset on them. But I can not observe that behavior on
*BullZip PDF Printer*...
I will try to run this program on other machines/printers.
> Print with PrintRanges printRequestAttribute causing document to be cropped
> ---------------------------------------------------------------------------
>
> Key: PDFBOX-2927
> URL: https://issues.apache.org/jira/browse/PDFBOX-2927
> Project: PDFBox
> Issue Type: Bug
> Components: Rendering
> Affects Versions: 2.0.0
> Reporter: Pei-Tang Huang
> Assignee: John Hewson
> Fix For: 2.0.0
>
> Attachments: page_ranges_causing_cropping.jpg, sample.pdf
>
>
> When printing with {{PrintRanges}} printRequestAttribute, the printed out
> document will be cropped.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]