473,796 Members | 2,625 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="InvoiceIfr ame.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 7509
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********@mai l.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.c om...
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********@mai l.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3701
by: John | last post by:
Now and again I like to start a sentence with a large capital, maybe in a different font. This upsets the line spacing and I've failed to find any css that will effectively crop the capital letter from the bottom, to allow the line spacing of the following smaller font text to remain unaffected. I've always had to resort to a graphic for the leading capital - is there a way I can do this with css? Thanks John
13
3545
by: Tim Johnson | last post by:
Hello all: I have a page with two frames named "menu" and "display". An event handler in "menu" changes the src attribute for "display", resulting in a different page being loaded for each choice in a option list. I accomplish this as follows: // .... code var frameTag = top.document.getElementById("display"); var optionValue =
4
6792
by: Glen K | last post by:
The following works in Firefox buy not in Internet Explorer: <select> <option> option1 </option> <option style="font-style: bold"> option2 </option> </select> Are there any workarounds to allow IE to show different font styles for different elements in a select list?
3
7046
by: Robert Misiak | last post by:
Is it possible to have a different font in individual listView columns? When I do something like: ListViewItem lsi; .... lsi.SubItems.Font = new Font (lsi.SubItems.Font, lsi.Font.SubItems.Style | FontStyle.Bold); The entire line (all columns) of the list appears in bold. I just want the first item to be bold.
4
8823
by: Martha | last post by:
I have one tab control with 5 tab pages. I want to color each tab page a different color. Does anyone know how to color the entire tab page a unique color? (that includes the tab part of the tab page) In other words, just like different paper folders come in different colors, how do you program this? If you look at the code I got from Microsoft, this will color only one tab and put text on only one tab: HOw does one do it when you have...
2
1170
by: ad | last post by:
I use a dataGrid to list the scores of students. If the score is less than 60, I want the score display with font of red. The other will display with blue font. How can I do that?
70
15064
by: axlq | last post by:
I'm trying to design my style sheets such that my pages have similar-looking fonts different platforms (Linux, Mac, Adobe, X-Windows, MS Windows, etc). The problem is, a font on one platform might be the same as a font on another platform, but with different names. I'd like to be able to specify the font names that are "most equivalent." For example, "Lucida Console" is a very attractive and readable monospaced font available in...
1
1790
by: bb nicole | last post by:
Below is my interface for resume which need to post into database... I have did it all in one page and it already can send into database which the table name resume... But my letturer now want me to seperate it in to 4 pages( 1 page is for personnel particular, 1 page is for education, 1 page is for worl experience and so on). And it is need a next button to continue it, at last user need to click on post resume button and post to database....
0
1006
by: Hetal | last post by:
Hi, I have been working on creating a dynamic table with controls on a ASP.NET webpage and i have been using literal controls to do that. The issue that i am facing is, when i have the Start and End tag as 2 different literal controls, they do not seem to form a part of my table. Below is the example. 'This code works fine. ================
1
1655
by: Hetal | last post by:
Hi, I have been working on creating a dynamic table with controls on a ASP.NET webpage and i have been using literal controls to do that. The issue that i am facing is, when i have the Start and End tag as 2 different literal controls, they do not seem to form a part of my table in the second scenario below. plhTMReview - Placeholder StartLiteral - String Variable
0
10461
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10239
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10019
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9057
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7555
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5447
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5579
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2928
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.