解决 PDFium 依赖性错误
Google PDFIUM 是 IronPDF 核心代码的一个重要组件,用于各种与 PDF 编辑和转换 PDF 文档为图像相关的功能。 如果项目文件夹中缺少 PDFIUM 二进制文件,运行时会抛出以下错误。
Unhandled exception. IronSoftware.Exceptions.IronSoftwareDeploymentException: Error while deploying Pdfium for IronPdf: 'Unable to locate 'IronPdfInterop'将 IronPDF.Native.PdfModel 包安装到项目中通常可以解决此问题。
在 Windows 上,确保目标操作系统已安装Visual C++ 运行时也是明智的做法。
如果这仍然不能解决问题,怎么办?
如果这无法解决问题,我们会提供帮助。兼容性是我们工程团队的首要任务。 请发送电子邮件错误报告至 support@ironsoftware.com。 所有兼容性问题将由高级工程师认真审查。
请务必告知我们正在部署的操作系统/平台,尤其是像 AWS 或 Azure 这样的云平台。
如何在 IronPDF 中启用本地日志记录
附加日志文件到错误报告中,会使我们能够隔离和快速解决问题的概率翻倍。
将这一行放置在您的代码顶部,在运行任何 IronPDF 方法之前(所有版本在 2021.3.1 之后)。
// Enable debugging to generate detailed log files for troubleshooting.
IronPdf.Logging.Logger.EnableDebugging = true;
// Set the path for the log file. You can specify a directory name or a full file path.
IronPdf.Logging.Logger.LogFilePath = "Default.log";
// Set the logging mode to log all events.
IronPdf.Logging.Logger.LoggingMode = IronPdf.Logging.Logger.LoggingModes.All;// Enable debugging to generate detailed log files for troubleshooting.
IronPdf.Logging.Logger.EnableDebugging = true;
// Set the path for the log file. You can specify a directory name or a full file path.
IronPdf.Logging.Logger.LogFilePath = "Default.log";
// Set the logging mode to log all events.
IronPdf.Logging.Logger.LoggingMode = IronPdf.Logging.Logger.LoggingModes.All;' Enable debugging to generate detailed log files for troubleshooting.
IronPdf.Logging.Logger.EnableDebugging = True
' Set the path for the log file. You can specify a directory name or a full file path.
IronPdf.Logging.Logger.LogFilePath = "Default.log"
' Set the logging mode to log all events.
IronPdf.Logging.Logger.LoggingMode = IronPdf.Logging.Logger.LoggingModes.AllIronPDF 生成的日志文件位于项目的 /bin 目录中,您的 DLL 部署在其中:
default.log(部署过程)cef.log(渲染)IronSoftwareCefSubprocess.log(渲染与线程)IronSoftwareEngine.log(对调试以"从...生成 PDF 时出错"开头的异常非常有用)






