PdfBox-Android icon indicating copy to clipboard operation
PdfBox-Android copied to clipboard

Not rendering the PDF to bitmap correctly on one specific file

Open hugolden opened this issue 4 months ago • 1 comments

Describe the bug I am trying to dump the bitmap of an encrypted PDF. And there were error logs:

Unsupported color space kind: COSName{Separation}. Will try DeviceRGB instead Operator SCN has too few operands: [COSFloat{0.839844}]

....

To reproduce

...

val renderer = PDFRenderer(pdDocument)
val buf = renderer.renderImage(index,scale,ImageType.RGB,RenderDestination.VIEW)

PDF example

password: 123456

password.pdf

Expected behavior The page should be rendered correctly as it is on Chrome

Actual behavior The page now is truncated on mobile device.

Image

Environment details:

  • PdfBox-Android version: [e.g. 2.0.27.0]
  • Android API version: [e.g. API 35]

hugolden avatar Aug 25 '25 09:08 hugolden