Pdf generation when XML contains an attached image file fails in 2.9.0

Hi,

I have a txt file which contains data in XML format. My requirement is to read this file and create a pdf.

Sample code :

Pdf pdf = new Pdf();

StringBuffer strBuff = getContentFromFile(); // This method reads the content of the file attached here

pdf.bindXML(new StringBufferInputStream(strBuff.toString()), null);

pdf.save("/usr/config/test/Aspose_Test_14.pdf");

If I am using Aspose 2.7.0 its working fine in both windows and Linux machine.

But in 2.9.0 this works fine in Windows machine and failing in Linux machine.

The file contains a piece of string :



In this line its throwing the following exception :

Exception Summary: Couldn't convert image stream: null
Exception Cause: null
The Exception stack trace is as follows,
aspose.pdf.figure.Abk.a(SourceFile:94)
aspose.pdf.figure.Abc.a(SourceFile:145)
aspose.pdf.xml.Abh.a(SourceFile:226)
aspose.pdf.xml.Abh.a(SourceFile:632)
aspose.pdf.xml.Abi.a(SourceFile:577)
aspose.pdf.xml.Aaj.a(SourceFile:471)
aspose.pdf.xml.Aca.a(SourceFile:182)
aspose.pdf.xml.Aci.a(SourceFile:463)
aspose.pdf.xml.Aaw.a(SourceFile:545)
aspose.pdf.xml.Aaj.a(SourceFile:499)
aspose.pdf.xml.Aca.a(SourceFile:182)
aspose.pdf.xml.Aci.a(SourceFile:463)
aspose.pdf.xml.Aah.a(SourceFile:176)
aspose.pdf.xml.Aaj.a(SourceFile:504)
aspose.pdf.xml.Aca.a(SourceFile:182)
aspose.pdf.xml.Aci.a(SourceFile:463)
aspose.pdf.xml.Abe.a(SourceFile:445)
aspose.pdf.xml.Acb.b(SourceFile:678)
aspose.pdf.xml.Acc.a(SourceFile:753)
aspose.pdf.xml.Aar.a(SourceFile:97)
aspose.pdf.xml.Aba.a(SourceFile:112)
aspose.pdf.Pdf.save(SourceFile:923)

If I remove that particular line then its working fine .

Hello Sriman,

Thanks for using our products.

We are working over this query and will get back to you shortly. We apologize for your inconvenience.

Is there any update on this ?

Hello Sriman,

Sorry for replying you late.

I am afraid I have not yet completed my testing over Linux environment because I have encountered some issues over my Linux instance. However I am trying my level best to get them fixed ASAP so that I can try replicating this scenario over it. Please spare us little more time. Please accept our humble apologies for the delay and inconvenience.

Hello Sriman,

Thanks for your patience.

I have further investigated this problem on Linux RedHat Enterprise 5 and I am able to notice the same Exception. However I am also unable to notice this problem on Windows Operating system. For the sake of correction, I have logged this problem as PDFJAVA-28967 in our issue tracking system. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

Any Update on this ?

Hey,

we have a release of our product on this 31st July. Could you please let me know when will this fix be available ?

This is working on 2.7.0 and its failing in the latest version 2.9.0 which should not be the case for a product like Aspose. Some extra fixes/functionalities should go with the latest releases and not SOME EXTRA ADDITIONAL BUGS.

Hello Sriman,

Sorry for replying you late.

We have further investigated this issue and have found that Aspose.Pdf for Java is working correctly over Ubuntu OS. Can you please share which version of Linux you are using ?

We are really sorry for the delay and inconvenience.

I have Linux machine with below configuration:

Linux 2.6.18 x86_64 GNU/Linux

Hello Sriman,

Thanks for sharing the information.

It will really help us in replicating this issue in our environment. We will try our level best to get it fixed ASAP. Your patience and comprehension is greatly appreciated in this regard. We apologize for your inconvenience.

Any idea when it will be fixed. Actually we are in urgency.

Hello Sriman,

Sorry for replying you late.

We have been able to figure out some reasons that might be causing this issue and our development team is still working hard to get it fixed ASAP. Nevertheless I have request them to share the ETA regarding its resolution. Please be patient and spare us little time. We are really sorry for the delay and inconvenience.

Hello Sriman,

Thanks for your patience.

I am pleased to share that the issue reported earlier has been fixed but further investigation have revealed some other issues that might have occurred because of this problem. Our development team is trying to fix all the related issues. We will keep you posted on the status of correction.

Our humble request is to please be little patient and spare us little time. We are really sorry for this inconvenience.

Hello Sriman,

Thanks for your patience.

I am pleased to inform you that the issue reported earlier has been fixed. Please try using the attached HotFix and in case the problem still persists, please feel free to contact.

Please note that
by default DPI for headless environment is set to 96, However you can change it to any reasonable value (i.e. 72,120,160) by setting aspose.pdf.dpi property. For example: java -Daspose.pdf.dpi=120 …

Hi,

How can I use this hotfix ? Should I keep this jar in the casspath ?
Please let me know the procedure.

Hello Sriman,

Instead of using the earlier version, please replace it with this HotFix. Try compiling and executing the code with this version and in case you encounter any problem, please feel free to contact.

Hi,

I have the same issue. After downloading the hot fix, it is still same error in Unix:

hd:[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)' Wed Aug 03 13:35:34 EDT 2011 gds.util.Form1MLMailer(getPDFfromXml:352) Stack Trace..java.lang.RuntimeException: Couldn't convert image stream: null
at aspose.pdf.figure.Abi.a(SourceFile:95)
at aspose.pdf.figure.Aba.a(SourceFile:166)
at aspose.pdf.figure.Aba.a(SourceFile:96)
at aspose.pdf.xml.Abh.a(SourceFile:226)
at aspose.pdf.xml.Abh.a(SourceFile:632)
at aspose.pdf.xml.Abi.a(SourceFile:577)
at aspose.pdf.xml.Acc.a(SourceFile:796)
at aspose.pdf.xml.Aar.a(SourceFile:97)
at aspose.pdf.xml.Aba.a(SourceFile:112)
at aspose.pdf.Pdf.save(SourceFile:1166)
at aspose.pdf.Pdf.save(SourceFile:1112)
at gds.util.Form1MLMailer.getPDFfromXml(Form1MLMailer.java:335)

Please help resolve the issue.

Thanks

Hello Sriman,

Thanks for using the hotfix and sharing the StackTrace.

We will further look into this stacktrace information and see if we can figure out some idea regarding its resolution. Please be patient and spare us little time. We are sorry for your inconvenience.

Hello Sriman,

I have discussed this matter with development team and
it seems to be another new bug related to our GifDecoder. Please try using the attached HotFix. It might not resolve your problem but it will show full stack trace about the exception. Thanks for your cooperation.

Hi,

When can I expect a fix for this ?