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();
xmlDoc.Position = 0;
Pdf pdf = new Pdf();
pdf.IsImagesInXmlDeleteNeeded = true;
pdf.IsCoreFontUsed = false;
Hello!<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
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.