I need a HTML 2 PDF expert here. I have developed a script that will create a PDF on the fly. (WAMP environment).
I am using html2pdf for this.
[url removed, login to view]
The script creates the large PDF files ok, but I need to loop about 100 members in the database and create a PDF pages for each. Therefore in some cases this could be 200 pages. The pages are very detailed with over 200 table cell. I have attached an example of a single template. Which needs to be replicated for a certain number of members with their name at the top.
The PDF must also allow CSS, hence why I create the HTML first, then convert to PDF.
The problem occurs when I have 10+ pages in my PDF. I get all sorts of memory errors. I asked my host to bump up the memory and they gave me 256MB. That is the maximum they will allow. I can get about 10 or so pages printed, but I need 200.
My current script does the following:
- Builds up HTML by looping members from database
- Puts all content into a string
- Creates the PDF (this is where is error if more than 10 pages.)
I have tried other PDF scripts but none worked better than HTML2PDF (fr).
I need someone to either fix the current script to allow at least 200 pages to be generated,
Use PHP to loop through 100 members, copy the PDF template attached, add the members name to the top, then merge all the PDF's into 1 document.
The main outcome of this is that I need 100+ pages of the attached PDF generated, each with a members name at the top, ready for the client to print. The execution time must not exceed 30 seconds (if possible).
Will only transfer money through Freelancer, NO PAYPAL transfers. Budget is $80 - $100AUD.