I am trying to convert an MS Word document to PDF and i have no problems doing this, until i have hyperlinks within the word document.
Can you please help me… i have attached the MS Word Document and xml file created…
Many Thanks Mark Wakelin
my code is …
Dim doc As New Aspose.Words.Document(sWordDocument)
Dim sNewWordToPDF As String = sWordDocument.Substring(0, Len(sWordDocument) - 3)
doc.Save(sNewWordToPDF & "xml", SaveFormat.AsposePdf)
'Read the document in Aspose.Pdf.Xml format into Aspose.Pdf.
Dim pdf As Aspose.Pdf.Pdf = New Aspose.Pdf.Pdf()
pdf.BindXML(sNewWordToPDF & "xml", Nothing)
pdf.IsImagesInXmlDeleteNeeded = True
'Produce the PDF file.
pdf.Save(sNewWordToPDF & "pdf")
I am able to reproduce this error. Exception seems to be generated from Aspose.Words while creating XML, I am moving this thread to Aspose.Words forum, they will definitely help you out.
I have reproduced the issue and logged as #4388 in our defect database. We’ll investigate it and notify you here in the thread when the problem is solved or some information is available.
As a workaround you can try reinserting hyperlinks in your document. Most probably this is induced by deviations from document format.
After “o” switch if it appears in the field code so named screen tip is expected. Deleting and re-creating this hyperlink from scratch could overcome the issue. Now it is fixed and corrected code will be available with the next hotfix. I’ll consult with my boss whether we can release sooner.