You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2017/05/03 17:42:04 UTC
[jira] [Comment Edited] (PDFBOX-3776) Printing a PDF with
transparent images causes nothing to print for that page
[ https://issues.apache.org/jira/browse/PDFBOX-3776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15995287#comment-15995287 ]
Tilman Hausherr edited comment on PDFBOX-3776 at 5/3/17 5:41 PM:
-----------------------------------------------------------------
All versions from 2.0.0 upwards can render the second page, but none can print it, if the first page is printed. As a workaround, use the PDFPageable constructor that has a dpi parameter. Use 300 or 600 or whatever you like best for dpi.
Please delete your SO question, I doubt there will be any answers, as this is a bug in PDFBox or in java.
was (Author: tilman):
All versions can render the second page, but none can print it, if the first page is printed. As a workaround, use the PDFPageable constructor that has a dpi parameter. Use 300 or 600 or whatever you like best for dpi.
Please delete your SO question, I doubt there will be any answers, as this is a bug in PDFBox or in java.
> Printing a PDF with transparent images causes nothing to print for that page
> ----------------------------------------------------------------------------
>
> Key: PDFBOX-3776
> URL: https://issues.apache.org/jira/browse/PDFBOX-3776
> Project: PDFBox
> Issue Type: Bug
> Components: Rendering
> Affects Versions: 2.0.5
> Reporter: Jon Ominsky
> Labels: printing
> Attachments: Java Printing Test.pdf, Mytest.pdf
>
>
> I have a PDF with 2 images in it on 2 separate pages. Each page also has some text. When I try to print the PDF, the first page renders fine, but nothing renders for the second page and I get a blank page printed.
> {code}
> String sourcePDF = "C:\\temp\\CPTest\\MyTest.pdf";
> PrinterJob job = PrinterJob.getPrinterJob();
> try (PDDocument document = PDDocument.load(new File(sourcePDF))) {
> job.setPageable(new PDFPageable(document);
> PrintService service = getPrintService("Adobe PDF");
> job.setPrintService(service);
> job.print();
> } catch (IOException | PrinterException e) {
> throw new RuntimeException("Unable to print file " + sourcePDF + ".", e);
> }
> {code}
> I have also tried printing to a physical printer with the same results. Saves me paper by just using the Adobe PDF printer.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org