Hi,

> On 20 May 2015, at 07:05, Gregor Kovač <[email protected]> wrote:
> 
> Hi!
> 
> I'm using PDFBOX 2.0 (updated subversion today) and this code to print:
> 
> private static void printWithPDFBox2(File pdfFile, int copies) {
>        PDDocument document = null;
> 
>        try {
>            document = PDDocument.load(pdfFile);
> 
>            PrinterJob printJob = PrinterJob.getPrinterJob();
>            printJob.setJobName(pdfFile.getName());
>            
> printJob.setPrintService(PrintServiceLookup.lookupDefaultPrintService());
> 
>            printJob.setCopies(copies);
>            HashPrintRequestAttributeSet printRequestAttributeSet =
> new HashPrintRequestAttributeSet();
>            printRequestAttributeSet.add(new Copies(copies));
>            printRequestAttributeSet.add(SheetCollate.COLLATED);
>            PDFPrinter printer = new PDFPrinter(document,
> Scaling.ACTUAL_SIZE, Orientation.PORTRAIT);
>            printer.print(printJob, printRequestAttributeSet);
>        } catch (Exception e) {
>            e.printStackTrace();
>        } finally {
>            if (document != null) {
>                try {
>                    document.close();
>                } catch (Exception e) {
>                    e.printStackTrace();
>                }
>            }
>        }
>    }
> 
> Original PDF is located at:
> https://drive.google.com/open?id=0B-qoYfDTAZ8QNkpINC1oZjFvbDg&authuser=0
> What gets printed out is located at:
> https://drive.google.com/open?id=0B-qoYfDTAZ8QdmFlOVg0M2NFam8&authuser=0
> 
> Why this quality degradation (as if fonts are not antialiased)? Even
> setting dpi to 500 doesn't make it better.

The PostScript file which you’ve linked to as the output looks fine. The fonts 
are all vector
outlines. I see no pixilation. I suspect this is an issue with your PostScript 
viewer. Try
zooming in further.

I do see one issue which is that there’s an extra line of text in the PDFBox 
version when
compared with Acrobat, that text is embedded as an image and is the 5th line 
from the
bottom of the page. I’m not sure why that is, but we could open a JIRA issue 
for it.

— John

> Best regards,
>    Kovi
> 
> -- 
> -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
> |  In A World Without Fences Who Needs Gates?  |
> |              Experience Linux.               |
> -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to