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 Mar 03, 2021 9:19 pm

Attached is our code for printing a PDF document to One Note. In debugging we have found that when we try to print the PDF document to a printer that is not the default, the document still is sent to the default printer. It should be noted that for debugging the code below is single threaded. The attachment also shows the QUE for the default printer.

Why is the document going to the default printer rather than the selected printer?

We are using version 4.6.1.2040

dlevitan
 
Posts: 1
Joined: Wed Mar 03, 2021 8:35 pm

Thu Mar 04, 2021 1:44 am

Hello,

Thanks for your inquiry!

Please refer to the following code to set the printer name by the new method, and I can print the PDF document to the One Note printer with the latest Spire.PDF V7.2.9 through this code. If the issue still persists after using the code, I just recommend you use the latest version and try again.
Code: Select all
            string printerName = "OneNote 2013";
            PdfDocument pdf = new PdfDocument();
            pdf.LoadFromFile("E:\\testdoc\\sample.pdf");
            pdf.PrintSettings.PrinterName = printerName;
            pdf.Print();


If the issue still exists, to help us reproduce your issue, please provide us with your input file, your system information (E.g. Win7, 64 bit) and region setting (E.g. China, Chinese) for reference. Thanks in advance.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Mon Mar 22, 2021 8:12 am

Hello,

Hope you are doing well!

How is the issue now? If it still exists, could you please provide your input file, your system information (E.g. Win7, 64 bit) and region setting (E.g. China, Chinese) to us for further investigation?

Thanks in advance.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Return to Spire.PDF

cron