When attempting to covert PDF to Single page Tiff image we are receiving the following stack trace. Any insight to what might be causing the issue would be helpful.
com.aspose.pdf.internal.ms.System.l8u: Argument path cannot be empty
com.aspose.pdf.internal.l69y.l2j.lI(Unknown Source)
com.aspose.pdf.internal.l69y.l2j.<init>(Unknown Source)
com.aspose.pdf.internal.l10t.l0t.lI(Unknown Source)
com.aspose.pdf.internal.l3v.lI.lI(Unknown Source)
com.aspose.pdf.internal.l2h.l0h.lf(Unknown Source)
com.aspose.pdf.internal.l2h.l0h.lt(Unknown Source)
com.aspose.pdf.internal.l2h.lu.lf(Unknown Source)
com.aspose.pdf.internal.l2h.lu.lI(Unknown Source)
com.aspose.pdf.devices.lI.lI(Unknown Source)
com.aspose.pdf.devices.TiffDevice.processInternal(Unknown Source)
com.aspose.pdf.devices.DocumentDevice.processInternal(Unknown Source)
com.aspose.pdf.devices.DocumentDevice.process(Unknown Source)
The following is the snip-it of code that this exception is thrown from:
try {
pdfDocument = new Document(inputFilePath);
imageStream = new FileOutputStream(outputFilePath);
Resolution resolution = new Resolution(DEFAULT_DPI_RESOLUTION); // abstract resolution that seems to correlate to dots per inch (DPI)
TiffSettings tiffSettings = new TiffSettings();
tiffSettings.setCompression(compressingType);
tiffSettings.setDepth(colorDepth);
tiffSettings.setSkipBlankPages(false);
TiffDevice tiffDevice = new TiffDevice(resolution, tiffSettings);
tiffDevice.process((IDocument) pdfDocument, imageStream);
pdfDocument.close();
} finally {
if(pdfDocument != null ){
pdfDocument.close();
}
if(imageStream != null) {
imageStream.close();
}
}
Also attaching link to sample file that caused the error message.
https://drive.google.com/file/d/1IZnacvG5VxHFpkxmqCFUWvWiBdJI4Sj0/view?usp=sharing