While converting Word document to PDF Document using Aspose.words in SUSE Linux Environment, Facing Error like Below
Expected a value between 0 and 0.
Parameter name: index
java.lang.IllegalArgumentException: Expected a value between 0 and 0.
Parameter name: index
at com.aspose.words.internal.zzYS.zzZ(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zzKF.zzYO(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zzKF.get(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zzON.zzVF(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zzOL.zzY(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zzOL.zzZ(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zz73.zzZ(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zz73.zzZ(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zzP5.zzQ(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zzCG.zzQ(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zzCJ.zzy5(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zzBB.zzW(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zzC3.zzZ(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zzD7.zzW(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zzD9.zzIN(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.internal.zzBH.zzIN(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.zzYX9.zzZji(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.zzZU2.zzZ(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.zzZ8E.zzZ(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.Document.zzY(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.Document.zzZ(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
at com.aspose.words.Document.save(Unknown Source) ~[aspose-words-21.2-jdk17.jar:21.2.0]
Is WORDSNET-10297 issue resolved in Aspose Words for Java?
The error you are encountering while converting a Word document to PDF using Aspose.Words in a SUSE Linux environment, specifically the java.lang.IllegalArgumentException: Expected a value between 0 and 0, suggests that there may be an issue with the document being processed or the way it is being accessed.
To address this issue, consider the following steps:
Check Document Integrity: Ensure that the Word document you are trying to convert is not corrupted. You can try opening it in Microsoft Word or another compatible application to verify its integrity.
Update Aspose.Words: Make sure you are using the latest version of Aspose.Words for Java. If you are using an older version, it may contain bugs that have been fixed in later releases. The issue you mentioned, identified as WORDSNET-10297, may have been resolved in a more recent version.
Review Code Implementation: Ensure that your code for loading and saving the document is correct. Here’s a basic example of how to convert a Word document to PDF:
// Load the Word document
Document doc = new Document("path/to/your/document.docx");
// Save the document as PDF
doc.save("output.pdf");
Check for Specific Document Features: Some features in Word documents may not be supported or may cause issues during conversion. If your document contains complex elements (like certain types of images, embedded objects, or specific formatting), try simplifying the document to see if that resolves the issue.
Consult Documentation: For more detailed guidance on exporting documents to PDF, you can refer to the official Aspose documentation, which provides comprehensive instructions and examples.
If the problem persists after trying these steps, consider reaching out to Aspose support or checking the Aspose forums for similar issues and solutions shared by other users.
For further assistance, you can refer to the following resources:
Is it possible that if SUSE Linux System if don’t have Symbol font installed then This issue can be occurred. Can you please help on this, if your system has this font?
@Prem_Parmar It is not likely the problem might be caused by a missed font. If some font is not available, Aspose.Words simply uses an alternative font among the available ones or the last resort font embedded into Aspose.Words library.
@alexey.noskov, Issue is not for generating word document. Its working… Issue for PDF conversion. Is that thing applicable for Words to PDF conversion?
@Prem_Parmar Fonts are not required for generating MS Word documents. The above information about font is applicable only for document rendering, i.e. conversion to fixed page formats like PDF, XPS, Image etc.
Expected a value between 0 and 0.
Parameter name: index
java.lang.IllegalArgumentException: Expected a value between 0 and 0.
It’s specific to SUSE Linux only. Is it possible we can avoid this by some or other way… Because We can find a part of issue where from whole document only bullet is having issue…
Bullets have symbol fonts. and Our SUSE environment doesn’t have that…
@Prem_Parmar Although we can’t reproduce the problem on our side, I see that Adobe.Acrobat throws a warning for the PDF document “The font ”FAACBA+SymbolMedium“ contains an invalid /BOX.”. This could possibly be due to a problem on your side.
@vyacheslav.deryushev, As I said earlier that from SUSE environment only we are seeing this issue and also Its for bullets having word. There should be something in those environment thats causing issue and fallback font of aspose is not handling that thing.
Thank you so much for quick response. We don’t have Mentioned font in the system. Here is the list of fonts in the system : FC_List_Family_Fonts.pdf (122.4 KB)
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.