Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Printing Web Page to fan fold paper

 
Gobind Singh
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an application which retreives data from a database via a servlet and displays it in a web page via xslt. The data is paginated i.e. the web page has links to pages of data.

I have a requirement where I need to be able to print the entire data retreived. (note: the data is retreived and stored in xml file on disk).
The requirement is to make sure that the document can be printed succesffuly to fan fold paper i.e. the dot matrix stuff.

Can anyone suggest any ideas?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18212
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The actual printing on a client computer is done by that machine's OS printer drivers. Whether the target printer is a sheet-fed or fanfold printer is essentially undetectable by a web server.

There's not much that could be done specifically for fan-fold paper, anyway. My old C Itoh Prowriter, for example, could take either sheet-fed or continuous paper, but it used the original Centronics printer interface standards, which can only pass 3 items of information back to the client computer: on/offline, error (type unknown) or Paper Out. The Paper Out sensor was merely a switch that knew when paper was in its vision. Whether more paper was needed because you'd reached the bottom of a cut-sheet page or if you'd reached the end of a fan-fold, didn't matter.

You'll have enough fun just getting the client to print without manual prompting, however. Web browsers are set up to be resistant to server-induced printer commands, since there are, alas, people who would otherwise assualt your client machine, the printing subsystem and your paper supply for their own Evil Purposes.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64970
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As this is not a servlet issue, moved to the HTML forum.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Only think you can do is play with different CSS layouts with CSS Print Media.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic