给出下面提到的例外的解决方案 [英] give the solutions for below mentioned exception

查看:226
本文介绍了给出下面提到的例外的解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友您好,





请为此错误提供解决方案。

申请表引发异常:无法调用成员ExportAsFixedFormat - 由于意外错误导致导出失败。



[紧急不适合我们]



代码:

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); // 这个地方我得到了异常(应用程序抛出异常:无法调用成员ExportAsFixedFormat - 由于意外错误导致导出失败。)

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); // 异常(应用程序抛出异常:无法调用成员SaveAs - 未指定错误(HRESULT异常:0x80004005(E_FAIL))。



theDoc.Save(D:\\\ \\ user \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ .Dispose();

}

public void ConvertExceltoPdf()

{



Doc theDoc = new Doc();

theDoc.Read(D:\\User \\Keerthana \\Book1.xlsx);

theDoc.Save(D:\\User \\Keerthana \\Projects \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Doc.Clear();

theDoc.Dispose();

}





例外





应用程序抛出异常:无法调用成员SaveAs - 未指定错误(HRESULT异常:0x80004005(E_FAIL))。







请任何人都可以帮助我。我在等你的回复



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

推荐答案

在这里咨询:



http://www.codeproject.com / Questions / 643240 / convert-word-document-to-pdf-using-abc-pdf-in-dot





或者它可能是担保权问题。在这里咨询:

http://sqlreporting.blogspot.com/2010/11/office-automation-configuraiton-on.html
Consult here:

http://www.codeproject.com/Questions/643240/convert-word-document-to-pdf-using-abc-pdf-in-dot


Or it may be a security rights issue. Consult here:
http://sqlreporting.blogspot.com/2010/11/office-automation-configuraiton-on.html


查看此链接



以PDF格式导出时出现COMException> [ ^ ]


这篇关于给出下面提到的例外的解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆