IRONSOFTWAREHOME
紙本列印 PDF
using IronPdf;

// Create a new PDF and print it
var renderer = new ChromePdfRenderer();
PdfDocument pdf = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf");

// Send the PDF to the default printer to print
// 300 DPI, no user dialog this time ... many overloads to this method
pdf.Print(300);

//For advanced printing we can also use PdfDocument.GetPrintDocument
//Remember to add an assembly reference to System.Drawing.dll or System.Drawing.Common via NuGet.

System.Drawing.Printing.PrintDocument printDocYouCanWorkWith = pdf.GetPrintDocument();
Imports IronPdf

' Create a new PDF and print it
Dim renderer As New ChromePdfRenderer()
Dim pdf As PdfDocument = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf")

' Send the PDF to the default printer to print
' 300 DPI, no user dialog this time ... many overloads to this method
pdf.Print(300)

'For advanced printing we can also use PdfDocument.GetPrintDocument
'Remember to add an assembly reference to System.Drawing.dll or System.Drawing.Common via NuGet.

Dim printDocYouCanWorkWith As System.Drawing.Printing.PrintDocument = pdf.GetPrintDocument()
NuGet Download
PM > Install-Package IronPdf
紙本列印 PDF

紙本列印 PDF

上述的程式碼片段示範瞭如何使用IronPdf程式庫在.NET中列印PDF文件。 它包括使用Windows預設列印對話框或靜默列印的選項,並展示如何利用本機PrintDocument物件進行更高級的列印配置。 如果您使用System.Drawing.dll的參考。

探索IronPDF的高級列印技術
在 GitHub 上查看

準備開始了嗎?

Nuget Downloads 21,105,021版本:2026.9剛剛發布

Key in blue circle

立即免費取得 30 天試用金鑰。

Your trial license will be sent to your email address

無任何限制。100% 解鎖。無需信用卡。

OR
bullet_checked無需信用卡或建立帳號無任何限制。100% 解鎖。無需信用卡。
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried Iron Suite
預訂您的免費現場演示
Booking Badge

受到全球數百萬工程師的信任

Iron Software的客戶標誌
獲取您的無義務諮詢
填寫以下表格或電子郵件sales@ironsoftware.com
您的詳細資訊將始終保密。
受到全球數百萬工程師的信任
Iron Software的客戶標誌
立即獲取您的30天試用金鑰。
無需信用卡或帳戶建立
C# 用於PDF的NuGet程式庫
使用NuGet安裝

版本: 2026.9

PM > Install-Package IronPdf
nuget.org/packages/IronPdf/
  1. 在解決方案資源管理器,右鍵點選參考,管理NuGet包
  2. 選擇瀏覽並搜尋"IronPdf"
  3. 選擇套件並安裝
C# PDF DLL
下載DLL

版本: 2026.9

或者點擊此處下載Windows安裝程式。

  1. 下載並解壓IronPDF到類似~/Libs的位置,位於您的解決方案目錄中
  2. 在Visual Studio解決方案資源管理器,右鍵點選參考。選擇瀏覽,"IronPdf.dll"

授權從$999起