Fail to convert pdf page to image

Hi,

The attached input file, calling the following code and got the erro ,thanks for help!

Ruhong

Resolution resolution = new Resolution(162I);
JpegDevice jpegDevice = new JpegDevice(resolution, 162);

OutputStream output = new FileOutputStream(“output.png”)
Document pdfAsposeDocument = new Document(“inputFile”);
Page pageForAsposePdf = pdfAsposeDocument.getPages().get_Item(1);
jpegDevice.process(pageForAsposePdf, output);

Caused by: com.aspose.pdf.internal.ms.System.l8u: Argument path cannot be empty
at com.aspose.pdf.internal.l54v.l2j.lI(Unknown Source)
at com.aspose.pdf.internal.l54v.l2j.(Unknown Source)
at com.aspose.pdf.internal.l10t.ld.lI(Unknown Source)
at com.aspose.pdf.internal.l3v.lI.lI(Unknown Source)
at com.aspose.pdf.internal.l2h.l0h.lf(Unknown Source)
at com.aspose.pdf.internal.l2h.l0h.lt(Unknown Source)
at com.aspose.pdf.internal.l2h.lu.lf(Unknown Source)
at com.aspose.pdf.internal.l2h.lu.lf(Unknown Source)
at com.aspose.pdf.internal.l2n.lv.lI(Unknown Source)
at com.aspose.pdf.internal.l2n.lv.lI(Unknown Source)
at com.aspose.pdf.internal.l2h.l0h.lf(Unknown Source)
at com.aspose.pdf.internal.l2h.l0h.lt(Unknown Source)
at com.aspose.pdf.internal.l2h.lu.lf(Unknown Source)
at com.aspose.pdf.internal.l2h.lu.lI(Unknown Source)
at com.aspose.pdf.devices.lI.lI(Unknown Source)
at com.aspose.pdf.devices.lI.lI(Unknown Source)
at com.aspose.pdf.devices.ImageDevice.lI(Unknown Source)
at com.aspose.pdf.devices.JpegDevice.processInternal(Unknown Source)
at com.aspose.pdf.devices.JpegDevice.process(Unknown Source)convertPDFtoImages.zip (84.3 KB)

@ruhongcai

We were able to replicate the issue in our environment while using Aspose.PDF for Java 20.4 and logged it as PDFJAVA-39410 in our issue tracking system. We will further look into its details and keep you posted with the status of its rectification. Please be patient and spare us some time.

We are sorry for the inconvenience.

The issues you have found earlier (filed as PDFJAVA-39410) have been fixed in Aspose.PDF for Java 21.1.