Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Wed Jun 27, 2018 11:49 am

Hi,

I'm evaluating Spire PDF as I have a Windows service that needs to print PDFs. I've written a simple console app to test loading and printing a PDF which works fine. However, when printing it displays a dialog saying which page it's got to. How can I suppress this dialog as this will be printing through a Windows service? Or, is there another way I can do this?

Thanks.
Haydn

hrp
 
Posts: 3
Joined: Wed Jun 27, 2018 11:38 am

Thu Jun 28, 2018 1:56 am

Hello Haydn,

Thank you for your post.
Please download the (Spire.PDF Pack(Hot Fix) Version:4.6.8)and use the below code to accomplish your task.
Code: Select all
Spire.Pdf.PdfDocument doc = new Spire.Pdf.PdfDocument();
doc.LoadFromFile(FileName);
doc.PrintSettings.PrintController = new StandardPrintController();
doc.Print();


Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Return to Spire.PDF