Hi,
We are trying to convert an html that has images to pdf. We are using aspose.pdf for java. In case of some gif images, the following exception is thrown:
Exception in thread "main" java.lang.NullPointerException
at com.aspose.pdf.internal.imaging.fileformats.gif.GifImage.hasTransparentColor(Unknown Source)
at com.aspose.pdf.internal.l8u.lb.drawImage(Unknown Source)
at com.aspose.pdf.internal.l8u.lt.drawImage(Unknown Source)
at com.aspose.pdf.internal.l38t.lI.lI(Unknown Source)
at com.aspose.pdf.internal.l27f.l0k.lI(Unknown Source)
at com.aspose.pdf.internal.l27f.l0if.lI(Unknown Source)
at com.aspose.pdf.internal.l27f.lv.lI(Unknown Source)
at com.aspose.pdf.internal.l27f.l0if.lI(Unknown Source)
at com.aspose.pdf.internal.l27f.l0j.lI(Unknown Source)
at com.aspose.pdf.internal.l27f.l0if.lI(Unknown Source)
at com.aspose.pdf.internal.l27f.l0j.lI(Unknown Source)
at com.aspose.pdf.internal.l27f.l0if.lI(Unknown Source)
at com.aspose.pdf.internal.l27f.l0j.lI(Unknown Source)
at com.aspose.pdf.internal.l27f.l0if.lI(Unknown Source)
at com.aspose.pdf.internal.l27f.l0j.lI(Unknown Source)
at com.aspose.pdf.internal.l27f.l0if.lI(Unknown Source)
at com.aspose.pdf.internal.l27f.l0j.lI(Unknown Source)
at com.aspose.pdf.internal.l27f.l0if.lI(Unknown Source)
at com.aspose.pdf.internal.l27f.l0j.lI(Unknown Source)
at com.aspose.pdf.internal.l27f.l0if.lI(Unknown Source)
at com.aspose.pdf.internal.l27f.lv.lI(Unknown Source)
at com.aspose.pdf.internal.l27f.l0if.lI(Unknown Source)
at com.aspose.pdf.internal.l27f.l1u.lI(Unknown Source)
at com.aspose.pdf.internal.l38t.lI.lI(Unknown Source)
at com.aspose.pdf.internal.l47if.lI.lI(Unknown Source)
at com.aspose.pdf.internal.html.rendering.HtmlRenderer.render(Unknown Source)
at com.aspose.pdf.internal.html.rendering.HtmlRenderer.render(Unknown Source)
at com.aspose.pdf.internal.html.rendering.Renderer.render(Unknown Source)
at com.aspose.pdf.internal.html.rendering.Renderer.render(Unknown Source)
at com.aspose.pdf.l6n.lI(Unknown Source)
at com.aspose.pdf.l6n.lI(Unknown Source)
at com.aspose.pdf.ADocument.lI(Unknown Source)
at com.aspose.pdf.ADocument.<init>(Unknown Source)
at com.aspose.pdf.Document.<init>(Unknown Source)
The sample html:
<html lang="en">
<head>
<title>gifs</title>
</head>
<body>
<div>
<img src="error_img.gif" alt="" />
<!-- <img src="error_img2.gif" alt="" />-->
<!-- <img src="giphy1.gif" alt="" />-->
</div>
</body>
</html>
The sample gifs that cause an error:
gifs.zip (337.6 KB)
What is the problem with the images, is it a bug to be fixed by aspose?