MeadCo's MaxiPT® 1.0
April 2001
MeadCo's MaxiPT provides printing capabilities that are significantly more flexible and powerful than Internet Explorer's standard offering. Currently the functionality provided by MaxiPT can be conditionally grouped by data input method under the following two headings:
MaxiPT incorporates these additional properties:
document.printingRules.allPagesHeader = "<div align=center> <h1> MeadCo's MaxiPT 1.0 </h1> <br>"+ "Header for &p page <br> time: &T </div>";
document.printingRules.firstPageFooter = "<div align=right> <h3> MeadCo's MaxiPT 1.0 </h3> <br>"+ "Footer for page &p of &P </div>";
document.printingRules.extraFirstPageFooter = "<font color="#0000FF"> Total pages: <b>&P</b> - "+ "<i>Technical Data Sheets</i><font>";
document.printingRules.allHeaderHeight = 120; // points document.printingRules.extraFirstFooterHeight = 60;
document.printingRules.pageRange = "1,3-5,7,9-11";
document.printingRules.printingPass= "even";
document.printingRules.mirrorMargins = true;
document.printingRules.optimalPageLayout = true;
document.printingRules.limitContentLastPage = 2.5; // inches
document.printingRules.optimalPageLayoutDirection = "Equally"; // "Top", "Botton", "Equally"
document.printingRules.useActiveFrame = true;
document.printingRules.pageWidth = 1280; // points document.printingRules.pageHeight = 1024;
document.printingRules.pageZoom = "50%";
The following code snippet illustrates how to customize the various printing settings:
<script defer> function window.onload() { document.expando = true; document.printingRules.diffFirstPageHeadFoot = true; // header and footer first page different document.printingRules.firstPageHeader = "<i>------- Header for <b> first </b> page -------</i>"; document.printingRules.firstPageFooter = "<i>------- Footer for <b> first </b> page -------</i>"; document.printingRules.extraFirstPageFooter = "Additional footer. Total pages: <b>&P</b>"; document.printingRules.allPagesHeadFoot = true; // activation of settings of header and footer for all pages document.printingRules.allPagesHeader = "<i>------- Header for <b> &p </b> page -------</i>"; document.printingRules.allPagesFooter = "<i>------- Footer for <b> &p </b> page -------</i>"; /* // all of these values will be automatically calculated cause we decide not set it document.printingRules.firstHeaderHeight = 180; document.printingRules.firstFooterHeight = 180; document.printingRules.extraFirstFooterHeight = 60; document.printingRules.allHeaderHeight = 120; document.printingRules.allFooterHeight = 120; */ document.printingRules = {pageRange: "1,3-5,7,9-11", printingPass: "odd&even", mirrorMargins: true} document.printingRules = {optimalPageLayout: true, limitContentLastPage: 4.5, optimalPageLayoutDirection: "Equally"} document.printingRules = {useActiveFrame: true, pageWidth: 1280, pageHeight: 1024} /* // this value will be automatically calculated cause we decide not set it document.printingRules.pageZoom = "50%"; */ factory.printing.templateURL = "PT_main.htm"; // Printing with prompt without Preview factory.printing.Print(true); } </script>To print specific information as part of the header or footer, include the following characters as part of the text:
Shorthand | Meaning |
&w | Window title |
&u | Page address (URL) |
&d | Date in short format (as specified by Regional Settings in Control Panel) |
&D | Date in long format (as specified by Regional Settings in Control Panel) |
&t | Time in the format specified by Regional Settings in Control Panel |
&T | Time in 24-hour format |
&p | Current page number |
&P | Total number of pages |
The following code snippet illustrates how to customize the various printing settings and show Print Preview:
<script defer> function window.onload() { document.expando = true; document.printingRules.diffFirstPageHeadFoot = true; // header and footer first page different document.printingRules.firstPageHeader = "<i>------- Header for <b> first </b> page -------</i>"; document.printingRules.firstPageFooter = "<i>------- Footer for <b> first </b> page -------</i>"; document.printingRules.extraFirstPageFooter = "Additional footer. Total pages: <b>&P</b>"; document.printingRules.allPagesHeadFoot = true; // activation of settings of header and footer for all pages document.printingRules.allPagesHeader = "<i>------- Header for <b> &p </b> page -------</i>"; document.printingRules.allPagesFooter = "<i>------- Footer for <b> &p </b> page -------</i>"; document.printingRules = {pageRange: "1,3-5,7,9-11", printingPass: "odd&even", mirrorMargins: true} document.printingRules = {optimalPageLayout: true, limitContentLastPage: 4.5, optimalPageLayoutDirection: "Equally"} document.printingRules = {useActiveFrame: true, pageWidth: 1280, pageHeight: 1024} factory.printing.templateURL = "PT_main.htm"; // Show Print Preview factory.printing.Preview(); } </script>