Getting Null pointer exception while inserting png image into word document.
java.lang.NullPointerException: null
at com.aspose.words.DocumentBuilder.zzY(Unknown Source) ~[aspose-words-16.11.0-jdk16.jar:16.11.0.0]
at com.aspose.words.zzYWK.endTable(Unknown Source) ~[aspose-words-16.11.0-jdk16.jar:16.11.0.0]
at com.aspose.words.DocumentBuilder.endTable(Unknown Source) ~[aspose-words-16.11.0-jdk16.jar:16.11.0.0]
@jai25 Thank you for additional information. Unfortunately, I cannot reproduce the problem on my side using the latest 23.4 version of Aspose.Words. For following code works fine on my side:
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.insertImage("C:\\Temp\\Example.png");
doc.save("C:\\Temp\\out.docx");
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.