Issue with GIF images rendering as red "X" in PDF when using PdfImageCompression.JPEG

Hello,

I’m trying to load a DOCX document that contains different types of images (GIF, PNG, JPEG) and save it as a PDF using PdfImageCompression.JPEG.

All images render correctly, except for GIFs, which are displayed as a red “X” symbol. This functionality worked without issues in older versions of Aspose.Words.

Currently, we are unable to use PdfImageCompression.JPEG when the document contains at least one GIF image. Is this a bug in Aspose, or is there a workaround for this issue?

code snippet:

Document doc = new Document(new FileInputStream("c:\\work\\gif.docx"));
PdfSaveOptions saveOptions = new PdfSaveOptions();
saveOptions.setImageCompression(PdfImageCompression.JPEG);
doc.save("c:\\work\\gif.pdf", saveOptions);

docx:
gif.docx (1.1 MB)

@dfinsolutions
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): WORDSJAVA-3006

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.