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

Free Support Forum - aspose.com

Text is Pushed to Next Page | DOCX to PDF Conversion using .NET

Hi,

When converting a DOCX to PDF, I noticed some text has been pushed to the next page.

Code:

var doc = new Document(@".\test2.docx");
doc.LayoutOptions.TextShaperFactory = HarfBuzzTextShaperFactory.Instance;
doc.Save(@".\out2.pdf", new PdfSaveOptions() { OptimizeOutput = true });

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

test2.zip (74.5 KB)
image.png (86.2 KB)

Thanks,

@ServerSide527

Please make sure that the fonts used in your documents are installed on the machine where you are converting document to PDF.

We have not found the shared issue at our end. Please check the attached output PDF. 21.7.pdf (38.0 KB)

Hi @tahir.manzoor

Thanks for your update.

I have checked your attachment and it looked like the required font ‘Source Sans Pro’ was not installed on your machine and your PDF did not show this font and used some default font ‘DejavuSans’ instead:

image.png (24.6 KB)

Could you please download source sans pro font family and try again? It is available at https://fonts.google.com/specimen/Source+Sans+Pro

Thanks

@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-22462. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.