Convert png out of memery

Hello, I have a pdf file, want to convert to png, but got out of memery error, can you help me solve it.

my code:

    Document pdfDocument = new Document(pdfPath);
    Resolution resolution = new Resolution(80);
    PngDevice pngDevice = new PngDevice(resolution);
    for (int i = 0; i < pdfDocument.getPages().size(); i++) {
        String tmpPng = filePrefix + "/" + (i + 1) + ".png";
        java.io.OutputStream outputBinImageFile = new java.io.FileOutputStream(tmpPng);
        pngDevice.process(pdfDocument.getPages().get_Item(i + 1), outputBinImageFile);
        outputBinImageFile.close();
    }
    pdfDocument.close();

@guguzzz

We are checking it and will get back to you shortly.

@guguzzz

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFJAVA-43068

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.