Page 1 of 1

generating great number of pdf with template, anyone exp.?

Posted: Fri May 18, 2007 4:12 am
by dermoritz
so i am looking for a solution to create a great number of pdf (invoices) once a month. i need a possibility to use a template for the invoice, modifiable by the user. the data for the invoices comes from a mysql database. so the dynamical data is a table with fix number of columns and dynamical number of rows.

i already searched this forum and others and i found many "building blocks" to do this:
fpdf, ezpdf, pdflib... for generating pdf, html2pdf(many with this and similar names) for converting html to pdf (interesting if i use a html template for the invoice, created by a wysiwyg editor like tinymce), fpdi (if the template is a pdf file).

i am looking for people with experience in this field or especial in a similar situation.
what would you use/ what you used? with out an advice i would try fpdf with fpdi or with some html2pdf class, good idea?

Posted: Fri May 18, 2007 4:36 am
by stereofrog
fpdf/fpdi works just fine

Posted: Fri May 18, 2007 4:42 am
by dermoritz
the only problem with fpdi is the need of an commercial pdf creator like acrobat, isn't it? no it isn't :-) - open office can create pdf?

so fpdf/fpdi seems to be a good solution. has anyone some experience with fpdf/fpdi in conjunction with generating invoices/tables?

Posted: Fri May 18, 2007 5:54 am
by stereofrog
You can either start from scratch and create the whole document via FPDF scripting. or make a PDF template (in Acrobat, or using one of "pdf creators" available freely or online) and process it further with FPDI. It apparently depends on how visually complex your template is.

Posted: Fri May 18, 2007 6:42 am
by dermoritz
because its an invoice, the template would include a header, a footer and some table layout between them. this should be easy modifiable by any user.
the question is how appropriate is fpdf/fpdi for this use case.

Posted: Tue May 22, 2007 8:33 am
by dermoritz
in: viewtopic.php?t=30157
on the second page, i wrote how i want to solve the problem. the question is: is it possible this way?

Posted: Tue May 22, 2007 10:42 am
by dermoritz
ok i learned form the author of fpdi, that there is no concept of an "placeholder" in fpdi. all elements to be inserted in the template must be positioned via php/fpdf code :-(.

but is there an possibility to get certain positions of "elements" from the template. i mean is it possible to place data relativly to elements from template? i'dont want to change the php code every time the template is changed.