Printing from the web

Soldato
Joined
18 Oct 2002
Posts
9,598
Location
Sunderland
Im looking for ideas or experience of developers/designers who have had to provide solutions that offer good printable output from thh web. The options that we have discussed internally very briefly are listed below:

1. Printing direct from HTML using CSS and a print stylesheet
- Upside is content will already be on the screen and no further processing is required
- Downside is you dont have any control over header of footer information on the print out

2. Rendering to a PDF
- Upside is once the document is created, it cant be changed by the user and therefor print output is guaranteed
- Downside is having to render to PDF, which is tricky to get them looking good using on the fly generation

3. Flash paper
Dont really know much about this, can this be used to create printable flash documents in real time?

So really Im after ideas or suggestions on good printable solutions from the web, the one I have most experience with is using CSS which can provide good results but the header/footer text may cause our client headaches. Im looking to put a document together for each alternative, so ideas, suggestions on those above or methods Im unaware of would be greatly appreciated.

Rob
 
Hi Rob. What solution did you decide on in the end? I need to do something similar. I've read that sizing elements in CSS using 'em' unit size makes it easier to print, although there's no getting around the header and footer issue. There seems to be a few html > pdf converters out there. I was thinking of trying it in two steps, first using html2ps, then ghostscript to convert the ps to pdf. Most if not all solutions require serverside imaging software like ImageMagick. I've seen flash paper on some sites. It seemed quite elegant and speedier than PDF. I haven't found a way of converting to that format though, it appears to be quite a proprietary format.
 
I chose PDF in the end, as I found iTextSharp from http://itextsharp.sourceforge.net/ which is free, a very good little DLL, and very powerful. A lot of example code on the site to work through and use, and it suited my needs very well. Some of the code is lightly out of date as I think it has the Java method names in the examples but hardly a pain changing the odd character.

I would post an example here (got it looking exactly as I wanted it) but its quite a major client so dont want to get into hot water. If you want to have a look or need any help then drop me a line.
 
Last edited:
Back
Top Bottom