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

Free Support Forum - aspose.com

Page numbers


I am converting a Word to Pdf using Aspose word (v.15.4):

I used:

public void MssPrintToPDF(byte[] ssDocument, out byte[] ssPDF) {
ssPDF = new byte[] { };
Set_AsposeLicense(true, false, false, false);

MemoryStream m = new MemoryStream(ssDocument);
Aspose.Words.Document doc = new Aspose.Words.Document(m);

// Save document in the intermediary XML format to memory stream.
MemoryStream xmlStream = new MemoryStream();
doc.Save(xmlStream, Aspose.Words.SaveFormat.Pdf);
// Seek to the beginning so it can be read by Aspose.Pdf
xmlStream.Seek(0, SeekOrigin.Begin);
ssPDF = new byte[xmlStream.Length];
xmlStream.Read(ssPDF, 0, (int)xmlStream.Length);
} // MssPrintToPDF

I am processing IW160727402_Datum 2016_clean.docx, and as result i got the file ‘3_clean_wordToPdf.pdf’.

If I open the word and save it as pdf, I got ‘IW160727402_Datum 2016_clean.pdf’.

On the document generated by aspose I have on the footer: pagina 1/7, pagina 2/7 … pagina 6/7 On the save of pdf from the word, I got pagina 1/6…pagina 6/6

So using Aspose save to pdf, the number of total pages are not equal to the save of the word.
The user will ask where is the page 7 of 7.

Can we correct this, how?
Hi Mario,

Thanks for your inquiry.

While using the latest version of Aspose.Words i.e. 17.3.0, we managed to reproduce this issue on our end. We have logged this issue in our bug tracking system. The ID of this issue is WORDSNET-15018. Your thread has also been linked to the appropriate issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,