spacer

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

home / experts / javascript / column92


Print Templates, Part III: HeaderFooter

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

In this column we continue our series on print templates. Print templates first appeared in Internet Explorer 5.5, and were later improved in Internet Explorer 6. In column 89, Print Templates, Part I, we showed you how to assemble a print template with two out of the four elements of print templates: LayoutRect and DeviceRect. In Column 91 (Print Templates, Part II: TemplatePrinter) we added the TemplatePrinter element. In this column, we cover the fourth and last element of print templates, HeaderFooter. The HeaderFooter behavior assembles the header's and footer's HTML. It uses both instuctions and data in the synthesis process. In this column, we'll show you how to control and impact the HTML generation for the header and footer.

The only way to call HeaderFooter is through C++ code. Relax, we are not going to teach you C++ in this column. Luckily, Microsoft wrote an application to which you can feed your own print templates and the documents you want to print. This application comes with sample print templates that our columns are based on. In this column we introduce the usage of HeaderFooter with two templates, template4 and template5. They differ in the way we update the total number of pages after laying out all pages.

In this column you will learn:

You can see the full code listing of template4 on Page 7 and the code listing of template5 on Page 8. Load them both from the enclosed zipped file.

Next: How to add a HeaderFooter element

More Resources from Doc JavaScript
Columns Popular Columns Tips Tools
Latest Columns
41-50 | 31-40 | 21-30
11-20 | 1-10
Working with Windows
JavaScript and Frames
Bookmarklets
Random Tips
Personalized Tips
RSS Channels
Menu Builder
Rollover Builder
Rotation Builder
Reference Tip Categories (want one?)
Links
For Your Site
Did you learn something? Do you like this site? Please link to us!

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: September 10, 2001
Revised: September 10, 2001

URL: http://www.webreference.com/js/column92/index.html