Skip to content

Not rendering the PDF to bitmap correctly on one specific file #588

@hugolden

Description

@hugolden

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]

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugExisting feature doesn't work correctly

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions