This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes JSP and the fly likes Print Directly from JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "Print Directly from JSP" Watch "Print Directly from JSP" New topic
Author

Print Directly from JSP

Monica Salvador
Greenhorn

Joined: Feb 24, 2011
Posts: 23
Hi. I'm trying to have a report printed out from a PDF attatchment that I have made with iText in a Struts2 action. But apparently, that won't work because the printing control must come from the website itself or else, I wouldn't be able to keep track of what document numbers have been printed or how many of the reports have been printed. Is it possible that I could print the PDF file I made from iText and instead of having it attached or opened in Adobe Acrobat Reader to be printed directly? Or could I control the printer to have it printed at once instead?

Thanks in advance.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

Are you taking about automatically controlling a printer at the client location? Of course not. Think about the security implications. Would you want any web site you visit to be able to start printing out ads on your printer?

All you can do is to let the user download the file and decide what to do with it.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Monica Salvador
Greenhorn

Joined: Feb 24, 2011
Posts: 23
It's not like that.. I just want to keep track of the transactions, besides, the website is not a real website anyway. It's some company's website and it would run on a VPN. The thing is, if I don't keep track of the printing, money would be lost and lots of it. Seriously.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

You'll need to seek some technology other than pure HTTP. I'm not sure, but perhaps a privileged applet might be able to exert the control you seek. At least it's a direction to investigate.
 
GeeCON Prague 2014
 
subject: Print Directly from JSP