Hello friends,
please give the solutions for this error.
Application threw an exception: Failed to invoke member "ExportAsFixedFormat"--The export failed due to an unexpected error.
[Urgent For you not for us]
code:
using WebSupergoo.ABCpdf8;
using WebSupergoo.ABCpdf8.Atoms;
using WebSupergoo.ABCpdf8.Internal;
using WebSupergoo.ABCpdf8.Objects;
using WebSupergoo.ABCpdf8.Operations;
using System.Drawing;
public void ConvertWordtoPdf()
{
Doc objDoc = new Doc();
objDoc.Read("D:\\User\\Keerthana\\test1.docx");
objDoc.Save("D:\\User\\Keerthana\\Projects\\PDF\\WordDocumentToPdf.pdf");
objDoc.Clear();
objDoc.Dispose();
}
//other method
public void ConvertWordtoPdf()
{
Doc objDoc = new Doc();
XReadOptions xr = new XReadOptions();
xr.ReadModule = ReadModuleType.MSOffice;
objDoc.Read("D:\\User\\Keerthana\\test1.docx", xr);//
this place I got the exception(Application threw an exception: Failed to invoke member "ExportAsFixedFormat"--The export failed due to an unexpected error.)
objDoc.Save("D:\\User\\Keerthana\\Projects\\PDF\\WordDocumentToPdftest.pdf");
objDoc.Clear();
xr.Dispose();
objDoc.Dispose();
objDoc = null;
}
public void ConvertPPTtoPdf()
{
Doc theDoc=new Doc();
//string pathPPT = "D:/User/Keerthana/DSSI_PPT.pptx";
//theDoc.Read(pathPPT);
theDoc.Read("D:\\User\\Keerthana\\DSSI_PPT.pptx");//
exception(Application threw an exception: Failed to invoke member "SaveAs"--Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL)).
)
theDoc.Save("D:\\User\\Keerthana\\Projects\\PDF\\test34.pdf");
theDoc.Clear();
theDoc.Dispose();
}
public void ConvertExceltoPdf()
{
Doc theDoc = new Doc();
theDoc.Read("D:\\User\\Keerthana\\Book1.xlsx");
theDoc.Save("D:\\User\\Keerthana\\Projects\\PDF\\ExcelToPdfDocument.pdf");
theDoc.Clear();
theDoc.Dispose();
}
exception
Application threw an exception: Failed to invoke member "SaveAs"--Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL)).
please any one can help me. I waiting for your reply