[xep-support] PDF redaction strategy
David E Nedrow
nedlist at grandviewtheatre.net
Wed Jun 24 20:17:56 PDT 2009
I've been looking for a way to mark certain items for redaction. I
would basically like to add 'redact="true"' to any element that should
be redacted. When the PDF is generated any elements marked for
redaction are displayed as a black box whose sides are aligned with
the content area of the element that would otherwise have been rendered.
The closest I've come is a suggestion on docbook-apps for the
following...
<xsl:template match="text()[ancestor::*[@redact='yes']]">
<xsl:value-of select="translate
(.,'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890-_=+!
@#$%^&*();':"<>,./?',
'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
')"/>
<!-- Add other chars, e.g. accented chars and other languages, as
needed -->
</xsl:template>
The output of this would be printed black on black. There are a couple
of drawback...
1) It doesn't handle elements like <imagedata/>
2) It doesn't preserve the actual flow of the document, when compared
to a non-redacted version. This is caused by a series of replacement
letters will almost never match the content area of the "regular"
output.
Has anyone ever used XEP for something similar to this? I'm thinking
that perhaps between my customization layer and XEP, I could tell XEP
to render the element as a black box.
Thoughts?
-David
-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
More information about the Xep-support
mailing list