解決 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;IronPDF 產生的日誌檔案位於專案/bin目錄中,也就是 DLL 檔案部署所在的目錄:
default.log(部署流程)cef.log(渲染)IronSoftwareCefSubprocess.log(渲染和線程)IronSoftwareEngine.log(用於偵錯以"從...產生 PDF 時出錯"開頭的異常)






