Batch printing using for loop
Posted 24 August 2006 - 05:21 PM
What I have is a page where users will choose reports via checkboxes that are next to each report name. Then when they submit the form, the processor gathers all of the selected up in an array.
Next, I have a for loop that goes through each of the previously selected reports and prints them literally through the printer.
The part that I cannot figure out is how to actually print them. I checked the manual and found the PECL printer_write() function, but I do not understand how to use PECL, furthermore, some of my users will be Mac and linux users, and from the description, those PECL functions dont support that.
Does anyone have a suggestion that could help in achieving the ability to print to a users printer for each iteration of the loop?
Posted 24 August 2006 - 05:29 PM
Posted 24 August 2006 - 05:39 PM
But just to respond to your reply, the server is Linux
Also, I think that I would generate the report layout during each iteration just by storing all the html in a variable such as:
$report_to_print = "<table>";
$report_to_print .= "<tr>";
$report_to_print .= "<td>Yadda yadda</td>";
Then hopefully just use a print function (that I'm about to search for) to print($report_to_print)
I'm hoping it works, also thanks for your help.
Posted 24 August 2006 - 06:56 PM
How do others make batch printing of selected items? Where you check all the checkboxes next to what you want printed and hit Print.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users