IRONSOFTWAREHOME
指定打印机名称
using IronPrint;

// Route the print job to a specific printer
var settings = new PrintSettings();
settings.PrinterName = "Microsoft Print to PDF";

Printer.Print("invoice.pdf", settings);
Imports IronPrint

' Route the print job to a specific printer
Dim settings As New PrintSettings()
settings.PrinterName = "Microsoft Print to PDF"

Printer.Print("invoice.pdf", settings)
NuGet Download
PM > Install-Package IronPrint
指定打印机名称

指定打印机名称

PrinterName属性以将打印作业定向到特定打印机而不是系统默认值。 该值必须匹配Printer.GetPrinterNames()返回的名称之一,例如网络打印机的共享名称或虚拟打印机如"Microsoft Print to PDF"。

这在拥有多台打印机的环境中尤为有用——例如,将发票发送到专用的账单打印机,同时将发货标签发送到标签打印机。 请注意,如果您还使用了ShowPrintDialog,对话框中选择的打印机将覆盖此设置。

请遵循《指定打印机名称的分步指南》

准备开始了吗?

Nuget Downloads 46,090版本:2026.9刚刚发布

Key in blue circle

立即获取免费的 30 天试用版密钥

Your trial license will be sent to your email address

无任何限制。100% 解锁。无需信用卡。

bullet_checked无需信用卡或创建账户无任何限制。100% 解锁。无需信用卡。
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
预约您的免费现场演示
Booking Badge

深受全球数百万工程师信赖

Iron Software 的客户徽标
获取您的无义务咨询
填写下面的表格或通过sales@ironsoftware.com
您的资料将始终保密。
深受全球数百万工程师信赖
Iron Software 的客户徽标
立即获取您的免费30 天试用密钥
无需信用卡或创建账户