Creating a web page that will print an A4 letter

  MS35 22:24 07 Sep 2007
Locked

I'm including a button on my website that creates a new web page (a letter) that will contain text that needs to be printed on A4 with the same format (margins, footers etc) on any browser.

I've seen web pages that automatically open a print dialog box as well, when you click the little printer button - click here

Is this easy to achieve?

Ideally i'd also like to remove the standard menu items (except for close!) and disable the option of copying the text.

All help appreciated.

Thanks

p.s hope its ok to include the link.

  Eric10 11:02 08 Sep 2007

Is this what you mean? click here
This javascript creates a button on the page to be printed that opens the printer dialogue but the button itself does not appear on the printed page.

  Eric10 11:04 08 Sep 2007

I should have said to use the second example down the page.

  MS35 11:33 08 Sep 2007

That will be useful, but I'm relatively new to web design and I'm concerned that if I size a web page to look like a letter in my editor it will look different on other browsers. I want the letter to print the same on any A4 printer. Same margins, same line spacing, smae format etc.

Am i worrying unduly, will it all be the same anyway?

Thanks

  Eric10 12:16 08 Sep 2007

The usual way is to set up a page for displaying on the screen and another one, accessed from a "Printable version" button, which is designed to print out on a printer from a "Print this page" button on that page. You can always set up test pages that you can tweak while you see how it goes.

  mco 12:17 08 Sep 2007

re your comment about'I'm concerned that if I size a web page to look like a letter in my editor it will look different on other browsers'
Why not download all the browsers you can think of - Firefox/Opera etc as well as IE (and you can have IE 6 and 7) and then you will see in advance what your work will look like on different browsers.

  MS35 19:36 08 Sep 2007

Just thought there would be one foolproof way of setting the web page size and format from my sites settings and disabling the resize, maximise, copy, etc options so it would look the same to all. If there's no other options i'll follow the advise above.

Did think about going down the route of forcing a pdf, but maybe this would limit accesibilty too much as not everyone uses or wants to download acrobat?

Thanks.

  IntoPCs 19:43 08 Sep 2007

If you set up a web page to print you will have to find a way of disabling the browser headers and footers - usually displaying the number of pages, date and web address

  DieSse 00:49 19 Sep 2007

To make a document that will look and print the same from any web broswer on any sysatem, I use pdfs.

Write the document in Word, or whatever, then use a PDF printer program to convert it to a pdf file. Put the pdf file onto your site, and a button with a link to it.

The advantages of pdf are that any system will see the pdf file exactly as you composed it, and can print it out.

I use PrimoPDF to produce my pdf files - it's free and has no banners or trial labels. click here

If you need to create a personalised document "on-the-fly", there is a paid version that will do that too.

  DieSse 00:55 19 Sep 2007

Should have started off by saying I found no other way to get the universality, lack of headings, etc, etc that you (and I) wanted.

Anyone that doesn't want acrobat reader, or some equivalent (Foxit, for instance) must be raving IMHO - so much is published in this standardised format that to lock yourself out of it makes little sense.

Don't forget to include links to download acrobat (and possibly Foxit too) for those who don't have it.

I also recommend forcing you button link to open the pdf in a new tab/page.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Best phone camera 2017

Stunning new film posters by Hattie Stewart, Joe Cruz & more

iPad Pro 10.5in (2017) review

28 astuces pour profiter au mieux de votre iPhone