home *** CD-ROM | disk | FTP | other *** search
- // add watermark to front-most document
-
-
-
- //$.bp(); // Uncomment this line to cause the script to be run in the JavaScript debugger window.
-
-
-
- var docCount = documents.length;
-
-
-
- if (docCount == 0)
-
- {
-
- documents.add();
-
- }
-
-
-
- var docRef = documents[0];
-
- var destLayerRef = docRef.layers.add();
-
- destLayerRef.name = "Watermark";
-
-
-
- var textRef = destLayerRef.textFrames.add();
-
- textRef.contents = "DRAFT";
-
- textRef.opacity = 42;
-
-
-
- var docHeight = docRef.height;
-
- var docWidth = docRef.width;
-
- textRef.height = docHeight/2;
-
- textRef.width = docWidth;
-
-
-
- textRef.rotate(45, undefined, undefined, undefined, undefined, Transformation.CENTER);
-
-
-
- textRef.width = docWidth;
-
- textRef.height = docHeight;
-
- textRef.position = [0, docHeight];
-
-
-
-
-
-