Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Sun Aug 11, 2024 9:13 pm

Hi,
I’m encountering an issue when using Spire.Office to load a DOC file and convert it into a PDF. The conversion process fails when the DOC file contains a text box, resulting in the following exception:

at com.spire.office.packages.sprjlna.spr〨▏—(nhg:515)
at com.spire.office.packages.sprjlna.<init>(nhg:57)
at com.spire.office.packages.sprjlna.<init>(nhg:134)
at com.spire.office.packages.sprjfda.spr╺┎—(Unknown Source)
at com.spire.office.packages.sprxhca.<init>(Unknown Source)
at com.spire.office.packages.sprpbca.spr⁂┄—(Unknown Source)
at com.spire.office.packages.sprweca.spr⑊┃—(Unknown Source)
at com.spire.office.packages.spradca.spr▌┃—(Unknown Source)
at com.spire.office.packages.sprseca.spr⅚┃—(Unknown Source)
at com.spire.office.packages.sprbyba.spr╀┵(Unknown Source)
at com.spire.office.packages.sprnuba.spr┕╇(Unknown Source)
at com.spire.office.packages.sprlok.spr┕╇(Unknown Source)
at com.spire.office.packages.spryrba.spr┕╇(Unknown Source)
at com.spire.office.packages.sprlok.spr┕╇(Unknown Source)
at com.spire.office.packages.sprbsba.spr┕╇(Unknown Source)
at com.spire.office.packages.sprlok.spr┕╇(Unknown Source)
at com.spire.office.packages.sprbsba.spr┕╇(Unknown Source)
at com.spire.office.packages.sprlok.spr┕╇(Unknown Source)
at com.spire.office.packages.sprgok.spr┕╇(Unknown Source)
at com.spire.office.packages.sprbyba.spr▩┵(Unknown Source)
at com.spire.office.packages.sprgssa.spr≋⌦–(Unknown Source)
at com.spire.office.packages.sprrtsa.spr┟⌦–(Unknown Source)
at com.spire.office.packages.sprrtsa.spr–⌦–(Unknown Source)
at com.spire.office.packages.sprrtsa.spr–※(Unknown Source)
at com.spire.doc.Document.spr㈮⃞│–(Unknown Source)
at com.spire.doc.Document.spr⑇┃–(Unknown Source)
at com.spire.doc.Document.spr‰‼(Unknown Source)
at com.spire.doc.Document.spr┌│–(Unknown Source)
at com.spire.doc.Document.saveToStream(Unknown Source)


Here is the Java code snippet that I use
doc = new Document();
doc.loadFromStream(inputFile, FileFormat.Auto);
byte[] dataStream = null;
try (ByteArrayOutputStream out = new ByteArrayOutputStream()) {
doc.saveToStream(out, FileFormat.PDF);
out.close();
dataStream = out.toByteArray();
}


I attached sample files for two doc files one with the issue and another valid one.
Could you please assist with resolving this issue? Any guidance or workaround would be greatly appreciated.

mgalal123
 
Posts: 31
Joined: Thu Apr 21, 2022 12:48 pm

Mon Aug 12, 2024 8:04 am

Hello,

Thanks for your inquiry. I conducted preliminary testing using the latest version (Spire. Office for Java version: 9.7.0) and converted your example docx to PDF without encountering the exception message you described. If you are not using the latest version, please update to the latest version and try again. If your issue persists after testing, to help us investigate your problem accurately, please provide us with your JDK version and system information (E.g. Win10, 64 bit).Thank you in advance.

Sincerely,
Amin
E-iceblue support team
User avatar

Amin.Gan
 
Posts: 277
Joined: Mon Jul 15, 2024 5:40 am

Mon Aug 12, 2024 8:33 am

Hi,
Thank you very much for your prompt response. As mentioned, I tried with versions 8.4.5 and 8.5.6 based on our license entitlements. If you could try using either of these versions and provide any possible workarounds, it would be greatly appreciated.

mgalal123
 
Posts: 31
Joined: Thu Apr 21, 2022 12:48 pm

Tue Aug 13, 2024 6:29 am

Hello,

Thanks for your feedback.
The versions you mentioned did have the issues, it indicated that this problem has been fixed in our latest version. Sorry we will not fix issues with the old version, we can only make adjustments based on the latest version. Thus, please use the latest one(Spire. Office for Java version: 9.7.0) to avoid this issue. You can learn more from the following link to renew your license.
https://www.e-iceblue.com/Buy/Spire.Off ... -Java.html
If you have any questions, you can write to sales@e-iceblue.com.

Sincerely,
Amin
E-iceblue support team
User avatar

Amin.Gan
 
Posts: 277
Joined: Mon Jul 15, 2024 5:40 am

Return to Spire.Doc