PDA

View Full Version : Printing a document that is not open


JimMatz
07-22-2003, 08:12 PM
I want to be able to print a document that is not open. For example, I want to list all of Accountings month end reports and put a print button next to each report so that when someone is looking at the page they can just click on the print button and that will print the document automatically, without having to open each one.

Is this possible??

Somebody please help me, this is a project project I am working on!!

Thanks much in advance!! :D

Danne
07-22-2003, 08:58 PM
If you don't load a document how would the browser know what to print? :confused:

I think you need to load a document in a frame which has focus to be able to print. Which means you can't use a hidden frame for this.

I usually open a new window to print.

JimMatz
07-22-2003, 09:04 PM
I was hoping that you could maybe create a print button that would be linked to a file on our network. So that when the print button was pushed, it would link to that file and automatically print.

JimMatz
07-23-2003, 01:30 PM
I'm finding out that I don't think that this is possible.

Thanks for the help!

jalarie
07-23-2003, 06:32 PM
Try this:

&nbsp;<a href="#" onclick="PrintIt('Jan');">Jan</a>
&nbsp;<a href="#" onclick="PrintIt('Feb');">February</a>

&nbsp;function&nbsp;PrintIt(What)&nbsp;{
&nbsp;&nbsp;PF_Pop=window.open(What,'PrintFrame','width=100,height=100');
&nbsp;&nbsp;PF_Pop.window.print();
&nbsp;&nbsp;PF_Pop.window.close();
&nbsp;}

You may need a timeout to allow the popup to fully load before the print takes place, and another to allow the print to happen before closing the popup.

JimMatz
07-23-2003, 06:49 PM
Thanks tons! I will give this a try!

cheesebagpipe
07-23-2003, 07:12 PM
http://www.faqts.com/knowledge_base/view.phtml/aid/14803 :)