hi all,
is it possible to print some text, html coded tables, images by php? if yes, plz point me the ways
regards,
Moderator: General Moderators
It's possible to automatically print a page in two ways:
1. Generate a PDF of the content and embed some javascript to automatically print it. Complicated, hassle to update the layout, difficult to do dynamically, requires Acrobat on the client computer, but it will work if the user has JS switched off in their browser.
2. Use an instance of IE's ActiveX browser object and send it the "print without dialogue" command. Complicated again, only works in IE, and will probably stop working when Microsoft's ActiveX update is out in about a month.
All-in-all it's probably not worth doing. Just let the user click thier print button and see the print dialogue.
1. Generate a PDF of the content and embed some javascript to automatically print it. Complicated, hassle to update the layout, difficult to do dynamically, requires Acrobat on the client computer, but it will work if the user has JS switched off in their browser.
2. Use an instance of IE's ActiveX browser object and send it the "print without dialogue" command. Complicated again, only works in IE, and will probably stop working when Microsoft's ActiveX update is out in about a month.
All-in-all it's probably not worth doing. Just let the user click thier print button and see the print dialogue.