4 ms·
Last time I had to generate pdf's, I just generated latex markup and then rendered it to pdf. You could look into something like http://prawn.majesticseacreatu
by aeontech 13y ago
Last time I had to generate pdf's, I just generated latex markup and then rendered it to pdf.
You could look into something like http://prawn.majesticseacreature.com/ http://prawn.majesticseacreature.com/ though.
- DenisM 13y agoThe nice thing about HTML is that it does layout for you. If you have to generate PDF yourself you have to do the layout, in particular sizing tables is a huge pain...
- Argorak 13y agoLatex also does the layout for you. Thats the entire point :). Also, it is surprisingly fast.
- fudged71 13y agoIt's a new layout, though.
- omaranto 13y agoYes and one better suited for PDFs I would think: PDF files are a sequence of pages, and LaTeX pours a little effort into choosing page breaks, when I print HTML pages from a browser, the division into pages seems to done with the greedy algorithm.
- fudged71 13y agoThe only thing that bothers be about LaTeX (or PDF readers?) is that I can't copy and paste cleanly from the document. Many glyphs get tied together, white space is lost, code doesn't come out cleanly, etc.
- Argorak 13y agoThats mostly a PDF/viewer problem. PDF is not really meant for C&P. Concerning quality of the PDF document, LaTeX very good in relation to other creators.
- fudged71 13y agoI absolutely agree in terms of quality. For being a universal document format, it's very frustrating that PDF readers don't make using them easier.
- DenisM 13y agoLooking at http://en.wikibooks.org/wiki/LaTeX/Tables http://en.wikibooks.org/wiki/LaTeX/Tables I see that the column width needs to be specified to avoid text overflow. HTML does much better job, automatically fitting a table to desired width.
- deleted 13y ago[deleted]
- jeffasinger 13y agoIt's not as easy to lay things out nicely when you have things of an unknown length that could spread out to multiple pages with HTML as with pretty much any other method.
- piggity 13y agoI was using LaTeX => PDF generation, but because I don't do it all the time I found it cumbersome and confusing at times. Prawn seems to have come a long way since I used it last - and has addressed all the limitations that pushed me towards LaTeX in the first place. Definitely worth looking at Prawn again in my opinion.