Forum How do I...?

Tagged PDFs and hidden content (display:none;)

adriencater
I know that tagged PDF support is in the works, but I have a related question about content in both future tagged and current 'untagged' documents:

Working in a bank, we have some documents which contain sensitive information, and often times we prepare 2 versions of a document, one complete, and one with sensitive information omitted.

Ideally, I could add a class to certains div's, (.confidential), and simply apply a display:none; property when necessary.

But will this have the effect of removing all trace of this information from the final PDF? (unlike in HTML where the hidden content is still visible in the source code)

There are many stories of confidential information being leaked from documents redacted with simple black rectangles "covering" sensitive content in a PDF; so it's prudent to take a 'paranoid first' position on these things :)

Also something to keep in mind with tagged text support...
mikeday
Yes, "display: none" is a safe way of redacting confidential information, as it is removed early from the document tree. However, removing it from the document with JavaScript is slightly safer still, as "display: none" content could theoretically be captured using the "string-set" CSS property.

The only truly dangerous ways of redacting content are drawing things over it as you mention, or changing the color to white or transparent, in which case it will still be in the generated PDF.