Web printing with "continued on next page"?
July 4, 2007 1:09 PM   Subscribe

Printing from the web: How to add "Continued on next page" footer on HTML printouts? IE print templates seem like a solution, but I can't figure out how to get them to work. My app is IE 6.0 only.

The problem:

My company's web app has a feature that dynamically creates a page specifically for printout. The content can span 1-2 pages.

I need to add a "Continued on next page" blurb on page 1 if the printed content spans more than 1 page.

Can this be done?

What I've tried:

We use ScriptX to customize much of our web app's printing. However, it doesn't let you figure out how many pages will be in a print job.

Internet Explorer print templates seem like they might do the trick You can plug them into ScriptX. But I can't seem to get them to work, and the tiny amount of documentation I have found all points back to the same one or two articles.

The tech details:

* Development platform: ASP 3.0/Jscript to generate XML content; XSL and CSS to style it for printout
* Browser: Only Internet Explorer 6.0 is supported. Javascript is enabled.

Massive thanks if anyone has any insight!
posted by cadge to Computers & Internet (9 answers total) 3 users marked this as a favorite
 
Just a thought.. if its reports.. crystal reports activex plugin?
posted by SirStan at 1:26 PM on July 4, 2007


Or generate a PDF?
posted by SirStan at 1:27 PM on July 4, 2007


Response by poster: I don't think we're using Crystal Reports at all ... this is a web app that we have built in-house, and I'm literally just printing a web page. ScriptX is the only printing plug-in we use at the moment.
posted by cadge at 1:30 PM on July 4, 2007


"Page x of n"
posted by rhizome at 2:13 PM on July 4, 2007


Can something like this be done on the backend:

Do some testing, figure out how many lines of data you're outputting versus how many will fit on a page, use asp to count the lines (not literally lines, whatever dynamic thing makes the document vary in number of pages) as they are written to xml and insert some relevant "next page needed" xml as required, have your xsl/css respond appropriately when styling for print, ignore otherwise.

?
posted by juv3nal at 2:14 PM on July 4, 2007


This is tricky since the page size is typically controlled by the client. A lot of different factors play into this. The driver for the specific printer, the page setup the user is using when printing the document, and variable length of the content printed.

Since you have restricted it to a single browser, you could provide detailed instructions on how to properly print the document (what margins, page size, pre-formatted templates etc.) with the hope that the driver and custom options are fairly ubiquitous across the clients.

Then you could try to implement juv3nal's idea.
posted by purephase at 3:42 PM on July 4, 2007


Use FinePrint. It will allow you to add a footer on each page of the output before it prints.
posted by megatherium at 7:39 PM on July 4, 2007


Not a direct solution, but you can have more control over where the page breaks are using the CSS "page-break-after" or "page-break before" properties.

Maybe you can estimate page lengths (conservatively), and insert custom page breaks with the message you want.
posted by Gomez_in_the_South at 9:57 PM on July 4, 2007


Response by poster: Thanks for your advice, everyone!

We're going to go with rhizome's solution. It's going to be more of a workaround and a matter of staff training.

ScriptX already lets us add footers to HTML printouts (it just won't let us customize them based on page count). We're going to use ScriptX to add a "page X of Y" footer and then train staff to check for this when retrieving their printouts.
posted by cadge at 9:45 AM on July 5, 2007


« Older I'm a man ...and yes I need driving directions   |   Movin' on Up! Newer »
This thread is closed to new comments.