We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Working example Multipage TIFF

Hello,

I have a question concerning the example
https://docs.aspose.com/words/java/convert-a-document-to-an-image/

when I try to do that, I get

java.lang.IllegalStateException: Requested option (saving TIFF image) requires JAI to be installed.
at asposewobfuscated.ëGX.(Unknown Source)
at com.aspose.words.ëG0.ëX(Unknown Source)
at com.aspose.words.ëG0.ëZ(Unknown Source)
at com.aspose.words.Document.ëZ(Unknown Source)
at com.aspose.words.Document.save(Unknown Source)
…

I haven’t seen any traces of the jai libraries in your example IntelliJ project.

I tried it both with an Aspose Words 11.5.0 and with 13.3.0. Do I have to include the JAI libraries manually? The ones I find on the internet are fairly outdated.

Any advice would be highly appreciated.

Hi Scherge,

Thanks for your inquiry.

Most of our Java products depend upon the JAI package (Java Advanced Imaging) from Sun in order to process images. By looking at the stack trace, it seems your problem is somehow related to JAI. You can find jai 1.1.3 and jai-imageio 1.1 in the following links:

https://docs.aspose.com/words/java/system-requirements/#optional-dependencies

If we can help you with anything else, please feel free to ask.

Best regards,

Thanks a lot,

just wanted to make sure that I don’t put additional stuff in that you guys already incorporated somewhere.

Have a nice day

Hi,

Please let us know any time you have any further queries. We are always glad to help you.

Best regards,

Hello,

I was getting same error but got resolved by adding 2 jars you have mentioned but now getting exception as

java.lang.NullPointerException
at asposewobfuscated.hh.a(GdiRenderer.java:176)
at asposewobfuscated.s.a(ApsGlyphs.java:48)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.m.a(ApsCanvas.java:18)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.m.a(ApsCanvas.java:18)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.z.a(ApsPage.java:75)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.m.a(ApsCanvas.java:18)
at asposewobfuscated.hh.a(GdiRenderer.java:49)
at com.aspose.words.apd.a(SaveToImageHelper.java:129)
at com.aspose.words.apd.a(SaveToImageHelper.java:94)
at com.aspose.words.uz.jj(ImagingWriter.java:91)
at com.aspose.words.uz.c(ImagingWriter.java:53)
at com.aspose.words.uz.a(ImagingWriter.java:36)
at com.aspose.words.Document.a(Document.java:1345)
at com.aspose.words.Document.save(Document.java:738)
at com.aspose.words.Document.save(Document.java:698)
at pdfconvert.(pdfconvert.java:107)
at pdfconvert.main(pdfconvert.java:50)
java.lang.NullPointerException
at asposewobfuscated.hh.a(GdiRenderer.java:176)
at asposewobfuscated.s.a(ApsGlyphs.java:48)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.m.a(ApsCanvas.java:18)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.m.a(ApsCanvas.java:18)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.z.a(ApsPage.java:75)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.m.a(ApsCanvas.java:18)
at asposewobfuscated.hh.a(GdiRenderer.java:49)
at com.aspose.words.apd.a(SaveToImageHelper.java:129)
at com.aspose.words.apd.a(SaveToImageHelper.java:94)
at com.aspose.words.uz.jj(ImagingWriter.java:91)
at com.aspose.words.uz.c(ImagingWriter.java:62)
at com.aspose.words.uz.a(ImagingWriter.java:36)
at com.aspose.words.Document.a(Document.java:1345)
at com.aspose.words.Document.save(Document.java:738)
at com.aspose.words.Document.save(Document.java:698)
at pdfconvert.(pdfconvert.java:107)
at pdfconvert.main(pdfconvert.java:50)
java.lang.NullPointerException
at asposewobfuscated.hh.a(GdiRenderer.java:176)
at asposewobfuscated.s.a(ApsGlyphs.java:48)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.m.a(ApsCanvas.java:18)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.m.a(ApsCanvas.java:18)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.m.a(ApsCanvas.java:18)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.z.a(ApsPage.java:75)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.m.a(ApsCanvas.java:18)
at asposewobfuscated.hh.a(GdiRenderer.java:49)
at com.aspose.words.apd.a(SaveToImageHelper.java:129)
at com.aspose.words.apd.a(SaveToImageHelper.java:94)
at com.aspose.words.uz.jj(ImagingWriter.java:91)
at com.aspose.words.uz.c(ImagingWriter.java:62)
at com.aspose.words.uz.a(ImagingWriter.java:36)
at com.aspose.words.Document.a(Document.java:1345)
at com.aspose.words.Document.save(Document.java:738)
at com.aspose.words.Document.save(Document.java:698)
at pdfconvert.(pdfconvert.java:107)
at pdfconvert.main(pdfconvert.java:50)
java.lang.NullPointerException
at asposewobfuscated.hh.a(GdiRenderer.java:176)
at asposewobfuscated.s.a(ApsGlyphs.java:48)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.m.a(ApsCanvas.java:18)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.m.a(ApsCanvas.java:18)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.m.a(ApsCanvas.java:18)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.z.a(ApsPage.java:75)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.m.a(ApsCanvas.java:18)
at asposewobfuscated.hh.a(GdiRenderer.java:49)
at com.aspose.words.apd.a(SaveToImageHelper.java:129)
at com.aspose.words.apd.a(SaveToImageHelper.java:94)
at com.aspose.words.uz.jj(ImagingWriter.java:91)
at com.aspose.words.uz.c(ImagingWriter.java:62)
at com.aspose.words.uz.a(ImagingWriter.java:36)
at com.aspose.words.Document.a(Document.java:1345)
at com.aspose.words.Document.save(Document.java:738)
at com.aspose.words.Document.save(Document.java:698)
at pdfconvert.(pdfconvert.java:107)
at pdfconvert.main(pdfconvert.java:50)
java.lang.NullPointerException
at asposewobfuscated.hh.a(GdiRenderer.java:176)
at asposewobfuscated.s.a(ApsGlyphs.java:48)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.m.a(ApsCanvas.java:18)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.m.a(ApsCanvas.java:18)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.m.a(ApsCanvas.java:18)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.z.a(ApsPage.java:75)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.m.a(ApsCanvas.java:18)
at asposewobfuscated.hh.a(GdiRenderer.java:49)
at com.aspose.words.apd.a(SaveToImageHelper.java:129)
at com.aspose.words.apd.a(SaveToImageHelper.java:94)
at com.aspose.words.uz.jj(ImagingWriter.java:91)
at com.aspose.words.uz.c(ImagingWriter.java:62)
at com.aspose.words.uz.a(ImagingWriter.java:36)
at com.aspose.words.Document.a(Document.java:1345)
at com.aspose.words.Document.save(Document.java:738)
at com.aspose.words.Document.save(Document.java:698)
at pdfconvert.(pdfconvert.java:107)
at pdfconvert.main(pdfconvert.java:50)
java.lang.NullPointerException
at asposewobfuscated.hh.a(GdiRenderer.java:176)
at asposewobfuscated.s.a(ApsGlyphs.java:48)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.m.a(ApsCanvas.java:18)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.m.a(ApsCanvas.java:18)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.m.a(ApsCanvas.java:18)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.z.a(ApsPage.java:75)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.m.a(ApsCanvas.java:18)
at asposewobfuscated.hh.a(GdiRenderer.java:49)
at com.aspose.words.apd.a(SaveToImageHelper.java:129)
at com.aspose.words.apd.a(SaveToImageHelper.java:94)
at com.aspose.words.uz.jj(ImagingWriter.java:91)
at com.aspose.words.uz.c(ImagingWriter.java:62)
at com.aspose.words.uz.a(ImagingWriter.java:36)
at com.aspose.words.Document.a(Document.java:1345)
at com.aspose.words.Document.save(Document.java:738)
at com.aspose.words.Document.save(Document.java:698)
at pdfconvert.(pdfconvert.java:107)
at pdfconvert.main(pdfconvert.java:50)
java.lang.NullPointerException
at asposewobfuscated.hh.a(GdiRenderer.java:176)
at asposewobfuscated.s.a(ApsGlyphs.java:48)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.m.a(ApsCanvas.java:18)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.m.a(ApsCanvas.java:18)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.m.a(ApsCanvas.java:18)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.z.a(ApsPage.java:75)
at asposewobfuscated.p.a(ApsCompositeNode.java:22)
at asposewobfuscated.m.a(ApsCanvas.java:18)
at asposewobfuscated.hh.a(GdiRenderer.java:49)
at com.aspose.words.apd.a(SaveToImageHelper.java:129)
at com.aspose.words.apd.a(SaveToImageHelper.java:94)
at com.aspose.words.uz.jj(ImagingWriter.java:91)
at com.aspose.words.uz.c(ImagingWriter.java:62)
at com.aspose.words.uz.a(ImagingWriter.java:36)
at com.aspose.words.Document.a(Document.java:1345)
at com.aspose.words.Document.save(Document.java:738)
at com.aspose.words.Document.save(Document.java:698)
at pdfconvert.(pdfconvert.java:107)
at pdfconvert.main(pdfconvert.java:50)

Hi Ishan,

Thanks for your inquiry. Please attach your input Word document you’re getting this problem with here for testing. We will investigate the issue on our end and provide you more information.

Best regards,

Hi,
Thanks for your reply,PFA doc file im trying to convert to tiff.
Also i was trying to convert it to pdf and then to tiff,this approach is working fine but converting pdf to tiff is very slow it takes 4-5 minutes to convert single page,can you tell me its reason

Hi Ishan,

Thanks for your inquiry.

While using the latest version of Aspose.Words i.e. 14.7.0, I managed to reproduce “com.aspose.words.FileCorruptedException” on my side. I have logged this issue in our bug tracking system as WORDSNET-10715. Your request has also been linked to this issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,

The issues you have found earlier (filed as WORDSNET-10715) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.