I have a website that deals with a huge amount of data in the form of customer's information and the things that they have ordered for a day. Now since this particular site have hundreds of client and everyday each customer have inbetween 5-20 orders.
The owner of the site wants a page which contains the customer delivery info the their order list in each separate page so that when they can print it and stick it on the package. However each new client info needs to start in a new page.
eg:
--Start Page ---
Customer 1 Delivery info
Customer 1 Order info
"Some empty space here if order info is short"
----Next Page----
Customer 2 Delivery info
Customer 2 Order info
------Next Page ---
Customer 2 Order info continued (this could be only one few lines and could leave a large empty space below)
"Some empty space here"
----Next Page---
Customer 3 ...
When I treid to output the plain html and then print the page, the page was all messed up so I solved it generating PDF (I am using MPDF53) and there in lies my problem.
The problem is that it takes a long time to generate the PDF and eats up lot of system resources. I already had to increase the server execution time for it to run successfully (from default 30 sec). Now as the customers grows, the list will keep on growing and so will the execution time. If a 100 customer list can go beyond 30 seconds I wonder what will it be when it reaches 1000 or more.
The print page itself donot contain any graphics and the sql query are generated fairly quickly (this is because when I was outputting as html the page would load up pretty quickly).
Is there any alternate way to have a page break in html document so that when I print this page it follows that page break correctly or anyother way that can speed the pdf generation or do I simply have to bear with the long executing time.
Edit: One problem with using just html document even with page break would be saving it for later records or reference.
Thanks