Hack 24 Create a Custom Text WatermarkInstead of using Word's predefined options, you can create your own watermark text with a few lines of PostScript slipped inside your document. Word includes a neat feature for inserting a watermark behind a document. You can either choose a picture to use as the watermark, or choose from among a list of text options. To see the available options for text watermarks, select
Format Figure 3-43. You must choose from a predefined list of text watermarksBut what if the text you'd like to use for a watermark isn't on that list? Or how about including the date or document author as part of the watermark? Fortunately, you can use a PRINT field and a few lines of PostScript to create your own custom watermark.
The PRINT field embeds PostScript instructions within a document. PostScript is a computer language that tells a printer how to draw a page. Most modern printers have a built-in PostScript interpreter that can translate PostScript instructions into a printed page. If you go to File
To print crop marks, you need to include the PostScript instructions for drawing the marks on a page within the PRINT field. There are some important things to note about PostScript before diving in: The comment character in PostScipt is %. The interpreter ignores any line that begins with a %. PostScript uses standard (X,Y) coordinates to refer to each page, with 0,0 at the bottom left and 612,792 at the top right on a standard letter page. The numbers represent points measuring 1/72 of an inch. Unlike most computer languages, the arguments to a PostScript function come before the function itself. For example, to move to the point 10,10 on a page, you would type 10 10 moveto, not moveto 10 10.
3.12.1 The Field Code
To insert a watermark with the text "Super Secret," press Ctrl-F9 to create a new, blank field in your document and enter the following text between the field braces, as shown in Figure 3-44: PRINT \p page "% Watermark /Helvetica findfont 54 scalefont setfont 200 350 moveto 45 rotate .75 setgray (SUPER SECRET) show " Figure 3-44. A PRINT field including PostScript code to create a watermarkThe field produces the watermark shown in Figure 3-45. Figure 3-45. A watermark created with a PRINT fieldTo create a watermark that appears on every page in a document, place the PRINT field within the document's header. To include dynamic content in the watermark, you can nest another field, such as a DATE field, within the PRINT field, as shown in Figure 3-46. Figure 3-46. Nesting fields inside the PRINT fields is a way to include dynamic content in a text watermark |