Quote:
Originally Posted by kovidgoyal
|
Yes and no. I've been using html2ps for some other tasks (e.g., generation of PDFs from the HTML in Atom feeds). For regularized HTML->PDF generation, html2ps's model of providing a custom stylesheet works great. What I was going for here is integration -- being able to go from viewing the page on the browser to having a "printout" on the Reader. I've found this to be especially useful for highly transient printouts, such as Google Maps directions.
It would be possible to make a Firefox extension which ultimately ran the current Web page through html2ps, but it (a) would need some extra work to operate properly on pages requiring credentialed access, (b) would lose / require re-writing current print feature support (e.g., print only selection), and (c) would be even less brower-independent.
Making a CUPS (etc) driver which produced an appropriately sized & metadataed PDF and dumped it on the Reader would probably would garner the most source independence. But it would
lose Firefox support -- a long standing mis-feature of Gecko's PostScript rendering engine is that it can only render to a pre-compiled list of fixed page sizes. My hack gets around this by setting large margins in Firefox's configuration and chopping the PS output down to the appropriate size.
Anyway, I'm not saying my solution is perfect -- just the best one I've thought of so far for what I want to do. :-)
P.S. Thanks muchly for libprs500!