Articles in this section
Category / Section

How to silent print the PDF document using PDF Viewer in Console Application

1 min read

You can print a PDF document using the WinForms PDF Viewer reference in a Console Application without showing the Print Dialog box using the code snippet below,

//Load the PDF document
PdfLoadedDocument ldoc = new PdfLoadedDocument(@"..\..\Data\F# Succinctly.pdf");
PdfViewerControl viewer = new PdfViewerControl();
//Load the PDFLoadedDocument in PDF viewer control
viewer.Load(ldoc);
Console.WriteLine("Printing started...");
//Silent printing the PDF document using the PDF viewer control
viewer.Print(false);
Console.WriteLine("Printing is done…");

 

The sample for the same is shared in the following location,

https://www.syncfusion.com/downloads/support/directtrac/general/ze/PdfViewerWinforms1972059104

 

See Also:

Printing PDF Files in WinForms

PDF Viewer User Guide

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied