Link to home
Start Free TrialLog in
Avatar of jjjj060497
jjjj060497

asked on

How to show a image link invisible to printer

I need to include an imaga link in some pages that lend me to print the page. When this page print, I don`t want to include the image link. I need, then, to show a image that the navigator don´t print.
Avatar of Trevor013097
Trevor013097

Unfortunately there is no way to invoke the Print function either through HTML or through JavaScript and also there is no way of preventing images from printing but being able to display them.

Sorry to dissapoint you but there are still some things that HTML and Javascript just cannot do.

cheers,

    Trevor
Avatar of jjjj060497

ASKER

I can invoke a print function from a html page but i only want to find a image (or a text if there aren`t another posibility) that not print.
 I know that a button don´t be printed, but I prefer not to use it. I try to find the ssame function with a image link.

My appologies jjj I was not aware of a function to invoke print.

How do you do it?
Yes, I like Trevor would very much like to know the answer.

To make an image not print, put it so far to the right that it falls outside of the printed page area.
This work is for a information kiosk. The user must view all the page without move all the time in the window. I must put the image in the printer area.
 The method I use to print need to install some programs in the client and configure the navigator he use.
 I have a mime type that open a program call "CONTROLP.exe". In the pages I want to print, I include a link to a file with this extension. The navigator launch the program and the program (CONTROLP) send some keys to the navigator. The navigator, finally , print.
 
In that case why don't you flip the image in question to a pixel gif just before you print. I assume you are using a browser like
Netscape that recognizes the image array. Then afterwards you can  reload the page or in some way reflip the image back to it's normal state.
I don´t understand your answer. Please can you explain it more?. I don´t want to reload the page (it´s a dinamyc page).
I meant to use the image array to change the image to one that doesn't show on the page.
image[4].src="pixel.gif";

put this statement in the function that calls your print routine, and then after the print reset the image back to the original view.
image[4].src="original.gif"
I don´t want to reload the page. I need that the image be transparent (invisible) only to print.

You will not have to reload the page, just change the image to one that won't show when you print the page. I never said anything about reloading the page. After you have printed the page, you can just change the image back to the original form.
Ok. The problem is that I print the page sendingt a Control-p to the browser and I don´t know how to include the Javascript when I do that. Do you understand?. I don´t use a Javascript code to print, I use a sending of keys from a program that is called byt a virtual web page (with an extension not registered). It is like I pulse th Keys Control-p and Enter (you can prove it in the browser). How to tell the javascript code to active it when the browser print?.

ASKER CERTIFIED SOLUTION
Avatar of fun
fun

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ok. The user click on one link to a url like this "file://c:/.../pepe.jj". The browser have a mime entry that tell it to use a program called "pbrprint". The browser open it. This program send the keys Control-p and Enter to the Browser. The Borwser Print (without reload the page i think).
 All of it is the same as you press the keys in a browser.
OK. You can use javascript to process an onClick handler for the link you pressed to first change the image to a pixel gif, then to activate the link that does the printing, then return the image to its original form. None of which should require that you reload the page.