尝试使用ABCpdf将Doc文件转换为PDF:
using (Doc objDoc = new Doc())
using (XReadOptions xr = new XReadOptions())
{
xr.ReadModule = ReadModuleType.MSOffice;
objDoc.Read(@"C:\Code\Website\App_Data\ContentRepository\0\6\10\test.doc", xr);
objDoc.Save(@"C:\Code\Website\App_Data\ContentRepository\0\6\10\test.pdf");
objDoc.Clear();
}
我收到以下异常
Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: path1
[ArgumentNullException: Value cannot be null.
Parameter name: path1]
System.IO.Path.Combine(String path1, String path2) +14696197
WebSupergoo.ABCpdf8.Internal.WordApplication..ctor(Options bootOpts) +149
WebSupergoo.ABCpdf8.Internal.MSOfficeApplicationPool.GetWord() +140
WebSupergoo.ABCpdf8.Internal.MSOfficeApplicationPool.GetAppForFile(String path) +206
WebSupergoo.ABCpdf8.Internal.MSOfficeDetails.Importer.ImportImplExportFromApp(Doc doc, String path, XReadOptions opts) +208
WebSupergoo.ABCpdf8.Internal.MSOfficeDetails.Importer.Import(Doc doc, String path, XReadOptions opts) +239
WebSupergoo.ABCpdf8.XReadOptions.Read(Doc doc, String path, ReadModuleType module) +318
WebSupergoo.ABCpdf8.XReadOptions.Read(Doc doc, String path) +68
我在这里缺少什么?