Page 1 of 1

How to hide the PrinterSettingDialog on a web page

Posted: Wed Mar 25, 2015 2:01 am
by Jia Sheng
Hello.
When we print a report without the WebViewer on a web page , we implement it the following way:
•put the Web Viewer with the width and height of 1px on a page;
•assign the report to the Web Viewer;
•use its PrintToDirect()/PrintToPdf() methods.
It Works Ok,But Now we have a question we need to hide the PrinterSettingDialog when print a report on a web page.
First we set the report (PrinterSettings->ShowDialog) property as follow:
Image1
Image1
QQ图片20150325094708.png (23.35 KiB) Viewed 1718 times
It can work in the Designer.exe, But it can't work on a web page.Always Open the PrinterSettingDialog like:
Image2
Image2
QQ图片20150325095834.png (27.85 KiB) Viewed 1718 times
How to hide the PrinterSettingDialog when print a report on a web page?

Thank you.

Re: How to hide the PrinterSettingDialog on a web page

Posted: Wed Mar 25, 2015 5:49 am
by HighAley
Hello.

Unfortunately, it's impossible to print from browser without Print Dialog.
This is a restriction of all known browsers.

Thank you.

Re: How to hide the PrinterSettingDialog on a web page

Posted: Wed Mar 25, 2015 6:46 am
by Jia Sheng
Hello.
If we use StiWebViewer.PrintToPdf() on a web page, is it possible to hide the PrinterSettingDialog?

Thank you!

Re: How to hide the PrinterSettingDialog on a web page

Posted: Wed Mar 25, 2015 7:44 am
by HighAley
Hello.
Jia Sheng wrote:If we use StiWebViewer.PrintToPdf() on a web page, is it possible to hide the PrinterSettingDialog?
No, this is impossible.

Thank you.

Re: How to hide the PrinterSettingDialog on a web page

Posted: Mon Mar 30, 2015 2:03 am
by Jia Sheng
Hello.
Do you have any other solution about hiding the print Dialog? For Example writing some special code.

Thank you.

Re: How to hide the PrinterSettingDialog on a web page

Posted: Mon Mar 30, 2015 6:56 am
by Alex K.
Hello.

Unfortunately, it's impossible to print from browser without Print Dialog.
This is a restriction of all known browsers.

Thank you.