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

Free Support Forum - aspose.com

Save fails while converting a text file into PDF

Hi,

When trying to convert the text file into pdf,we are getting the below exception.

java.lang.ArrayIndexOutOfBoundsException: 0
at aspose.pdf.xml.Abo.b(SourceFile:618)
at aspose.pdf.xml.Ack.a(SourceFile:476)
at aspose.pdf.xml.Aca.a(SourceFile:759)
at aspose.pdf.xml.Aaq.a(SourceFile:105)
at aspose.pdf.xml.Aaz.a(SourceFile:112)
at aspose.pdf.Pdf.save(SourceFile:911)

Attaching all the files which are failing . We are using java Aspose 2.7.0 .(Even its failing in 2.9.0)

Here is the code sample :

String data = readFileContent(fileName);

pdf = new Pdf();

Section sec = pdf.getSections().add();

Text text = new Text(sec,data);

sec.getParagraphs().add(text);

pdf.save(pdfFileName);


Hi Sriman,

As this issue is related to Aspose.Pdf, I’m moving it to the related forum, so that the concerned team would be able to help you out. You’ll be updated with the results the earliest possible.

We’re sorry for the inconvenience.
Regards,




Hello Sriman,

Thanks for using our products.
<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif””>

I
have tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as PDFJAVA-29279. We will investigate this
issue in details and will keep you updated on the status of a correction.

<span style=“font-size:10.0pt;
font-family:“Arial”,“sans-serif””>We apologize for your inconvenience.