C# 使用.net应用程序将.indd文档转换为PDF

C# 使用.net应用程序将.indd文档转换为PDF,c#,.net,asp.net-mvc,c#-4.0,pdf-generation,C#,.net,Asp.net Mvc,C# 4.0,Pdf Generation,我开发了一个.net应用程序,可以将多个InDesign文档转换为pdf…… 将indd文档转换为pdf时出现错误… 我的错误是 错误CS0103:当前上下文中不存在名称“idExportFormat” 错误CS0103:当前上下文中不存在名称“objInDesign” 错误CS1061:“字符串”不包含“导出”的定义,并且找不到接受“字符串”类型的第一个参数的扩展方法“导出”(是否缺少using指令或程序集引用? 我使用的代码是 if (rb_indesigndoc.Checked == tr

我开发了一个.net应用程序,可以将多个InDesign文档转换为pdf……
将indd文档转换为pdf时出现错误…
我的错误是
错误CS0103:当前上下文中不存在名称“idExportFormat”
错误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]"]);

我想做什么?????

在哪里定义了
idExportFormat
objInDesign
?显示的代码确实显示了这一点。另外,
doc
是一个
字符串
,因此没有
导出
方法。看来你想用一些图书馆。你在学什么教程吗?是的!你的权利。。。。。现在我正试图避免这些库,通过避免这些库,我怎样才能生成pdf??????