File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Printing Web Page to fan fold paper Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Printing Web Page to fan fold paper" Watch "Printing Web Page to fan fold paper" New topic
Author

Printing Web Page to fan fold paper

Gobind Singh
Ranch Hand

Joined: Aug 04, 2006
Posts: 62
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

Joined: Jun 25, 2001
Posts: 16012
    
  19

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60992
    
  65

As this is not a servlet issue, moved to the HTML forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Only think you can do is play with different CSS layouts with CSS Print Media.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Printing Web Page to fan fold paper