i have a problem with exporting to pdf, explain better:
1- document.LoadFromFile(physicalPath + @"\doc\document.docx");
2- I make various replace, including:
- Code: Select all
if ((txt_email_address.Value != "") && (txt_email_address.Value != null))
document.Replace("#oakley3", txt_email_address.Value, false, true);
else
document.Replace("#oakley3", "*** Missing field ***", false, true);
3- Finally, I make an export of the document in pdf and word
- Code: Select all
document.SaveToFile(HostingEnvironment.MapPath("~/contracts/" + bg.group_id.ToString() + "/" + nome_file + ".pdf"), FileFormat.PDF);
document.SaveToFile(HostingEnvironment.MapPath("~/contracts/" + bg.group_id.ToString() + "/" + nome_file + ".docx"), FileFormat.Docx2010);
Everything works fine except when i replace the following email address: optiekkaspers@optiekkaspers.demon.nl at point 2 , because the system crashes (see attached file).
I realized that the system goes into error only with the export to PDF, export to word instead work properly. Why?
Version of Spire.PDF: 2.6.60.3040
Thanks