Spire.PDFViewer is a powerful PDF Viewer component for .NET. It allows developers to load PDF document from stream, file and byte array.

Thu Oct 28, 2021 12:55 pm

I want to set the printer via Printsettings, but this is not possible:
PdfDocumentViewer1.PrintSettings.PrinterName = .PrinterSettings.PrinterName
I copied form a demo, but the Property is shown as Readonly... !?
Can someone give me a hint please.
Thanks

ralfmayr65
 
Posts: 1
Joined: Wed Oct 27, 2021 12:02 pm

Fri Oct 29, 2021 3:59 am

Hello,

Thank you for your inquiry.
Please refer to the following code to set the printer name through Spire.PDFViewer. If there are any questions, please feel free to contact us.
Code: Select all
 if (this.pdfDocumentViewer1.PageCount > 0)
 {
     //set the printer Name
     this.pdfDocumentViewer1.PrintSettings.PrinterName = "PrinterName";
     this.pdfDocumentViewer1.PrintDoc();
 }

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1643
Joined: Wed Apr 07, 2021 2:50 am

Thu Nov 04, 2021 9:35 am

Hello,

Hope you are doing well!
How is your issue going? Did the code we provided work for you? Any feedback will be greatly appreciated.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1643
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.PDFViewer