ryokale
12-20-2008, 08:47 PM
We have an Intranet running Joomla 1.5 at our company and we have a company phonebook which uses a modified version of Joomla's contact component. So all the data is in a MySQL table and what I'm trying to do is to get all those contacts into a .PDF file, so people that need the phonebook at home or don't use a computer in their work can have the same phonebook printed.
I've written a PHP script that gets the contact data from a mysql db and puts them in html tables (by department) and transforms it into a pdf file (2 pages). It looks quite fine atm but I'm not sure if it's gonna work forever just like that. I'm concerned about the page settings, ie. when people resign or change department or when someone is hired. I'm afraid that some of the tables will be extended to the next or previous page, or someone new has a really long name (Apu Nahasapeemapetilan for example :)) and it goes vertically to another page.
Does anybody have any experience in issues like this? I'd like the page settings to be set so that the PDF file would always look fine after printing no matter how many people have resigned or been hired. Should I find a solution from XML to PDF transformations? Is there any complete script that would do something like this?
I've written a PHP script that gets the contact data from a mysql db and puts them in html tables (by department) and transforms it into a pdf file (2 pages). It looks quite fine atm but I'm not sure if it's gonna work forever just like that. I'm concerned about the page settings, ie. when people resign or change department or when someone is hired. I'm afraid that some of the tables will be extended to the next or previous page, or someone new has a really long name (Apu Nahasapeemapetilan for example :)) and it goes vertically to another page.
Does anybody have any experience in issues like this? I'd like the page settings to be set so that the PDF file would always look fine after printing no matter how many people have resigned or been hired. Should I find a solution from XML to PDF transformations? Is there any complete script that would do something like this?