在 Windows 上使用 IronPDF for .NET
IronPDF 支援 Windows 10、11 和 Windows Server,用於 .NET 8、7、6、Core、.NET Standard 和 .NET Framework。
Windows Server的重要注意事項
我們支援Windows Server 2022 和 2016的桌面體驗和核心變體,然而僅支援 2019 和 2012 的桌面體驗版本。
Windows Server 2022 & 2016
- Windows Server 2022 & 2016 具有 UI(「桌面體驗」)
Windows Server 2022 & 2016 僅命令行版本 ("Core")。
Windows Server 2019 & 2012
- Windows Server 2019 及 2012,具有使用者介面(「桌面体驗」)
- Windows Server 2019 和 2012 僅限命令行("Core")。 IronPDF 版本 2023.3.2 - 2024.2.2 不兼容 Windows Server 2012。 我們正在努力支持Windows Server的Core和Nano版本。 操作系統架構沒有阻擋我們的支援。 這可能是因為Chromium(Chrome Renderer)需要的媒體/圖形DLL來將HTML轉換為PDF,這些DLL存在於Windows Server的「桌面」版本中,但在精簡版中缺失。 此外,由於Windows Nano Server是Windows Server Core的精簡版本,一旦我們完全支持Windows Server Core,我們將考慮支持Windows Nano Server。 Windows Nano Server / Servercore 在 .Net6 中不支持 System.Drawing https://ironpdf.com/troubleshooting/libcef-dll-203/
如果您的 Windows 版本不受支持,請考慮使用引擎模式中的 IronPDF。
請注意
IronPDF 有一些性能密集的功能,您可以选择遠程執行。 雖然IronPDF不需要IronPdfEngine來運行,但將IronPdfEngine設置為遠程服務是一種可選的方法,可以避免在舊操作系統和移動環境上發生特定平台的Chrome兼容性問題。
使用 Engine 如何改變我使用 IronPDF 編碼的方式?
這將允許您使用較舊版本的 Windows,例如 Windows Server 2012。
在使用引擎配置時,我們建議從 NuGet 安裝 IronPdf.Slim
而不是完整的 IronPdf
套件,因為引擎會管理原生套件中包含的所有額外負擔。
PM> Install-Package IronPdf.Slim
安裝IronPdf.Slim
後,將 IronPDF 指向您的 IronPdfEngine 實例來配置連接設置。 在您的應用程式啟動時(或在呼叫任何 IronPDF 方法之前)添加以下程式碼:
// Assuming that IronPdfEngine runs
// remotely at 123.456.7.8:33350.
Installation.ConnectToIronPdfHost( IronPdf.GrpcLayer.IronPdfConnectionConfiguration.RemoteServer("123.456.7.8:33350"));
// Assuming that IronPdfEngine runs
// remotely at 123.456.7.8:33350.
Installation.ConnectToIronPdfHost( IronPdf.GrpcLayer.IronPdfConnectionConfiguration.RemoteServer("123.456.7.8:33350"));
' Assuming that IronPdfEngine runs
' remotely at 123.456.7.8:33350.
Installation.ConnectToIronPdfHost(IronPdf.GrpcLayer.IronPdfConnectionConfiguration.RemoteServer("123.456.7.8:33350"))
Windows Server 標準版與資料中心版
根據Microsoft文檔中指出的差異「Windows Server 2016標準版與資料中心版的比較」,Windows Server DataCenter 包含 Windows Server Standard 的所有組件,並附加了更多的存儲增強組件。 IronPdf 也可以在 Windows Server DataCenter Desktop Experience 上運行。
Windows 專用安裝
NuGet
主要的IronPdf NuGet套件依賴於IronPdf.Native.Chrome.Windows,其中包含Chrome二進位文件,適用於x86及x64架構。
IronPdf 套件支持 x86 和 x46 Windows 架構。
如果目標是特定的運行時,您可以刪除未使用的 /runtimes 資料夾(x86 或 x64)。
DLL 下載
對於離線使用,您可以下載 DLL 並將其添加到您的專案中。
安裝程式
我們也提供適用於 Windows 的安裝程式。 在 Visual Studio 的解決方案總管中,右鍵點擊依賴項,然後選擇「新增專案參考」。 然後,點擊瀏覽並包含從安裝程序中提取的所有DLL文件。
- IronPdfInstaller.zip
硬體規格
IronPDF 使用 Chromium 將 HTML 渲染為 PDF。 Chromium 引擎以像素完美的方式渲染 PDF,與 Chrome 的列印功能相同。 硬體規格主要用於運行 Chromium 引擎,這佔用了大部分的計算能力。
- 最低配置:1 核心及 1.75 GB RAM
- 推薦配置:2核心及8GB RAM或以上。