hi all
Is there any possible to print the current PHP page in papers
How can I achieve this..
I need some code, suggestions regarding this
Thanks in adance
Access Printer through PHP
Moderator: General Moderators
-
Steve Mellor
- Forum Commoner
- Posts: 49
- Joined: Thu Aug 02, 2007 8:18 am
PHP doesn't really have the device control you're looking for. I would suggest looking at Javascript to print off a page.
Of course, being javascript you can call it whenever you like. A good solution I have used before is to make an i-frame on the page (1px X 1px) and load the page you want to print into that frame, that way you can use a separate page and have more control about which pictures are printed and where your line-breaks are.
Take a look at this:
http://www.htmlgoodies.com/beyond/css/a ... hp/3470341
for more information...
Code: Select all
<a href="javascript:print()">PRINT THIS PAGE!</a>Take a look at this:
http://www.htmlgoodies.com/beyond/css/a ... hp/3470341
for more information...
-
Steve Mellor
- Forum Commoner
- Posts: 49
- Joined: Thu Aug 02, 2007 8:18 am
- xpgeek
- Forum Contributor
- Posts: 146
- Joined: Mon May 22, 2006 1:45 am
- Location: Kyiv, Ukraine
- Contact:
Yes.
This is nice short tutorial http://www.alistapart.com/stories/goingtoprint/
This is nice short tutorial http://www.alistapart.com/stories/goingtoprint/