DOCX -> PDF conversion: adding space at the end of each line

Hello Aspose Support.


I’d like to ask if it’s possible, during docx to pdf conversion to add a space character at the end of each text line. I’ve found this thread:
Paragraph: space before and after
but it doesn’t compile. Can you please help?

Thank you,
Kind regards,
Michał Wasiak.

Hi Michał,

Thanks for your inquiry. Please note that MS Word document is flow document and does not contain any information about its layout into lines and pages. Therefore, technically there is no “Page” concept in Word document. Pages are created by Microsoft Word on the fly.

Aspose.Words uses our own Rendering Engine to layout documents into pages. The Aspose.Words.Layout namespace provides
classes that allow to access information such as on what page and where
on a page particular document elements are positioned, when the document
is formatted into pages. Please read about LayoutCollector and
LayoutEnumerator from here:
http://www.aspose.com/docs/display/wordsnet/LayoutCollector+class
http://www.aspose.com/docs/display/wordsnet/LayoutEnumerator+class

Please check DocumentLayoutHelper project in Aspose.Words for .NET examples repository at GitHub. Please let us know if we can be of any further assistance.

Please manually create your expected Word document using Microsoft Word and attach it here for our reference. We will investigate how you want your final Word output be generated like. We will then provide you more information on this along with code.