Wrox Programmer Forums
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 2nd, 2004, 02:50 AM
Registered User
Join Date: Jul 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Page Setup

How do I change page size to us std fanfold using javascript in an html page?

Old February 11th, 2004, 12:13 AM
Authorized User
Join Date: Feb 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts

You want to change printer settings via javascript?

I'm pretty sure that's not allowed. It would be a serious security breach if js could get to that part of Windows. The best you can do is self.print() and let the user change the printer settings when the printer dialog box comes up.

You could pop-up a little message window just before calling self.print() that would advise the user as to the correct printer settings. However, the main window may come back to the front and obscure your pop-up, so open your popup with a specific window name (like MsgWin), then after self.print() try coding MsgWin.focus().

This is sort of off the top of my head...

Old February 11th, 2004, 12:07 PM
joefawcett's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts

Not allowed except via ActiveX or IE's print templates. Meadroid.com have an activex called scriptx that supports this in its free subset but obviously your user has to agree to install it on first use.



Similar Threads
Thread Thread Starter Forum Replies Last Post
Print a page without changing page setup nrajeshatwork Servlets 1 May 23rd, 2007 10:09 AM
IE page setup property using javascript ? param99 ASP.NET 1.0 and 1.1 Professional 0 December 7th, 2006 03:22 AM
Page Setup while Exporting to PDF pvasudevan Crystal Reports 2 November 11th, 2004 02:21 AM
Page setup thutt Access 1 June 17th, 2003 07:50 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.