27 Managing PDF Watermark

A watermark is a image or text superimposed on selected pages in a PDF document. When enabled, the PDF Watermark component can apply a watermark at check-in (static watermark) or when a user requests to view or download a PDF document (dynamic watermark).

PDF Watermark can also add security features to PDF files as they are downloaded for viewing. Password security can be added, and the ability to print or copy the contents of the file can be enabled or disabled.

This chapter provides information about managing PDF Watermark:

27.1 Understanding PDF Watermark

This section discusses the following topics:

27.1.1 Types of Watermark

A static watermark is applied during content check-in as a follow-on step to the Inbound Refinery conversion. To select a watermark for content to be converted to PDF, enter a valid Watermark Template ID during check in. Only documents that Inbound Refinery converts to PDF can receive a static watermark. After a document receives a static watermark, all viewers of the document see the same watermark.

In the same way, content checked in by an automated process such as WebDAV or BatchLoader can also be given a static watermark, provided a valid Watermark Template ID is provided. For more information about creating templates and template IDs, see Section 27.1.2.

Dynamic watermarks are generated as needed when a user requests to view or download a PDF document. Dynamic watermarks can contain variable information (for example, the user name or the requesting user, or the date and time of download). For this reason, different users may see the same content with different watermarks. With dynamic watermarks, only the web layout form is watermarked. The original PDF file is unchanged in its vault location.

Dynamic watermarking is rules-based. If a request for a PDF document satisfies a pre-defined rule, the template associated with that rule is used to watermark a copy of the content before the copy is returned to the requesting user. System administrators define rules and set up specific conditions for determining which requested content gets a dynamic watermark.

For more information about specifying rules for dynamic watermarks, see Section 27.1.3.

The following kinds of watermarks can be used:

  • Text: Specified the text which can include metadata values for the content item, and include special keywords, such as $DATE$, that provide information about the content item at the point it is watermarked.

  • Image: An image in any of the supported bitmap (raster) formats.

  • Signature: If Electronic Signatures is enabled, a watermark can be created from the electronic signature metadata associated with a content item.

Details are specified for type of watermark as well as placement. One or more watermarks of any type can be used in a given document. Defined watermarks are stored in a template that is checked in with a content ID and default metadata values.

27.1.2 Templates

Whether a watermark is applied statically at check-in or dynamically when the PDF file is requested, the watermark information is stored in a template which includes information about the text or image watermark itself and any rules defined for its use.

Legacy schema templates are supported for watermarking, but any change to the template results in an upgrade to the new schema. Consequently, any template which is changed in Content Server version 11gR1 may not work correctly with older versions of Content Server.

For information about creating templates, see Section 27.2.3.

A template is checked into the content repository as a managed content item with default metadata and two additional metadata fields:

  • Watermark Template ID: The content ID (dDocName) for the template which can be assigned when the template is created. This is specified for static watermarks when the content item is checked in.

  • Watermark Template Type: A list of supported template types. Currently, a single option is provided, the default PDFW_Template.

In addition to these fields, additional metadata values can be specified. This helps ensure that default values are provided for fields that require a value.

27.1.2.1 Template Security

A user password requires the user to provide a password to open and view the PDF. An owner password restricts the ability to change the PDF file or modify the security settings within the PDF file.

These security settings set access restrictions within the associated PDF file itself using PDF security. These access restrictions are independent of access restrictions to the content item defined by Content Server.

User/Owner passwords are encrypted in the PDF Watermark Template with a third-party encryption library. Encryption is performed automatically when the template is saved and decryption is performed automatically when the template is used for a watermark.

Oracle does not provide an encryption library. Library bcprov-jdk14-138.jar is a recommended third-party encryption library that is downloadable BouncyCastle.org, but any library can be used. For information about specifying an encryption library, see Section 27.2.1.

Passwords in legacy templates are not encrypted until the template is saved. A template cannot be saved unless it ischanged. Therefore, to encrypt template passwords, edit each legacy template and make a minor change before saving.

27.1.3 Dynamic Watermark Rules

Rules are used to determine which template is applied for dynamic watermarking. After creating a template, the rules for the template can be defined. The same template can be used for static or dynamic watermarking. Rules are used only for dynamic watermarking.

If a template has multiple rules, the rules are applied in the order listed. Rules should be ordered with the most specific tests earlier in the list, and more general ones after that. All rules must test positive for the watermark to be applied.

Within a rule, criteria can be set based on the values of selected metadata fields. For example, you can test the dDocAuthor field for specific authors or the dDocType for a specific type of document. The order in which you define criteria for a rule does not matter. All criteria must be true for the associated rule to test positive.

27.1.4 PDF Optimization

PDFs that come from the PDF Converter may have been optimized for faster Web viewing. If a static watermark is applied to that content, the optimization is lost. Post-watermarking optimization requires a third-party optimizer which is not provided with PDF Watermark. To use optimization, a distiller engine/optimizer must be installed and fully operational. The chosen optimizer must be able to execute conversions with a command-line (for example, a script file or a .bat file).

Important:

A PDF optimizer is not provided with PDF Watermark. If using the Optimization feature, install a third-party distiller engine before use and verify it is fully operational. The optimizer must be able to execute conversions on a command-line (for example, a script file or a .bat file).

27.1.5 Watermark Placement

Options are available for placing text or image watermarks at the top (header), center, or bottom (footer) of the page or at a particular location on the page with X-Y coordinates. Multiple watermarks can be used on a given document.

In the image below, the reference points for each of the positions is indicated by a point. The example image in each of the positions shows the orientation relative to the associated reference point. Example text in each of the positions shows one of the available horizontal alignment options (left, right, center). All text alignment options are available at each of the positions.

Surrounding text describes watermark_orientation.gif.

For standard placement, text and images reference a point at the top-center, middle-center, or bottom-center of the page. Images center horizontally around the associated reference point. With text, you can specify the horizontal alignment of the text with respect to this reference point (left, right, or center aligned).

For explicitly placed watermarks, the coordinates are in points, with each point equal to 1/72". The origin (0, 0) is the lower left corner of the page. For images, these coordinates specify the lower left corner of the image with the image extending up and to the right. For text, these coordinates specify the horizontal reference point for the alignment options, similar to the standard placement options.

27.2 Configuring PDF Watermark

This section describes tasks that are used to manage PDF Watermark.

27.2.1 Specifying the Classpath for an Encryption Library

The passwords defined in a template set corresponding passwords within the PDF file itself when the PDF file is rendered. The passwords stored in the template are encrypted using a third-party encryption library. A reference to an encryption library used with PDF Watermark must be provided for the Content Server to encrypt passwords stored in the template.

Oracle does not provide an encryption library for encrypting passwords. This procedure assumes the use of a third-party encryption library. One such library is bcprov-jdk14-138.jar which is downloadable from BouncyCastle.org, but any library can be used.

  1. Download an encryption library .jar file and paste it into the /shared/classes directory.

  2. From the Windows Start menu, choose Programs then Content Server-[Instance Name] then Utilities then System Properties.

  3. On the Systems Properties applet, open the Paths tab.

  4. Specify the following as the classpath:

    JAVA_CLASSPATH;$SHAREDDIR/classes/bcprov-jdk14-138.jar
    
  5. Click OK to save the changes and exit the System Properties utility.

27.2.2 Starting PDF Watermark Administration

Templates, rules and configuration for PDF Watermark are managed in using the PDF Watermark Administration page.

  1. Choose Administration then PDF Watermark Administration from the Main Menu.

  2. Click PDF Watermark Administration.

    The PDF Watermark Administration page opens.

27.2.3 Adding or Editing Templates

Define any required metadata field values before creating a template. After checking in the template, it can be modified as needed.

To define specific metadata fields for template check in:

  1. Choose Administration then PDF Watermark Administration from the Main Menu.

  2. On the PDF Watermark Administration page, click the Configuration tab.

  3. Highlight the Field Name and Value pair to define/edit and click Edit.

  4. On the Edit Default Value page, set the value to be applied for the Field name selected.

  5. Click Apply.

To add a template:

  1. Select the Templates tab on the PDF Watermark Administration page.

  2. To edit an existing template, select the template and click Edit. To create a new template, click Add.

  3. On the Add New/Edit Template page, name the template and assign it a meaningful content ID. The ID cannot be changed after the template is checked in.

  4. To add security to the template, click the Security tab.

    1. Select an encryption bit-depth for Security Level. The higher the number, the stronger the encryption. This encryption level applies to the passwords defined in the PDF file itself, not the watermark template. Oracle does not provide an encryption library for encrypting passwords stored in the template. For more information about adding an encryption library, see Section 27.2.1.

    2. To restrict access to the PDF file associated with the template, specify a User Password. Users are required to specify this password to view or download the PDF.

    3. To restrict the ability to change the PDF file or modify the security settings within the PDF file, specify an Owner Password.

      This password applies to the associated PDF file itself, not the current watermark template. Access to the template is governed by Content Server's security model.

    4. To prevent the user from printing any portion of the PDF file, set Print Allow to No. To permit printing at low resolution, selected Degraded.

    5. To prevent the user from copying portions of the PDF file, set Copy Allow to No.

  5. Click OK when done.

27.2.3.1 Add or Edit a Text Watermark

To add or edit a text watermark:

  1. Open the Add New/Edit Template page and click the Text Watermark tab.

  2. To add a watermark, click Add. To edit an existing watermark, click Edit. The

  3. On the Add New/Edit Text Watermark page, specify the Text to appear in the watermark. The text can include embedded symbols that are replaced by document information, such as the page count or the document name when the watermark is rendered.

  4. Select the Location on the page where the watermark appears.

  5. If Explicit is selected, specify the X-Coordinate and Y-Coordinate location for the watermark. Values are specified in points. Each point is 1/72 in. measured from the lower-left corner of the page.

  6. Specify the Rotation of text from 0 to 359 degrees, rotated counter clockwise.

  7. Select the horizontal Alignment at the specified location.

  8. Select the font, size, weight and color. Weight is disabled for those fonts that do not have an extended weight.

  9. Select whether to Layer the watermark Over or Under the content in the PDF (including other watermarks).

  10. Specify a Page Range. If left blank, the page range includes the entire document.

    Separate specific pages with commas (1,2,4). Separate the first and last pages in a page range with a colon (12:24). Use the keyword LAST to designate the last page without having to specify the actual page number. For example: 1,2,4,12:24,50:LAST.

  11. Specify a Page Range Modifier to watermark Even Pages Only or Odd Pages Only.

  12. Click OK when done.

27.2.3.2 Add or Edit an Image Watermark

Images must be checked in before use. To add or edit an image watermark:

  1. Open the Add New/Edit Template page and click the Image Watermark tab.

  2. To add a watermark, click Add. To edit an existing watermark, click Edit.

  3. On the Add New/Edit Image Watermark page, specify the Content ID of the image to use. The image can be any supported bitmap (raster) image format, such as GIF or JPG.

  4. Optionally specify a Scale Factor to preserve or modify the size of the image when it is used as a watermark. Without specifying a scale factor, images are rendered at 72 dpi.

    The Scale Factor is expressed as a percentage based on the following formula: default_dpi / image_dpi * 100%. For example, to maintain the size and resolution of a 300 dpi image, you calculate the Scale Factor as follows: 72 dpi / 300 dpi * 100% = 24% for a Scale Factor of 24.

  5. Select the Location on the page where the watermark appears.

  6. If Explicit is used for the location, specify the X-Coordinate and Y-Coordinate location for the watermark. Values are specified in points. Each point is 1/72 in. measured from the lower-left corner of the page.

  7. Select whether to Layer the watermark Over or Under the content in the PDF (including other watermarks).

  8. Specify a Page Range. If left blank, the page range includes the entire document.

    Separate specific pages with commas (1,2,4). Separate the first and last pages in a page range with a colon (12:24). Use the keyword LAST to designate the last page without having to specify the actual page number. The following page range includes all of these options: 1,2,4,12:24,50:LAST.

  9. Specify a Page Range Modifier to watermark Even Pages Only or Odd Pages Only.

  10. Click OK when done.

27.2.3.3 Add or Edit an Electronic Signature Watermark

To add or edit an electronic signature watermark:

  1. Open the Add New/Edit Template page and click the Signature Watermark tab.

  2. To add a watermark, click Add. To edit an existing watermark, click Edit.

  3. On the Add New/Edit Signature Watermark page, specify the Label to appear in the watermark. The text can include embedded symbols that are replaced by document information, such as the page count or the document name when the watermark is rendered.

  4. Specify the Fields to use in the watermark as a comma-delimited list. The fields are the standard or user-defined fields from the Electronic Signatures table.

  5. Select the Location on the page where the watermark appears.

  6. If Explicit is used for the location, specify the X-Coordinate and Y-Coordinate location for the watermark. Values are specified in points. Each point is 1/72 in. measured from the lower-left corner of the page.

  7. Select the font, size, weight and color. Weight is disabled for those fonts that do not have an extended weight.

  8. Select whether to Layer the watermark Over or Under the content in the PDF (including other watermarks).

  9. Specify a Page Range. If left blank, the page range includes the entire document.

    Separate specific pages with commas (1,2,4). Separate the first and last pages in a page range with a colon (12:24). Use the keyword LAST to designate the last page without having to specify the actual page number. For example: 1,2,4,12:24,50:LAST.

  10. Specify a Page Range Modifier to watermark Even Pages Only or Odd Pages Only.

  11. Click OK when done.

27.2.4 Creating and Editing Rules

A template must be created before rules can be defined. For more information, see Section 27.2.3.

To add or edit a rule:

  1. Select the Rules tab on the PDF Watermark Administration page.

  2. To add a new rule, click Add. To change an existing rule, select a rule and click Edit.

  3. For a new rule, on the Add New/Edit Rule page, enter a Name that describes the way a rule is used. The name cannot be changed after saving. To change the name of a rule, delete the rule and create a new one.

  4. Select a Template ID to associate with the rule.

  5. To add a new criterion, click Add. To change an existing criterion, select the criterion and click Edit.

  6. For a new criterion, on the Add New/Edit Criteria page, select the Field Name. After saving, the field selection cannot be modified. To specify a different field name, create a new criterion.

  7. Specify the Value for the selected field. If the field chosen is a list, select a value from the options list.

    Note:

    Rules criteria are case-sensitive. The value must match the case of the returned value. For example, if the title you enter is "foobar" and the value returned is "FooBar", it is considered a mismatch and the rule fails.

  8. To save the criterion, click OK.

  9. To save the criteria for the current rule, click OK.

    Within a rule, the order of criteria does not matter. All criteria must be satisfied for the rule to apply.

  10. To change the order of the rules assigned to the template, select a rule and use the Move Up and Move Down buttons to change the position of the rule in the list.

    The order in which the rules are tested can be significant, depending on the criteria used. In general, order the rules with the most specific tests (number of criteria) high in the list, and the more general ones (fewer criteria) lower down.

  11. Click OK.

27.3 Watermarking Scenarios

This section discusses the following topics:

27.3.1 Static Watermarking Scenario

Content Server receives processed content from Inbound Refinery. Inbound Refinery must have PDF Converter installed, enabled, and configured to convert the necessary file formats into PDF. When the PDF file is presented, the watermark template selected during the content check in is applied.

Watermark elements are pre-defined in the template used to watermark the incoming PDF. The watermark is applied and is delivered to requesters without regard for dynamic watermarking rules. Rules-based watermarking (Dynamic) can also be applied in addition to a static watermark.

Surrounding text describes flow1.gif.

27.3.2 Dynamic Watermarking Scenario

When a Web-viewable PDF is requested by a user, a check is performed based on the defined rulesets to determine if a watermark is applied to the Web-viewable PDF delivered to the requester.

If a request for a PDF document satisfies a pre-defined rule, the template associated with that rule is used to watermark a copy of the content before the copy is returned to the requesting user.

Surrounding text describes flow2.gif.

Important:

A PDF optimizer is not provided with PDF Watermark. If using the Optimization feature, install a third-party distiller engine before use and verify the optimizer is fully operational. The optimizer must be able to execute conversions on a command-line (for example, a script file or a .bat file).