Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

chepistolas

macrumors member
Original poster
Apr 21, 2005
72
0
Chicago
I have a problem. . I can't seem to find a way to put a print command on my site. Do print commands even use javascript? Can anyone please give me advice or point me to a website that dosen't concentrate on using I.E 4. Thanks in advance. Luis Gomez.
 
Last I checked there's no "standard" way of setting it up so that it works across browsers and OSs.
 
Have you tried the window.print() method?

<input type="button" value="Print" onclick="javascript:window.print()" />
 
The method I use, is to create "printer friendly" documents in PDF for the pages that will likely need to be printed, then embed the File>Print action into the document pages using Indesign and Acrobat Pro.

I use print resolution (175ppi or so) PNG8(line art) or PNG24(continuous tone) for placed graphics, for fast download and good quality prints.
PDF format is "press-ready", with no image compression.
The indesign PDF is opened in Acrobat Pro and the desired actions embedded in the pages.

The "Print page" link on the site opens the PDF, and the printer dialog appears automatically.

GL
 
I've tried the window.print() but it shows up as a button. I want it to display withouth the button, so users see it as a link instead.

<div id="afterarticle">
<span class="discuss"><a href="/forum/article"> discuss</a></span>
<span class="email"><a href="emailform.html" rel="gb_page_fs[]"> e-mail</a></span>
<span class="print"><a href="{javascript code ?}"> print</a></span>
</div>

EDIT:
I've GOT IT! !
for those of you who would like to make it look like a link just make it like this:

<a href="javascript:window.print()"> print</a>

There is a problem though, it prints the page into two pages.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.