PdfDocumentPrint Method (Int32, String, String, Boolean)

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

For even more advanced real-world printing options please see overloads of this method and also GetPrintDocument.

the horizontal and vertical PDF resolutions, in dots per inch. if -1 print with default printer resolution. Default value is -1.the name of a printer, set or an empty string ("") to use default print. 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. Default value is .

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

Parameters

dpi
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