Hello Aspose Team,
I am experiencing an issue with the conversion process using Aspose.Words. I have a DOCX document that I convert to HTML, and then I take the generated HTML and convert it back to a DOCX file. However, I am noticing that the page margins and page size of the original DOCX are not preserved in the final DOCX file after the round-trip conversion.
Overview of My Workflow:
- Initial Conversion (DOCX to HTML):
- I start with a DOCX file and use
HtmlSaveOptions
to convert it to HTML. - The conversion works as expected, and the HTML file is generated correctly.
- Reconversion (HTML to DOCX):
- I load the generated HTML using
HtmlLoadOptions
. - I save it as a DOCX file.
Problem: After converting the HTML back to DOCX, I notice that the page margins and page size differ from those in the original DOCX document. This discrepancy affects the formatting and layout of the document.
Attached Files:
- Original DOCX: The source document with the correct page margins and size.
- Converted HTML: The HTML file generated from the original DOCX.
- Output DOCX: The final DOCX file after converting the HTML back to DOCX, showing the altered page margins and size.
ConversionHtmlDocxIssue.zip (613.7 KB)
Is there a way to ensure that the page margins and page size are retained when performing a round-trip conversion from DOCX to HTML and back to DOCX?
Thank you in advance for your assistance.