When publishing documents online, you have to operate under the assumption that someone, somewhere, has made a copy of it and that it will exist forever. Because of that, we need to take extra care to remove sensitive data from those files before they go to the Internet universe. This is why redacting (the removal of the sensitive content) is such an important feature. In a PDF file, you are creating redaction annotations that will eventually be applied to the document and take the place of the content that was redacted. When content is redacted, you can specify what should be put in the space left by removing the sensitive content – this is typically a black rectangle. In some cases, though, you may be required to provide additional information in the document to indicate what type of content was removed, or why the content was removed.
Redaction annotations have a unique property designed to handle those instances where you need to specify what type of content was removed, or why the content was removed, and it is called Overlay Text. By setting the Overlay Text on a redaction annotation, you are saying “this text should be displayed on top of the redaction annotation” which will enable a human to read that text, understand what type of content was removed, and why, without knowing the actual content. If you are redacting content in PDFs that will be published due to a Freedom of Information Act request, Overlay Text is extremely important to you. The Freedom of Information Act requires that content that is redacted is replaced by one of the defined redaction codes to indicate what was redacted. We recently updated the RedactAndSanitize sample for our PDF Java Toolkit to demonstrate setting the Overlay Text property so that those who need to comply with the Freedom of Information Act can do so with ease! Let’s take a look at the updates to the sample so you know how to update your application to specify overlay text.