Tom Cameron wrote:
I have a need to create PDF files from a Zope application. I have been reading this thread on PDFs. I have no idea how to start creating pdf files. I have taken a look at reportlab and it looks all a bit too complex for what I want.
I just what to convert an HTML doc to a PDF doc. Sounds simple enough.
I'm pretty sure the commercial software Acrobat Distiller will do this. Otherwise, if you want to truely own the solution, there's work involved.
Anyway, could anybody give me some hints as to where I should start. A couple of URLS or how to links.
I suggest you join the ReportLab mailing list, and browse through the recent list archives. People *are* doing this sort of thing. In fact, here's a recent email from the ReportLab list: ---- Frederico :
Hi! I need to place some text that comes from a database and it is formatted as html (align, div, font size, li,ol,ul)
My question is: is there an easy way to put this in reportlab maintaining all the aspect? I'm using html parser (python) but i'm tired of so much work, and beside i'm having trouble with the font size...
Well, there's no free lunch. ;-) You must definitely do the parsing yourself, but there should be enough code to help you doing that in Python. You also need to write the mapping, no matter if you map it to Platypus directly or to RML. The latter is certainly more convenient, but also more expensive... Answering this definitely is very difficult as it depends very much on the real HTML you have... You may quickly find that you only get 80-90% of the job done really well, but the rest remains extremely difficult. Regards, Dinu -- Dinu C. Gherman ---- http://reportlab.com Go there now. ReportLab is good. -- Steve Alexander Software Engineer Cat-Box limited