Click here to Skip to main content
15,897,226 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to print multiple reports at once that is in bulk directly to printer using php.

If any one know best way of doing it kindly let me know.

Thanks.
Posted
Comments
Marc Gabrie 30-Nov-13 10:47am    
What kind of report i.e. are they PDF files? and you want to print that to the client printer?
Zeeshan17 30-Nov-13 10:50am    
Right now they are just html reports.Actually they are certificates that i want to print in bulk.

Like Selecting required from the list & those should get printed.

I hope you have got it.
Marc Gabrie 1-Dec-13 8:49am    
have you tried using javascript window.print() approach?
Zeeshan17 2-Dec-13 10:37am    
Printing is not the issue.What i need is suppose if you loop through window.print() then you need to keep clicking on print dialog which i don't need.

Instead i want the print should be directly to printer without any print dialog or like that.

Kindly let me know if you have any doubts.

1 solution

HTML format is not suitable for your scenario so if I were you, then I'd do the following:

1. Try to convert the html reports to PDF somehow (http://stackoverflow.com/questions/391005/convert-html-css-to-pdf-with-php[^])

2. Then to print the PDF file to client printer, try to embed javascript in the PDF file itself (http://fpdf.de/downloads/addons/36/[^]) which is supported by Adobe Reader to directly print it. If you cannot get it working, then you could try this http://goo.gl/dVVfH3[^]
 
Share this answer
 
Comments
Zeeshan17 3-Dec-13 2:31am    
Thanks for the answer the Marc.

Actually that was in my mind but as you generate a PDF it asks you if you need to download it & that i don't want.

I just need is printing the content may be it html or pdf but it should work smoothly without any print dialog.

Let me know if you have any suggestions.
Marc Gabrie 3-Dec-13 6:53am    
The only way to get it printed without any dialog is by using this tool but it's a commercial product. I couldn't find any open source that can be used in this scenario.
Zeeshan17 3-Dec-13 9:39am    
Thank You..I will check it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900