Hello,
I am using the latest version of Aspose.Words for the .NET framework. I have an ASP.NET web application that allows a user to upload a document (in Word 2003 or Word 2007 format) and the web application utilizes Aspose.Words to convert it to PDF. Most of the users have no problems uploading and converting their documents but one particular document seems to cause an error. This document is attached to this post.
The code snippet that causes this error is below:
'******************************************
Dim FileNM As String = "\\lax-sp3\WebApps\Template\" & OutPutFNAME & ".pdf"
Dim pathN as string = "\\lax-sp3\WebApps\Template\doc" & FNameSeed & ".doc"
'create PDF if uploaded file is a word doc
If IsWordDoc = True Then
Dim Doc As New Aspose.Words.Document(pathN)
Doc.SaveToPdf(FileNM) 'Line that throws unexpected underline type exception
End If
'******************************************
The error thrown is “System.InvalidOperationException: Unexpected underline type” I have included a stack trace below
[InvalidOperationException: Unexpected underline type.]
╨.䃝.䃼(Font न) +333
╨.䃝.䃻(䃿 㵚) +116
╨.䃐.䃖(䃿 㵚) +68
╨.䃇.䃊(䃿 㵚) +365
╨.䂣.䃀(䃿 㵚) +49
╨.䂣.䂭(䄏 㵚) +36
╨.䅱.㵙(䄏 㵚) +11
ᡒ.䄏.᱕(㵆 Վ) +12
ᡒ.䄌.᱕(㵆 Վ) +239
ᡒ.㴯.᱕(㵆 Վ) +112
ᡒ.䅯.᱕(㵆 Վ) +120
ᡒ.䅬.᱕(㵆 Վ) +175
ᡒ.㵠.᱕(㵆 Վ) +661
╨.䅱.(㵠 䅻, ӟ 䄗) +226
Aspose.Words.Document.SaveToPdf(Int32 pageIndex, Int32 pageCount, Stream stream, PdfOptions options) +476
Aspose.Words.Document.SaveToPdf(Int32 pageIndex, Int32 pageCount, String fileName, PdfOptions options) +102
Aspose.Words.Document.SaveToPdf(String fileName) +53
_Default.btnParse_Click(Object sender, EventArgs e) in E:\WebApps\Template\Default.aspx.vb:80
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
Thanks,
Matt Updike