Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Sending a file that have been uploaded to a holding queue  RSS feed

 
Richard Dennis
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys im doing a project using JSF to create a web app that allows a user to upload a file such as a pdf or word document and then send it to a printer

im really stuck now on how to send the file i have upload via primfaces with ajax, but how do i send this to a printer ?, actuall it has to be sent to a printer holding queue as the job will be manually released but how do i go about this ? anyone got some sample code to start me off ? i have downloaded the CUPS4J library but don't know where to start as im new to java


Thanks guys !
 
Campbell Ritchie
Marshal
Posts: 55745
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

I hardly ever print anything any more, so I don’t know. It has something to do with PrinterJob, I can remember that much. But I am pretty sure that you can find something if you open the Java Tutorials with ctrl-F-print. I found about 4 or 5 pages, but you might do well to start here. It is in the Swing section, which I hope does not mean you have to display your document on a GUI before you can print it. You get a print dialogue window, just as for any other printing, and I think once you get that far, all the printing is handled by the operating system in its usual fashion.
 
Richard Dennis
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your reply i will look into it now , and yes i don't need to display the document before printing just need to send it to a printer
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!