I have a relational database (PostgreSQL 8.4) of around 3000 products proposed by a company. The database is used to display the products in the company’s website (running on a python 2.6 application). My final goal is to build a PDF file in order to print a paper version of the products catalog and I would like to know what technology to use for that purpose. The operation will have to be repeated once a year for every new catalog so I would like to automate the catalog generation but still give some flexibility because I won’t stay in the company forever and there is no technical person that will replace me after (small company, small budget).
Ideally, I would like to generate dynamically the structured content of the 3000 products in a text editor (like OpenOffice for example) for the following reasons:
- content is generated dynamically so no need to retype everything
- only the content structure is generated dynamically and not the styling so a non-technical user is able to customize styles.
- the document being editable, it is easy for a non-technical user to add pages in the catalog like a welcome page, a note page, the terms and conditions. In other words, text editors are great, I don’t want to reinvent the wheel but I don’t want a person to retype all data for the 3000 products.
Soutions first looked:
- I had a look at LaTeX but it seem that the data and the styling are mixed together in opposition to HTML and CSS which clearly separate content and styling which I find much more easy to use.
- I thought about using directly HTML and CSS but it might too technical.
- I also looked at a library allowing to generate PDF directly from python like ReportLab (http://www.reportlab.com/software/documentation/tutorial/product-catalogue/). This, however, does not allow to modify anything once the PDF is build and a little modification might required a technical person.
So if you have an idea for this kind of job then I would be very happy to get some tips about the right technologies. Thank you very much.