Hi! I have an issue with converting PDF to image. When the page which I try to convert have any element which is png with only 1px height (28x1, 54x1 etc.) it is scaled down to 0 and I got this error:
Width (26) and height (0) must be non-zero > > java.lang.IllegalArgumentException: Width (26) and height (0) must be > non-zero > at > java.desktop/java.awt.image.ReplicateScaleFilter.<init>(ReplicateScaleFilter.java:102) > at > java.desktop/java.awt.image.AreaAveragingScaleFilter.<init>(AreaAveragingScaleFilter.java:79) > at java.desktop/java.awt.Image.getScaledInstance(Image.java:177) > at org.apache.pdfbox.rendering.PageDrawer.drawImage(PageDrawer.java:1201) > at > org.apache.pdfbox.contentstream.operator.graphics.DrawObject.process(DrawObject.java:74) > at > org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:893) > at > org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:531) > at > org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:506) > at > org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:153) > at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:286) > at > org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:330) > at > org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:247) > at > org.apache.pdfbox.rendering.PDFRenderer.renderImageWithDPI(PDFRenderer.java:219) > > My conversion settings are: 300dpi resolution, 3000x width, 0.7 quality. But I tried with a lot of different options and it had no effect. PDFBox version 3.0.2. Could you help with that? Here is example of problematic PDF: https://drive.google.com/file/d/1zgL4_j_J_w8FXR2MJuav45tHRKowFrNw/view?usp=drive_link Best regards, Patrycja Zaremba