Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing an image

Status
Not open for further replies.

issunboshi

IS-IT--Management
Apr 27, 2004
24
US
All, I have run into a problem. I have modified a PHP script to dynamically create a barcode image based on a number pulled from the database for that sepcific item. Currently the script creates the JPEG image and displays it on the page with the rest of the image for that item. I want to be able to print just the jpeg image and not the rest of the information on the page. Is there a way in HTML to link that JPEG image so that when I click on it, the image, and only the image is sent to the printer? All I have been able to do so far is call up the print() command that tries to print the entire page, not just the image. Any help would be greatly appreciated.

Ken
 
You might try linking to a page that contains just the jpeg, and nothing more. image you wish to print, and execute the Print command on the onload event of the page.


----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
You can have a special printing stylesheet that makes everything but the picture invisible. I don't know if your users will enjoy the fact that they cannot print the whole page but if that's what you need, it could work perfectly.
 
I will give it another go. Thanks guys.. I appreciate your quick responses.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top