在 Windows 上使用 IronPDF for .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English

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
  • 僅限 Windows Server 2022 和 2016 命令列("核心")。

Windows Server 2019 與 2012

  • 具有使用者介面("桌面體驗")的 Windows Server 2019 和 2012
  • 僅限 Windows Server 2019 和 2012 命令列("核心")。

IronPDF 版本 2023.3.2 - 2024.2.2 與 Window Server 2012 不相容。

我們正在努力支援 Windows Server 的核心版和 Nano 版。 作業系統架構本身並不存在阻礙我們提供支援的問題。 這可能是由於 Chromium(Chrome 渲染器)需要媒體/圖形 DLL 來將 HTML 渲染成 PDF,這些 DLL 存在於 Windows Server 的"桌面"版本中,但在精簡版中卻缺失。

此外,由於 Windows Nano Server 是 Windows Server Core 的精簡版,一旦我們完全支援 Windows Server Core,我們將考慮支援 Windows Nano Server。

Windows Nano Server / Server Core 在 .NET 6 中不支援 System.Drawing。
更多詳情

如果您的 Windows 版本不受支持,請考慮使用 IronPDF 的引擎模式。

Native 和 Engine 有什麼不同?

IronPDF 有一些對效能要求很高的功能,您可以選擇遠端執行這些功能。 雖然 IronPDF 不需要 IronPdfEngine 即可運行,但將 IronPdfEngine 設定為遠端服務是一種可選方法,可以避免在較舊的作業系統和行動環境中出現特定於平台的 Chrome 相容性問題。

使用 Engine 會如何改變我使用 IronPDF 編寫程式碼的方式?

這樣您就可以使用舊版的 Windows,例如 Windows Server 2012。

使用引擎配置時,我們建議安裝IronPdf.Slim而不是從 NuGet 安裝完整的IronPdf套件,因為引擎會管理 Native 套件中包含的所有額外體積。

# Install the IronPdf.Slim package using Package Manager Console
:InstallCmd Install-Package IronPdf.Slim
# Install the IronPdf.Slim package using Package Manager Console
:InstallCmd Install-Package IronPdf.Slim
SHELL

安裝IronPdf.Slim後,透過將 IronPDF 指向您的 IronPdfEngine 實例來配置連線設定。 在應用程式啟動時(或在呼叫任何 IronPDF 方法之前)新增以下程式碼:

// Configure IronPDF to connect to the remote IronPdfEngine instance
// Replace "123.456.7.8:33350" with the actual remote host and port
Installation.ConnectToIronPdfHost(IronPdf.GrpcLayer.IronPdfConnectionConfiguration.RemoteServer("123.456.7.8:33350"));
// Configure IronPDF to connect to the remote IronPdfEngine instance
// Replace "123.456.7.8:33350" with the actual remote host and port
Installation.ConnectToIronPdfHost(IronPdf.GrpcLayer.IronPdfConnectionConfiguration.RemoteServer("123.456.7.8:33350"));
' Configure IronPDF to connect to the remote IronPdfEngine instance
' Replace "123.456.7.8:33350" with the actual remote host and port
Installation.ConnectToIronPdfHost(IronPdf.GrpcLayer.IronPdfConnectionConfiguration.RemoteServer("123.456.7.8:33350"))
$vbLabelText   $csharpLabel

Windows Server 標準版與資料中心版

根據微軟文件" Windows Server 2016 標準版和資料中心版比較"中強調的差異,Windows Server 資料中心版包含 Windows Server 標準版的所有元件,以及額外的儲存增強元件。 IronPdf 也適用於 Windows Server DataCenter Desktop Experience。

Windows 特定安裝

NuGet

IronPDF NuGet 主套件依賴IronPDF.Native.Chrome.Windows ,其中包含適用於 x86 和 x64 架構的 Chrome 二進位。

IronPDF軟體包支援x86和x64 Windows架構。

如果目標是特定的運行時,您可以刪除未使用的 /runtimes 資料夾(x86 或 x64)。

DLL 下載

對於離線使用,您可以下載 DLL 並在您的專案中添加引用。

下載 IronPDF.zip

Installer

我們也提供Windows安裝程式。 在 Visual Studio 解決方案資源管理器中,以滑鼠右鍵按一下"依賴項",然後選擇"新增專案參考"。 然後,按一下"瀏覽",並將從安裝程式中提取的所有 DLL 檔案都包含在內。

-下載 IronPdfInstaller.zip

硬體規格

IronPDF 使用 Chromium 將 HTML 渲染成 PDF。 Chromium 引擎能夠以像素級的精確度渲染 PDF 文件,類似於 Chrome 的列印功能。 硬體規格主要是為了運行 Chromium 引擎,該引擎會佔用大部分運算能力。

最低配置:單核心處理器和 1.75 GB 內存 -建議配置:雙核心處理器和 8GB 記憶體或以上

常見問題解答

哪些 Windows 版本與 PDF 工具相容?

IronPdf 在桌面體驗模式下支援 Windows 10、11 以及 Windows Server 2022、2016、2019 和 2012 版本。但是,在 Core 模式下不支援 Windows Server 2019 和 2012。

如何在不支援的 Windows 版本上處理 PDF 任務?

對於不支援的 Windows 版本,您可以在引擎模式下使用 IronPDF。這可讓您繞過特定平台的相容性問題,遠端處理效能密集的功能。

運行 IronPDF 有特定的硬體需求嗎?

是的,由於 IronPDF 依賴 Chromium 引擎進行渲染,因此最低要求為 1 Core 和 1.75 GB RAM,而建議規格為 2 Core 和 8 GB RAM 或以上。

IronPdf 可以離線使用嗎?

是的,IronPDF 可以離線使用,只要下載 DLL 並將其加入專案中作為參考即可。Windows 下也有安裝程式,方便離線使用。

在引擎模式下設定 IronPDF 的流程為何?

要在引擎模式下設定 IronPDF,請從 NuGet 安裝「IronPdf.Slim」套件,使用提供的程式碼設定連線設定,將 IronPDF 指向您的 IronPdfEngine 實例,並連線至遠端主機。

為什麼 Windows Nano Server 可能會有相容性問題?

由於缺少 Chromium 引擎所需的媒體/圖形 DLL,Windows Nano Server 不支援 IronPDF。不過,Windows Server Core 的支援正在開發中,未來可能會延伸至 Nano Server。

PDF 工具需要哪些 NuGet 套件?

主要的 IronPDF NuGet 套件依賴於 IronPdf.Native.Chrome.Windows,其中包含 x86 和 x64 架構所需的 Chrome 二進位檔。

IronPDF 如何利用 Chromium 進行渲染?

IronPdf 使用 Chrome 引擎將 HTML 繪製成 PDF,確保像素級的精確度,類似 Chrome 的列印功能。這個過程需要相當大的運算能力,因此硬體規格也相當高。

Curtis Chau
技術作家

Curtis Chau 擁有卡爾頓大學計算機科學學士學位,專注於前端開發,擅長於 Node.js、TypeScript、JavaScript 和 React。Curtis 熱衷於創建直觀且美觀的用戶界面,喜歡使用現代框架並打造結構良好、視覺吸引人的手冊。

除了開發之外,Curtis 對物聯網 (IoT) 有著濃厚的興趣,探索將硬體和軟體結合的創新方式。在閒暇時間,他喜愛遊戲並構建 Discord 機器人,結合科技與創意的樂趣。

準備好開始了嗎?
Nuget 下載 16,685,821 | 版本: 2025.12 剛發表