Print Templates, Part I: Creating Print Templates with Behaviors - Doc JavaScript
Print Templates, Part I
Creating Print Templates with Behaviors
Internet Explorer 6 improves the printing model, in terms of better handling of lines at page boundaries, text spacing quality, and uniformity across printers. The print architecture underwent a major overhaul in Internet Explorer 5.5, by introducing the Print Preview and print template capabilities. By creating print templates, you can control:
- The layout of pages and their content when printed/previewed.
- The print job parameters such as the page printing order.
- The look of the Print Preview window and controls available on the print preview user interface.
You can do a lot with print templates. Among other things, print templates can be used for:
- Adding fixed banners to print jobs, including company logos, legal notices, and advertisements.
- Customized placement and styling for header and footer elements, such as page numbers or chapter headings.
- Application-specific printing (calendars).
- Multi-fold brochure printing.
- Book-style printing using mirrored margins for the odd and even pages.
Print templates are HTML files that use four print template behaviors:
LayoutRect
DeviceRect
TemplatePrinter
HeaderFooter
DHTML Behaviors are similar to libraries in other programming languages. A behavior is like a function that you can access via an API (Application Procedural Interface). It sports a set of properties and methods you can invoke for your particular object. DHTML behaviors were first introduced in Internet Explorer 5.0. Internet Explorer provides you with a set of default behaviors. The above four behaviors belong to this category of default behaviors. You can write behaviors of your own and put them in a ".htc"-extension file. To learn more about behaviors, go to Column 22, DHTML Behaviors and Column 23, More on DHTML Behaviors.
Next: How to use the DeviceRect
behavior
Produced by Yehuda Shiran and Tomer Shiran
All Rights Reserved. Legal Notices.
Created: July 30, 2001
Revised: July 30, 2001
URL: https://www.webreference.com/js/column89/2.html