I am importing word document(input doc) and from that I am extracting the nodes between the hidden characters.And then converting this extracted node to an html string and storing in the database.Using this content i will create another document as same as input doc.
In input words if there any bullet or numbered paragraph is there then, it’s not properly aligned in the download document.
Attaching the sample doc to reproduce the same issue.BulletRulerIssue.zip (603.2 KB)
You are using ExportListLabels.AS_INLINE_TEXT in your code as shown below. We suggest you please use ExportListLabels.BY_HTML_TAGS to get the correct bullet list.
HtmlSaveOptions options = new HtmlSaveOptions();
options.setSaveFormat(SaveFormat.HTML);
options.setExportImagesAsBase64(true);
options.setExportListLabels(ExportListLabels.AS_INLINE_TEXT);
We have remove the following line of code from your application and tested the scenario using the latest version of Aspose.Words for Java 20.6. The output generated by your application is expected output. Please check the attached DOCX. 20.6.zip (13.8 KB)
I upgrade the version to 20.6. But after upgrade the extracted bullet from the input document is not coming as bullet (its coming as text) in the output document. Please check with the same source. If there any setting I have to missed let me know.
Hi,
I checked your attached word document. There it looking fine. But I upgrade the version of same sample code to 20.6 and hit the same input file for testing. But my output document bullet is not coming as bullet. It’s coming as normal text. Attaching the whole code, input and output below. BulletRulerIssue (2).zip (603.4 KB)
We have gone through your complete project and noticed that you are extracting content from the document and inserting it back as HTML.
In your code, you are saving document to HTML using Node.ToString. The list labels are exported incorrectly by Node.ToString. We have logged this issue as WORDSNET-20795 in our issue tracking system. You will be notified via this forum thread once this issue is resolved. We apologize for your inconvenience.
Further to my previous post, you can use following modified code to get the desired output. These methods save the document to HTML using Document.Save method. Hope this helps you.
I changed my code with your solution, and it fixed the above all issue. But facing another serious issue. Now my bullet number is continuing while downloading. My uploaded input document continue number _input.zip (16.8 KB) and getting the output as output.zip (12.9 KB). Thus is my changed source code wrdHtmlWithReplacePoc (2).zip (38.1 KB).