PdfDocumentPrint Method (Int32, Int32, String, String, Boolean)

Prints this PDF by sending it to the computer's printer.

For advanced real-world printing options please see GetPrintDocument.

the horizontal PDF resolution, in dots per inch.the vertical PDF resolution, in dots per inch.the name of a printer, set or an empty string ("") to use default print. The default value is .the file path, when printing to a file, set or an empty string ("") for printing output is sent to a port instead of the filePath. The default value is .if print preview dialogs will be displayed to the user. The default value is .

Namespace:  IronPdf
Assembly:  IronPdf (in IronPdf.dll) Version: 2020.7.1
Syntax
public int Print(
	int dpiX,
	int dpiY,
	string printerName = null,
	string filePath = null,
	bool showPreview = false
)

Parameters

dpiX
Type: SystemInt32
dpiY
Type: SystemInt32
printerName (Optional)
Type: SystemString
filePath (Optional)
Type: SystemString
showPreview (Optional)
Type: SystemBoolean

Return Value

Type: Int32
The number of printed pages.
See Also
Download DLL or Install with Nuget