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

Wed Dec 28, 2022 5:58 pm

When user click in button print the print dialog not show before.
How can I show the print dialog when click in button print?

marsenne
 
Posts: 8
Joined: Sat Feb 10, 2018 8:22 am

Thu Dec 29, 2022 9:30 am

Hello,

Thanks for your inquiry.
Are you using PdfViewer Control? If so, I suggest you use PdfDocumentViewer Control, due to the PdfViewer Control is an integral control, you can’t customize the internal logic, however, you can customize PdfDocumentViewer Control according to your requirements.

For your two requirements of setting filename when clicking save button and showing Print Dialogo when click print button, I created a demo project with PdfDocumentViewer Control for your reference, you can click the following link to download it and have a test.
Code: Select all
https://www.e-iceblue.com/downloads/demo/31901Demo.zip


For more information on how to use PdfDocumentViewer Control, you can refer to the following help document:
Code: Select all
https://www.e-iceblue.com/Tutorials/Spire.PDFViewer/Program-Guide.html

If you have any issue, just feel free to contact us.

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Thu Dec 29, 2022 1:14 pm

Thank you for the answer.
But, I use the Spire.PdfView.Forms.PdfView control itself.
I manage to hide the entire toolbar (IsToolBarVisible).
I need to know if it is possible to disabled only the save and print buttons.

marsenne
 
Posts: 8
Joined: Sat Feb 10, 2018 8:22 am

Fri Dec 30, 2022 6:25 am

Hello,

Thanks for your feedback.
Please kindly notice that Spire.PdfViewer includes two controls(pdfDocumentViewer Control and PdfVewer Control), the two controls can achieve the same functionality, the difference between them is that PdfViewer Control is a whole and its toolbar can’t be customized and which internal logic code can’t be modified, while the toolbar of PdfDocumentViewer Control is can be customized according to your requirements.

In addition, for how to use pdfDocumentViewer Control to achieve “save” function and “print” function, I attached the word file documenting the implementation steps for your reference.
If you have any other issue, just feel free to contact us.

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Fri Dec 30, 2022 12:04 pm

Thanks for the answer.
All very well.

marsenne
 
Posts: 8
Joined: Sat Feb 10, 2018 8:22 am

Tue Jan 03, 2023 6:16 am

Thanks for your feedback.

Please flee free to contact us if you hava any issues.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2774
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.PDFViewer