Empty Page Section Break (New Page) is Lost | DOCX to PDF Conversion using .NET

Hello. I am converting a docx to PDF using Aspose. However, the page breaks are not being rendered as they are in the word document and the converted PDF directly from Word.

issues.png (79.7 KB)

As seen in the docx, I would like there to be a page break before the contents page. However, when using aspose to convert to PDF, the page break is no longer there.

The code used is as follows:

var doc = new Document(sourceDocument);
doc.LayoutOptions.TextShaperFactory = HarfBuzzTextShaperFactory.Instance;
doc.Save(OutputPath);

The test docx and the two outputs are provided in the following zip file.
test.zip (322.2 KB)

Thanks for your help.

@ServerSide527

We have tested the scenario and managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-22627. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

1 Like