I got a problem when inserting HTML into a frame of a Word document. Whenever my inserted HTML contains one or multiple paragraphs it seems to destroy the frame in the resulting pdf. Please see my attached example docx and the output pdfs for further clarification (pos1.pdf just uses a break and works fine, pos2.pdf uses paragraphs and destroys the layout).
Code sample used to produce the output:
Document doc = new Document("C:/test/pos.docx");
DocumentBuilder builder = new DocumentBuilder(doc);
for (Bookmark b : doc.getRange().getBookmarks())
{
builder.moveToBookmark(b.getName());
builder.insertHtml("Para1<br />Para2"); // pos1.pdf
builder.insertHtml("<p>Para1</p><p>Para2</p>"); // pos2.pdf
}
builder.getDocument().save("C:/test/pos.pdf");
Is this a bug in Aspose.Words or am I doing anything wrong here?
Hi Kevin,
While using the latest version of Aspose.Words for java i.e. 11.4.0, I managed to reproduce this issue on my side. I have logged this issue in our bug tracking system as WORDSNET-6475. Your request has also been linked to this issue and you will be notified as soon as it is resolved.
Sorry for the inconvenience.
Best Regards,
Hi Kevin,
Thanks for the additional information. Sure, we will keep you informed of any developments and let you know once it is resolved.
Sorry for the inconvenience.
Best Regards,
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.