In Microsoft Word, when you have hyphenation, the target word is not allowed to be sent to the new page. Your entire line goes on the new page.
When I convert such docx file to PDF using Aspose.Words, the result PDF does not follow this rule, hence I end up with different page layouts, which I do not want.
What I tried:
- using custom hyphenation dictionaries, which I load into Aspose.Words (German language)
- altering the docx somehow with
HyphenationOptions
field (they do not work when converting to fixed page format) - altering the page margins -> this is not a solution, because I want 1:1 conversion
- Using different compatibility modes -> I left the
Aspose.Words.Settings.MsWordVersion.Word2019
- Using Apose.Pdf somehow -> problems is that I do not build the PDF myself, hence I am limited on how to display it
- Using
Aspose.Words.Saving.PdfSaveOptions
and various settings -> no success
Version of Aspose.Words: 20.8.0 (latest version)
PDF:
some text here
überra-
page 1
schung
page 2
WORD:
some text here
page 1
Überraschung
page 2