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

I got crash when load pdf file

Open NinhPhamHai opened this issue 2 years ago • 1 comments

Describe the bug i got crash when load 6MB file pdf.

To reproduce Code snippet to reproduce the behavior:

    var bitmap : Bitmap? = null
    try {
        val document = PDDocument.load(file)
        val renderer = PDFRenderer(document)
        bitmap = renderer.renderImage(0,0.1f,ImageType.RGB)
    }catch (e : IOException)
    {
        return null
    }
    return bitmap

PDF example i load this pdf file and get error https://drive.google.com/file/d/1avgr3cy_7aoThLPOuvtyaeJvbx-1dSpY/view?usp=sharing

Expected behavior i want get first page of file pdf as bitmap

Actual behavior A clear and concise description of what happened instead.

Environment details:

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

Additional context Picture error: 1 2

NinhPhamHai avatar Jun 11 '23 01:06 NinhPhamHai

Might be this bug? https://issues.apache.org/jira/browse/PDFBOX-4890 However the bug never occured with older versions of desktop pdfbox 2.0.* with that file.

THausherr avatar Mar 24 '24 08:03 THausherr