- Code: Select all
Line 271: document.LoadFromFile(DocFile);
Line 272: string temppd = HttpContext.Current.Server.MapPath(string.Format(@"~/Documents/{0}.pdf", Guid.NewGuid().ToString()));
Line 273: document.SaveToFile(temppd, Spire.Doc.FileFormat.PDF);
Line 274: document.Close();
System.Runtime.InteropServices.ExternalException: 'A generic error occurred in GDI+.'
System.Runtime.InteropServices.ExternalException
HResult=0x80004005
Message=A generic error occurred in GDI+.
Source=Spire.Doc
StackTrace:
at spr5584.0(String A_0, Font A_1, StringFormat A_2)
at spr5584.1(String A_0, Font A_1, StringFormat A_2)
at spr5584.0(TextRange A_0, spr5354 A_1, StringFormat A_2, String& A_3)
at spr5584.0(TextRange A_0, spr5354 A_1, String& A_2)
at spr5584.0(TextRange A_0, spr5354 A_1, String A_2)
at Spire.Doc.Fields.TextRange.Spire.Doc.Layout.IStringWidget.Draw(spr5584 dc, spr5354 ltWidget, String text)
at Spire.Doc.Fields.TextRange.Spire.Doc.Layout.IDocumentBase.Draw(spr5584 dc, spr5354 ltWidget)
at spr5354.1(spr5584 A_0)
at spr5354.1(spr5584 A_0)
at spr5354.1(spr5584 A_0)
at spr5354.1(spr5584 A_0)
at spr5354.1(spr5584 A_0)
at spr13072.2(spr5584 A_0)
at spr6400.0(Int32 A_0, Int32 A_1, ImageType A_2, MemoryStream A_3, Boolean A_4, Boolean A_5, Boolean A_6)
at spr7293.0(spr6400 A_0)
at spr7293.0(Document A_0)
at Spire.Doc.Document.3(String A_0)
at Spire.Doc.Document.SaveToFile(String fileName, FileFormat fileFormat)
at SpireDoc.ExportPO(Int32 FormID, Int32 FormType, Boolean NoTurn) in C:\Users\TOZU\source\Workspaces\NovoPO\NovoPO\Helper\SpireDoc.cs:line 273
at MailOps.FormSent4Close(Int32 FormID, Int32 xFormType, String ActionType) in C:\Users\TOZU\source\Workspaces\NovoPO\NovoPO\Helper\MailOps.cs:line 160
at PO_Form.BtnSend2SmartClose_Click(Object sender, EventArgs e) in C:\Users\TOZU\source\Workspaces\NovoPO\NovoPO\Pages\PO_Form.aspx.cs:line 1101
Thanks in advance
Taner