Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Print width query

Reply
Thread Tools

Print width query

 
 
KiwiBrian
Guest
Posts: n/a
 
      06-12-2005
I want to make an html page for a friend who wants it to print at a specific
width on her printer.
It does not need to be put online, or print on any other PC setup.
It will use a table to contain the content which is predominantly tabular.
How do I define the width of the table, and limit the content, so that it
will print as she wants within the printer page?
It could also be done in Word, but previous (lack of) experience with such
formatting in Word makes me more confident of success using html and css.
TIA
Brian Tozer


 
Reply With Quote
 
 
 
 
David Dorward
Guest
Posts: n/a
 
      06-12-2005
KiwiBrian wrote:

> How do I define the width of the table, and limit the content, so that it
> will print as she wants within the printer page?


With the "width" property.


--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      06-13-2005
"KiwiBrian" <(E-Mail Removed)> wrote:

> I want to make an html page for a friend who wants it to print at a
> specific width on her printer.


Create the page so that it adapts to the available width, whatever it
is.

> It does not need to be put online, or print on any other PC setup.


It's still simplest to design it as if you were designing it for the
Web. Abandon this idea only when it has been _proven_ impossible or
suboptimal. Don't assume anything you don't need to assume.

> It will use a table to contain the content which is predominantly
> tabular.


Fine. Write a table without any attempt at controlling the appearance,
check (in Print Preview) how it looks like on printing, and ask your
friend to do the same. _Then_ you may observe something you would like
to affect. You cannot know, at this point, and still less can we.

> How do I define the width of the table, and limit the
> content, so that it will print as she wants within the printer
> page?


You don't.

Of course you want to make the best possible use of the entire
available width. Browsers generally do this better than you, except in
special circumstances. Note that the width depends on the printer _and_
its settings, especially margin settings, which may vary. This is yet
another reason _not_ to set widths.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
KiwiBrian
Guest
Posts: n/a
 
      06-13-2005

"Jukka K. Korpela" <(E-Mail Removed)> wrote in message
news:Xns9674C432943D7jkorpelacstutfi@193.229.0.31. ..
> "KiwiBrian" <(E-Mail Removed)> wrote:
>
>> I want to make an html page for a friend who wants it to print at a
>> specific width on her printer.

>
> Create the page so that it adapts to the available width, whatever it
> is.
>
>> It does not need to be put online, or print on any other PC setup.

>
> It's still simplest to design it as if you were designing it for the
> Web. Abandon this idea only when it has been _proven_ impossible or
> suboptimal. Don't assume anything you don't need to assume.
>
>> It will use a table to contain the content which is predominantly
>> tabular.

>
> Fine. Write a table without any attempt at controlling the appearance,
> check (in Print Preview) how it looks like on printing, and ask your
> friend to do the same. _Then_ you may observe something you would like
> to affect. You cannot know, at this point, and still less can we.
>
>> How do I define the width of the table, and limit the
>> content, so that it will print as she wants within the printer
>> page?

>
> You don't.
>
> Of course you want to make the best possible use of the entire
> available width. Browsers generally do this better than you, except in
> special circumstances. Note that the width depends on the printer _and_
> its settings, especially margin settings, which may vary. This is yet
> another reason _not_ to set widths.


Thanks Jukka.
Subsequent to writing my query I found that there was an option in my
computer's print preview settings to make the page fit the paper, and
thought this might be a universal option in all/most printer driver options,
but my friend says that she does not have such an option.
Hence it seems to me that the only way that I can make it fit the paper in
her printer is to modify/specify the width of the table in the HTML/CSS.
Presumably empirically.
I know how to do this, but can't help feeling that I am missing something
somewhere.
Brian Tozer


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
print a vs print '%s' % a vs print '%f' a David Cournapeau Python 0 12-30-2008 03:19 AM
Problem - I want to print Current Output of Pdf file and should print once.I get print dialog box but it is not working keto Java 0 05-30-2007 11:27 AM
Textbox width scaling to width of data not width of page? AndrewF ASP .Net 1 10-10-2005 04:38 PM
JComboBox width, dropdown list width Xu Java 11 07-15-2005 11:54 PM
Unlarging the print to print using PDF file to print Bun Mui Computer Support 3 09-13-2004 03:15 AM



Advertisments