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

Free Support Forum - aspose.com

Words6 - SaveToPdf(fn) fails

The code is

Dim wordLicense As Aspose.Words.License = New Aspose.Words.License
Dim doc As Aspose.Words.Document
'Save the document in Aspose.Pdf.Xml format into a memory stream.
doc = New Aspose.Words.Document(fileName)
'Now produce the PDF file.
fileName = System.IO.Path.ChangeExtension(fileName, ".pdf")

For the attached document. It was created from a word .doc file where bookmarks were “filled in” by aspose.words6, then the above code to reload and save to pdf. I can send the original (pre-filled) word file. For the record Aspose.PDF.dll can convert the file with a single formatting error – the right edge of one of the tables is rendered in the wrong place. PDF of that is attached
The error:

System.ArgumentException: Need to specify story master when inserting into story other than main text.
Parameter name: position
at Ე.ᾋ.ᾑ(ᾔ Ԩ)
at Ე.ᾋ.Ը(ᾔ Ԩ, ᛧ ᴪ)
at ᝯ.Ӣ.ᲄ(Document ൲, ӣ ᩀ)
at Aspose.Words.Document.UpdatePageLayout()
at Aspose.Words.Document.get_Ӣ()
at Aspose.Words.Document.get_PageCount()
at Aspose.Words.Document.SaveToPdf(String fileName)

Thanks for your request. I managed to reproduce the error. I logged this problem in our defect database as issue #6886. I will notify you as soon as it is fixed.
Remember it is only “rendering engine v1.0”.
Best regards.

Regarding #6886.
The problem is caused by the fact that the very last paragraph of the document is formatted with Hidden font.
You can workaround the problem if you edit the document. Delete the last paragraph and insert a new one instead. Or select the last paragraph, go to Format / Font and uncheck the Hidden checkbox.
A proper fix will be available in the next release.

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

This message was posted using Notification2Forum from Downloads module by alexey.noskov.