September 9, 2001 - Popping Up the Page Setup Dialog
September 9, 2001 Popping Up the Page Setup Dialog Tips: September 2001
Yehuda Shiran, Ph.D.
|
TemplatePrinter
's showPageSetupDialog()
method. The following function parses the action request passed by the print template loader from Microsoft. Notice the call to showPageSetupDialog()
when the action is "Prompt"
:
invocations = 0;
function CheckIfPrintRequested() {
invocations++;
if (invocations > 1) return;
switch (dialogArguments.__IE_PrintType) {
case "Prompt":
if (printer.showPageSetupDialog()) PrintPrep();
break;
case "NoPrompt":
PrintPrep();
break;
case "Preview":
default:
break;
}
}
To learn more about print templates, read Column 89 (Print Templates, Part I) and Column 91 (Print Templates, Part II: TemplatePrinter.) Download the Microsoft print template loader.