Click here to Skip to main content
15,032,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

We have a Web project (MVC.NET). Its requirement is when I generate the report, it automatically print the generated report (pdf file) without clicking any button to print.

May I ask if this is possible using ActiveX and how.

I would appreciate if you have any other ideas that might solve this problem.


Thank you.

What I have tried:

I tried to search in Google for possible solution but unfortunately I get no answer.
Posted
Updated 29-Jul-16 7:39am
Comments
Afzaal Ahmad Zeeshan 29-Jul-16 8:20am
   
I am unsure of ActiveX, but I am sure Browser doesn't let web applications to print the documents. User himself has to interact with the script to perform this action. That is set for security, who knows what code might run?
Richard Deeming 29-Jul-16 10:07am
   
ActiveX only works in Internet Explorer on Windows. And any ActiveX object that allows you to print silently is unlikely to be marked as "safe for scripting", so your users would have to deliberately weaken the security of their browser for your site to work.

1 solution

It is a security feature to prevent malware from printing junk indefinitely.
You understand that browsers can't allow this.
Second problem, the default printer may not be the one the client want to use.

Ask your self if what you want to do can be used to abuse your client, if the answer is YES, you know why it is not allowed.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month