Be careful how you remove critical data from a PDF file

Quite often people want to obscure or remove critical data in a PDF file. For example they want to send us a PDF file to examine but remove personal or classified data.

One common way to do this is to have a black box drawn over the text which hides the text or image. This works fine for plain viewing but does not actually remove the data.

The problem is that the PDF file consists of a stream of commands. So while the text cannot be seen when the PDF is displayed, it can easily be viewed by examining the text stream.

So if you want to make sure text cannot be seen, you need to physically modify the PDF text data and not just draw over it.

This post is part of our “Understanding the PDF File Format” series. In each article, we discuss a PDF feature, bug, gotcha or tip. If you wish to learn more about PDF, we have 13 years worth of PDF knowledge and tips, so click here to visit our series index!

The following two tabs change content below.

Mark Stephens

System Architect and Lead Developer at IDRSolutions
Mark Stephens has been working with Java and PDF since 1999 and has diversified into HTML5, SVG and JavaFX. He also enjoys speaking at conferences and has been a Speaker at user groups, Business of Software, Seybold and JavaOne conferences. He has a very dry sense of humor and an MA in Medieval History for which he has not yet found a practical use.

Related Posts:

Markee174

About Mark Stephens

Mark Stephens has been working with Java and PDF since 1999 and has diversified into HTML5, SVG and JavaFX. He also enjoys speaking at conferences and has been a Speaker at user groups, Business of Software, Seybold and JavaOne conferences. He has a very dry sense of humor and an MA in Medieval History for which he has not yet found a practical use.

One thought on “Be careful how you remove critical data from a PDF file

  1. [...] This post was mentioned on Twitter by Andrew, JPedal Java PDF Blog. JPedal Java PDF Blog said: New Blog Post: Be careful how you remove critical data from a PDF file: Quite often people want to obscure or remo… http://bit.ly/9MN4VO [...]

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>