Guten Tag Tilman Hausherr, am Mittwoch, 8. November 2017 um 17:26 schrieben Sie:
> This is a known problem sometimes and there's a workaround (use a fixed dpi) > https://issues.apache.org/jira/browse/PDFBOX-3046 Thanks, that was exactly what I was seeing. Printing using the "-dpi" argument with "300" on the shell dropped memory footprint to around 400 MB and processed the job in around 2 seconds. > java -jar "pdfprint.jar" PrintPDF -silentPrint > "C:\[...]\0001-print5B7A1242.pdf" -dpi "300" Is there an easy way I could detect those PDFs before actually printing them to be able to provide "-dpi" only if necessary? Memory footprint without "-dpi 300" where not necessary is better for my test doc with 10 pages, around 225 to 600 MB. Seems to scale by page and my customer sometimes needs to print docs with 50 and more pages. Not that important, though, as most of his users has at least 8 GB of RAM. BTW, it seems that not all supported args by the command line app are documented yet. I only found out because I had a look at the source. https://pdfbox.apache.org/2.0/commandline.html#printpdf https://github.com/apache/pdfbox/blob/trunk/tools/src/main/java/org/apache/pdfbox/tools/PrintPDF.java#L38 BTW 2, it seems to me that the command line app is printing using Scaling.ACTUAL_SIZE while in your bug SHRINK_TO_SIZE is preferred. https://github.com/apache/pdfbox/blob/trunk/tools/src/main/java/org/apache/pdfbox/tools/PrintPDF.java#L162 https://github.com/apache/pdfbox/blob/trunk/pdfbox/src/main/java/org/apache/pdfbox/printing/PDFPageable.java#L165 https://issues.apache.org/jira/browse/PDFBOX-3046?focusedCommentId=14980954&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14980954 > Did you set the option mentioned here? > https://pdfbox.apache.org/2.0/getting-started.html Tried that as well just to be sure, but didn't change a thing. A combination of those and "-dpi" seems to even be a bit slower than "-dpi" alone, something around half a second. So "-dpi" seems to be the proper solution for me as well. Mit freundlichen Grüßen, Thorsten Schöning -- Thorsten Schöning E-Mail: [email protected] AM-SoFT IT-Systeme http://www.AM-SoFT.de/ Telefon...........05151- 9468- 55 Fax...............05151- 9468- 88 Mobil..............0178-8 9468- 04 AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

