Controlling the Printed Page

Controlling the Printed Page

Is it possible to control the printed page size and layout in DHTML? In other words, can I control how a DHTML page looks when it is printed and control elements such as page breaks and object placement on a printed page? I have an Automated Letter Generation system that creates large mailings using Microsoft Word’s mail merge facility and I am looking into using DHTML to replace Microsoft Word.

Printing is becoming a major issue with browsers, but unfortunately neither of the major browsers supports printing effectively in version 4.0. However, both Microsoft and Netscape have incorporated considerably more sophisticated printing support in the 5.0 versions of their browsers. For example, IE5 will have a window.print() method that will invoke the print functions, and two new Cascading Style Sheets (CSS) properties: page-break-before and page-break-after that can take values of “auto” (the default), “always” (page always gets broken at indicated point), and “never” (page never gets broken at indicated point).

You can also, at least with IE4+, specify DIVs and other containers in inches rather than pixels. For example, if you set up a DIV as follows:

Lorem Ipsum nunc ....

then the DIV will print at those dimensions upon output.

Share the Post:
data observability

Data Observability Explained

Data is the lifeblood of any successful business, as it is the driving force behind critical decision-making, insight generation, and strategic development. However, due to its intricate nature, ensuring the

Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular