File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

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: 17410

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.

An IDE is no substitute for an Intelligent Developer.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63844

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

[Asking smart questions] [About Bear] [Books by Bear]
Eric Pascarello

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

I agree. Here's the link:
subject: Printing Web Page to fan fold paper
It's not a secret anymore!