View Full Version : Invoice printing

Apr 27th, 2010, 11:12 AM
I have done a simple page where the labels get its values from the database and i have set the labels in an invoice format.
Now i would like to add a print, email & print preview button. How can i do this?

Apr 27th, 2010, 11:43 AM
You could set the function window.print() (https://developer.mozilla.org/en/DOM:window.print) on a button or image to get the print dialog. To send mails, you'd need to code using server-side language like PHP.

Apr 27th, 2010, 12:33 PM
Thanks abduraooft,
How can i set my page so that it prints on an a4. Is there any print preview command?

Apr 27th, 2010, 03:44 PM
Target your task to decide what you want to do first. This definitely does not belong in the PHP snippets forum, but I cannot move it until you decide what you want first. Looks to me like JS / XML-FO for starters.