Re: WAComponent to PDF
Louis LaBrunda <[email protected]>
| Newsgroups | gmane.comp.lang.smalltalk.squeak.seaside |
|---|---|
| Organization | Keystone Software Corp. |
| Message-ID | <[email protected]> |
Hi Hilaire, It has been a while since I used wkhtmltopdf to create PDF files from HTML pages but I liked the way it worked when I did it. I used a WARenderer builder (actually it was WARenderCanvas builder at the time but things have changed and I think WARenderer builder should work but haven't tried it) to create the page as a full document HTML string and save it as a file. I would then execute wkhtmltopdf, pointing it to the file, to create the PDF file. I could then do what I wanted to with the PDF file, like let the use download it. I'm pretty sure wkhtmltopdf was able to do all the CSS stuff from URLs in the generated HTML file. I can look up more details if you need them. Lou On Thu, 22 Oct 2015 15:56:28 +0200, Hilaire <[email protected]> wrote: >Hello, > >I would like to render WAComponents as PDF documents. >I took at look at Artefact, but it is an important work to render again >the data as PDF with Artefact, not to mention I feel it is a duplicated >work. Moreover, I have quite long documents spanning over several pages, >some of my tables are complex with some columns spanning over 2 or 3 >columns and I have about 50 different documents to turn as PDF file. > >Now I am think about rendering these components on dedicated pages, then >using wkhtmltopdf. >What I would do is get these components rendered at dedicated urls, then >call wkhtmltopdf with these urls as arguments. >Practically how will you do that? How to forge an URL for a page >rendering the component with a dedicated decoration for PDF conversion >(dedicated css, header, footer)? >My initial though is REST. Is it the right direction? Or are there other >options? > >Thanks for tips, enlightenment or thought on the matter. > >Hilaire ----------------------------------------------------------- Louis LaBrunda Keystone Software Corp. SkypeMe callto://PhotonDemon mailto:[email protected] http://www.Keystone-Software.com