Am 16.11.2015 um 15:48 schrieb Sridhar So:
Dear PDFBox team

I used the below code

        PrinterJob job = PrinterJob.getPrinterJob();
         job.setPageable(new PDFPageable(document, Orientation.AUTO, true, 300) 
) ;
        Book book = new Book();
        book.append(new PDFPrintable(document, Scaling.ACTUAL_SIZE, true, 300), 
getPageFormat(receiptType) , document.getNumberOfPages());
        job.setPageable(book);
        PrintRequestAttributeSet attr = new HashPrintRequestAttributeSet();
        job.print(attr);


I was able to get consistenlty performance of around 11 to 20 secs which is 
still slow.  With 0 dpis in both PDFPageable and PDFPrintable ctors result is 
inconsitent and time varies widely from 20 to even 140 secs.

The input PDF file of 100KB, increased to 1MB.

Creating a shareable sample PDF without confidential contents.

Yes please do.


But the problem with 300 dpi is printout resolution/quality is poor and blurred 
and no improvements even with 600 dpi.  In my machine for 600 dpi throws out of 
memory exception. ( Wil JVM -Xm option help?, did not try this )

Yes, try -Xmx1g or whatever.


Can we use 1.8.10?  It has performance but fonts and alignment issue?
What changes have gone to 2.0 compared to 1.8.10?

Many. Probably over 2000.

Is it adviceable to use 1.8.10?  (there also we got about 13 secs consistently 
but has alignment and font issue)



The alignment issue might be solved by using a different Pageable, but not the font issue. The font problems are many in 1.8.*.

13 secs is still too long. That is another reason to have a look at the PDF. Maybe it contains a complex graphic? Anpther thing: From the mail I got, you use Arial Uni. Do you need this because there are non latin glyphs in your PDF, e.g. "ग्लिफ़"? If not, then consider using the standard 14 fonts (helvetica, times, courier, etc)

Tilman

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

Reply via email to