從網路印表機列印
如何使用 IronPDF 從網路印表機列印?
IronPDF 支援 C# 可用的所有列印選項。
發送到默認印表機:
- https://ironpdf.com/object-reference/api/IronPdf.PdfDocument.html#IronPdf_PdfDocument_Print_System_Boolean_
發送到指定的打印機: https://ironpdf.com/object-reference/api/IronPdf.PdfDocument.html#IronPdf_PdfDocument_Print_System_String_System_Boolean_
在這種情況下,打印機首先需要被“發現”:
- https://docs.microsoft.com/en-us/dotnet/api/system.drawing.printing.printersettings.installedprinters?redirectedfrom=MSDN&view=net-5.0#System_Drawing_Printing_PrinterSettings_InstalledPrinters https://stackoverflow.com/questions/2354435/how-to-get-the-list-of-all-printers-in-computer
對於AirPrint,請嘗試以下建議:
嘗試不同的驅動程序。
- https://stackoverflow.com/questions/26734405/airprint-printing-a-pdf-file-directly-to-the-printer
- https://stackoverflow.com/questions/46381133/how-to-fake-an-airprint-printer
你也可以試試:
PdfDocument.GetPrintDocument() 或 PdfDocument.Print 方法過載,它會顯示列印預覽視窗,如果可用,將允許選擇 AirPrint。