We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Platform: WinForms |
Control: PdfViewer |
Published Date: May 9, 2018 |
Last Revised Date: July 9, 2021

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

 

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile