plutext / docx4j

JAXB-based Java library for Word docx, Powerpoint pptx, and Excel xlsx files
https://www.docx4java.org/
2.13k stars 1.2k forks source link

Version 11.4.8 and 11.4.9 - What would cause this ? #561

Closed harry77914 closed 9 months ago

harry77914 commented 1 year ago

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0 at org.docx4j.openpackaging.parts.WordprocessingML.ObfuscatedFontPart.extract(ObfuscatedFontPart.java:123) at org.docx4j.openpackaging.parts.WordprocessingML.FontTablePart.getFontFromRelationship(FontTablePart.java:150) at org.docx4j.openpackaging.parts.WordprocessingML.FontTablePart.processEmbeddings(FontTablePart.java:121) at org.docx4j.openpackaging.packages.WordprocessingMLPackage.setFontMapper(WordprocessingMLPackage.java:362) at org.docx4j.openpackaging.packages.WordprocessingMLPackage.setFontMapper(WordprocessingMLPackage.java:310) at com.veevaservices.iaas.safety.cioms.services.CIOMSGenerator.convertToPdf(CIOMSGenerator.java:144) at com.veevaservices.iaas.safety.cioms.services.CIOMSGenerator.generate(CIOMSGenerator.java:72) at com.veevaservices.TestTokenPopulator.main(TestTokenPopulator.java:43)

plutext commented 1 year ago

Some issue reading that ObfuscatedFontPart embedded in the docx?

Feel free to attach the docx (you can delete all the text in it before posting) and I'll take a look.

harry77914 commented 1 year ago

fomr.docx

plutext commented 9 months ago

Unzipping your docx, font4.odttf is zero bytes. I have added a test for this in forthcoming 11.4.10