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

Sun Sep 21, 2014 1:42 pm

When method PdfViewer.Print() is calling PrintDialog always appears.
I tried to set writeonly property PdfViewer.PrintDialog before printing, but with no success.
When I want to print many pdf documents I want to set PrintDialog only once.
What should I do ? I use wpf version of PdfViewer therfore I can't test PdfDocumentViewer.Print() method. It's only in PdfViewer.Forms Namespace. Interesting, PdfDocumentViewer for wpf hasn't Print() method but has PrintDialog writeonly property.

makkos48
 
Posts: 1
Joined: Tue Dec 10, 2013 2:52 pm

Mon Sep 22, 2014 3:22 am

Hello,

Sorry for late reply as weekend.
Please print via PdfViewer without invoking PrintDialog with the following method.
Code: Select all
PrintDialog dialog = new PrintDialog();
this.pdfViewer1.PrintDialog = dialog;
dialog.PrintDocument(pdfViewer1.PrintDocument.DocumentPaginator, "Print Document");

Please use the following method to print with PdfDocumentViewer.
Code: Select all
PrintDialog dialog = new PrintDialog();
this.pdfDocumentViewer1.PrintDialog = dialog;
dialog.PrintDocument(pdfDocumentViewer1.PrintDocument.DocumentPaginator, "Print Document");

If there are any questions, welcome to get it back to us.
Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Return to Spire.PDFViewer

cron