469,588 Members | 2,741 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,588 developers. It's quick & easy.

A different font-size on Print ?

Hi NG

I have a site where an invoice is shown on the screen in a IFrame.
I have this script on the site:
<script type="text/javascript">
function zPrint(oTgt)
{
oTgt.focus();
oTgt.print();
}
</script>

and this :

<iframe name="myFrame" id="myFrame" width="544" height="364"
src="InvoiceIframe.php?Invoice=<?echo $invoice;?>"></iframe>
<input type="button" value="Print Invoice" onclick="zPrint(myFrame);">

The site now has the invoice written in an iframe on the screen, but when I
click print, the printed invoice is very small.
It is written with css font-size: 9px and font-family: verdana which is
fine for the screen and matches the rest of the site.

But it is way to small when it is printed.
So is there anyway to write it with font-size: 9px on the screen but printed
with a larger font-size ?
Feb 7 '07 #1
2 7310
Yes, use an external CSS file for print.
Read more about it here:
http://alistapart.com/articles/goingtoprint/

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

On Wed, 7 Feb 2007 13:03:03 +0100, "EnjoyNews" <mh********@mail.dk>
wrote:
>
So is there anyway to write it with font-size: 9px on the screen but printed
with a larger font-size ?
Feb 7 '07 #2
Thanks alot.
It works like a charm :o)
"Jens Peter Karlsen [FP-MVP]" <jp*******@mvps.orgskrev i en meddelelse
news:uf********************************@4ax.com...
Yes, use an external CSS file for print.
Read more about it here:
http://alistapart.com/articles/goingtoprint/

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

On Wed, 7 Feb 2007 13:03:03 +0100, "EnjoyNews" <mh********@mail.dk>
wrote:
>>
So is there anyway to write it with font-size: 9px on the screen but
printed
with a larger font-size ?

Feb 8 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by Tim Johnson | last post: by
3 posts views Thread by Robert Misiak | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.