c# - 使用 .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]"]);
我想做的事??????????????
解决方案
推荐阅读
- php - 我应该如何让 Xdebug 只运行 CLI php 而不是 UI
- opencl - 定义 $OPEN_CL_LIB 时遇到问题。我怎样才能做到这一点?
- r - Google Colab 上 R-Keras 的工作流程
- hyperledger-fabric - 如何使用 nodejs SDK 为超级账本结构网络添加新组织
- r - 如何在 mutate() 中简化 case_when()
- java - 如何将命令行参数传递给 Maven 程序的执行?
- javascript - Testcafe Hover 和 jQuery :hover-selector
- java - 如何在Junit的spring boot中访问用@Mock初始化的静态变量
- python - 仅在同一天内重新采样
- node.js - 请求 JS 没有给出响应