首页 > 解决方案 > 使用 .net 应用程序将 .indd 文档转换为 PDF

问题描述

我开发了一个 .net 应用程序来将多个 InDesign 文档转换为 pdf ......
这里在将 indd 文档转换为 pdf 时出现错误......
我的错误是
错误 CS0103: The name 'idExportFormat' does not exist in the当前上下文
错误 CS0103:名称“objInDesign”在当前上下文中不存在
错误 CS1061: “字符串”不包含“导出”的定义,并且没有扩展方法“导出”接受“字符串”类型的第一个参数找到(您是否缺少 using 指令或程序集引用?)
我使用的代码是

if (rb_indesigndoc.Checked == true)
{
MessageBox.Show("InDesign document","Toolkit");
string[] fileEntries = Directory.GetFiles(sourcefolderBrowserDialog.SelectedPath, "*.indd");
if (fileEntries.Length > 0)
{
MessageBox.Show("indesign douments found", "Doument found toolkit");
foreach (string file in fileEntries)
{
string filename = System.IO.Path.GetFileName(file);
string[] docname = filename.Split('.');
string doc = docname[0];
string cstrOutputFile = txt_destinationpath.Text.ToString() + "\\" + doc + ".pdf";
doc.Export(idExportFormat.idPDFType, cstrOutputFile, false, objInDesign.PDFExportPresets["[High Quality Print]"]);
}
}
}

但是在包含此行以导出上述错误时,会发生....
该行是

doc.Export(idExportFormat.idPDFType, cstrOutputFile, false, objInDesign.PDFExportPresets["[High Quality Print]"]);

我想做的事??????????????

标签: c#.netasp.net-mvcc#-4.0pdf-generation

解决方案


推荐阅读