We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Convert DOCX with Pictures to PDF C# & Mimic MS Word 2013 behavior when Wrapping Lines with Page Breaks Flowing over Right Column Boundary

Hi,

When converting a DOCX to PDF using Aspose.Words, I noticed the paragraph has been slightly shifted and the picture has been pushed to the next page.

Code:
var doc = new Document(@".\test.docx");
doc.LayoutOptions.TextShaperFactory = Aspose.Words.Shaping.HarfBuzz.HarfBuzzTextShaperFactory.Instance;
doc.Save(@".\test.pdf");

I’ve attached the test files and a screenshot for your reference. Could you please help me take a look?

test.zip (190.5 KB)
image.png (30.9 KB)

In case it helps, I made some comments in my screenshot because I’m suspecting it is coming from ‘Page break before’ paragraph property.

Thanks,

@ServerSide527,

We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-20132. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-20132) have been fixed in this Aspose.Words for .NET 20.6 update and this Aspose.Words for Java 20.6 update.