Free Support Forum -

Gif to Pdf Issue

I am having an issue to convert gif document to pdf. The gif is seen ok but pdf is blank.

Attached documents with original gif and pdf for your reference. (6.5 KB)



Can you please share the working sample code reproducing the issue.

BufferedImage readImage = null;

        try {

            readImage = File(data.getCachedFileName()));

            var h = readImage.getHeight();

            var w = readImage.getWidth();

            var doc = new Document();

            Page page = doc.getPages().add();

            com.aspose.pdf.Image image = new Image();










        } catch (Exception e) {

            exceptionHandling(e, "image to Pdf ");



This issue is related to Aspose.PDF and I am moving this thread to concerned forum where our respective support team will assist you further in this regard.


We were able to notice that the output PDF contains only black image in it while testing the scenario with Aspose.PDF for Java 21.3. Therefore, an issue as PDFJAVA-40301 has been logged in our issue tracking system for further investigation. We will look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

Hi @asad.ali I am anxious to know if there is any solution to this particular problem.

This is one tricky problem i am facing and i want to get this problem addressed asap if possible at all.



The concerned issue is blocked owing to internal API limitation. After investigation, an internal task has been added for rectifying the issue in Aspose.PDF for .NET and then later it shall be ported to Aspose.PDF for Java as well. We request for your patience in this regard till the time the issue gets resolved.

Thank you @mudassir.fayyaz

That’s a great news!