解决 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./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.All
IronPDF 生成的日志文件位于项目中部署 DLL 的 /bin 目录下:
default.log(部署流程)cef.log(渲染)IronSoftwareCefSubprocess.log(渲染与多线程)IronSoftwareEngine.log(适用于调试以"Error generating PDF from..."开头的异常)

