spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / javascript / column89


Print Templates, Part I

Developer News
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?

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

http://www.internet.com

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Rolling Out Your Own HTML Application Version Control · HTML 5: Client-side Storage · Working with Ajax Server Extensions
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Wi-Fi Product Watch, November 2009 · Chip Market Recovering From '08 Collapse · Low-Cost Tools to Kickstart Your New Business


Produced by Yehuda Shiran and Tomer Shiran
All Rights Reserved. Legal Notices.
Created: July 30, 2001
Revised: July 30, 2001

URL: http://www.webreference.com/js/column89/2.html