File -> Print to PDF on a client side? Who knows how to display HTML? Each browser make this on it's manner, for instance - rounded buttons in IE & Konqueror and strict rectangle in Firefox. Different filters in IE and many many other things. What I want to say is HTML is just a markup language and designers often made several views for a page oriented to different browsers.
If you need a copy of an order form - then just save it as HTML or print it out to PDF via File | Print... as I already said above... There is another way. Let's say you've mane an order an get it as HTML in your browser but this HTML is just a HTML view of some report engine, like Jasperreports. Then you can provide a link to completely identical PDF version of that page. I already have a component like this for tapestry 4. All you need it to create jasper report design an provide a datasource for that design. The component will made all the job for you - provide an HTML representation of a report with a navigation toolbar and a link to it's PDF version. You can found it at www.keyintegrity.com. There is no public SVN repository yet but you can download sources as tar.gz. Check out org.keyintegrity.servicehub.csulengine.components.JasperReport. 2006/1/20, Patrick Casey <[EMAIL PROTECTED]>: > > > > I've got a rather bizarre requirement at the moment (at least > in > my mind) where people want to be able to get a report of what their screen > looked like. In other words if you fill in an order form, the > administrator > doesn't want just any old report describing your order, he wants a report > that looks *just like* the screen you filled in. I suppose, in theory, I > could write the world's most complicated report to try to replicate what > the > order form looked like, but then I have to keep two parallel things in > synch; never a good idea. > > > > What I was hoping to do was simply use the existing tapestry > engine, which already knows how to render an order form, and then capture > the resulting character stream in memory instead of sending it out to a > client. Then I want to take that HTML document and translate it into a > PDF. > > > > So my question is, can anyone recommend an open source library > that takes HTML input and produces PDF output? I poked around a bit on > google, but most of what I found want to take a meta-format and then > produce > either PDF or HTML, whereas I already have the HTML and want to go > directly > to PDF. > > > > Any suggestions? > > > > --- Pat > > >
