How to print without user interaction
-
Hi, I have a web page which allow user to upload files to the server over the Internet and print it out on the local printer. What I did now is after the user upload the pdf file, when click 'process', it will open the Save As dialog box for user to download and save the file on to the local computer for printing. What I wish to do is when click 'process', I want it to directly start printing to the local printer without any user interaction. What I have thought of till now is, to download from the backgroud to the user's computer and trigger the printing on the computer but I just don't know how can I do that. Need you guys to shed some light for me, thanks.
-
Hi, I have a web page which allow user to upload files to the server over the Internet and print it out on the local printer. What I did now is after the user upload the pdf file, when click 'process', it will open the Save As dialog box for user to download and save the file on to the local computer for printing. What I wish to do is when click 'process', I want it to directly start printing to the local printer without any user interaction. What I have thought of till now is, to download from the backgroud to the user's computer and trigger the printing on the computer but I just don't know how can I do that. Need you guys to shed some light for me, thanks.
J Liang wrote:
What I did now is after the user upload the pdf file, when click 'process', it will open the Save As dialog box for user to download and save the file on to the local computer for printing.
Looks odd. Since file has been uploaded from user's local machine, why to download again for printing? :confused:
J Liang wrote:
What I have thought of till now is, to download from the backgroud to the user's computer and trigger the printing on the computer but I just don't know how can I do that.
You can't trigger printing in that way. ASP.NET won't have permissions to write files to local machine. User should explicitly trigger the printing.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions
-
J Liang wrote:
What I did now is after the user upload the pdf file, when click 'process', it will open the Save As dialog box for user to download and save the file on to the local computer for printing.
Looks odd. Since file has been uploaded from user's local machine, why to download again for printing? :confused:
J Liang wrote:
What I have thought of till now is, to download from the backgroud to the user's computer and trigger the printing on the computer but I just don't know how can I do that.
You can't trigger printing in that way. ASP.NET won't have permissions to write files to local machine. User should explicitly trigger the printing.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions
Oh, the reason that the user needs to upload the pdf file to the server is because it needs to be attach with banners as header and footer of the pdf file. Meaning, the server will re-alter the content of the pdf file with extra information. I actually found this link which will print the pdf without prompting user to click print. http://www.planetpdf.com/forumarchive/110829.asp[^] It seems working though, still in the process of testing it.