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

Free Support Forum - aspose.com

Word to PDf resulting in loss of pages

Hello ,

I have used demo version of Aspose.Words and Aspose.PDF to convert a Word document into a PDF file.

The word document has 6 pages but the resulting pdf has only 3 pages, I am not sure what I missing here?

The following was the code used for conversion.

Document srcDoc = new Document(inputFile);
int index = inputFile.LastIndexOf(System.IO.Path.DirectorySeparatorChar);
srcDoc.SaveOptions.ExportImagesFolder = inputFile.Substring(0,index);
srcDoc.SaveOptions.ExportPrettyFormat = true;

MemoryStream xmlDoc = new MemoryStream();
srcDoc.Save(xmlDoc, SaveFormat.AsposePdf);
xmlDoc.Position = 0;

Pdf pdf = new Pdf();
pdf.BindXML(xmlDoc, null);
pdf.IsImagesInXmlDeleteNeeded = true;
pdf.IsCoreFontUsed = false;


Thank you for your inquiry.
I have reproduced the issue and logged it as #5951 in our defect database. Most probably it is related to DOCX import. When I saved the original document with MS Word in DOC format conversion to PDF gave closer result. From what I see SpaceAfter attribute is lost for some paragraphs. You can try saving in another format as a workaround.

The issues you have found earlier (filed as 5951) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.