Hi all, i got this err when saving the docx document to pdf format. Any one can help me?
Also, i see the page count of the document is different per debug time.
My file
10MB.zip (8.3 MB)
My code:
var document = new Aspose.Words.Document(assetPath);
var PageCount = document.PageCount;
var memoryStream = new MemoryStream();
var pdfSaveOptions = new Aspose.Words.Saving.PdfSaveOptions(){PageCount = 100 /*save first 100 pages*/};
document.Save(memoryStream, pdfSaveOptions);
Exception:
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter ‘pageCount’)
System.ArgumentOutOfRangeException
Specified argument was out of the range of valid values. (Parameter ‘pageCount’)
at Aspose.Words.Document. (Int32 , Int32 )
at ( , )
at . ( )
at . ( )
at Aspose.Words.Document. ( )
at Aspose.Words.Document.(Stream , String , SaveOptions )
at Aspose.Words.Document.Save(Stream stream, SaveOptions saveOptions)