The Den of Discourse

The Den of Discourse (http://www.dave.co.nz/forum/index.php)
-   Guestbook / Forum (http://www.dave.co.nz/forum/forumdisplay.php?f=2)
-   -   Change print settings using Javascript (http://www.dave.co.nz/forum/showthread.php?t=129)

Marcos Mamede 21st April 2005 08:30 AM

Change print settings using Javascript
 
Dave,

I read the post "Change print settings using Javascript" on Media College and i saw that Rajesh didn't send the javascript to control printer settings on IE.

Well, bellow you can see the answer using ScriptX, an Active X produced by Meadroid Company.

This component is recommended on article
http://msdn.microsoft.com/library/default.asp?URL=/library/en-us/dnscrpt/html/dhtmlprint.asp and its page is http://www.meadroid.com/scriptx/index.asp.

It has paid advanced options and free basic options.

In your HTML Page you have to put this:

function myPrint(frame) {

factory.printing.leftMargin = 1.0;

factory.printing.topMargin = 1.0;

factory.printing.rightMargin = 1.0;

factory.printing.bottomMargin = 1.0;

factory.printing.portrait = false;

factory.printing.Print(false, frame); // print without prompt
}

And, remember, put ScriptX.cab file into your application directory.

Best regards and i'm sorry if i made a mistake in english.

Marcos Mamede
Brazilian .NET Programmer






All times are GMT +13. The time now is 07:13 AM.