PDF / XPS redaction in the web browser

Q:

  1. We have to display PDF/XPS documents in Silverlight (via SilverDox - http://www.pdftron.com/silverdox), create redactions, and save the redactions in a database.

  2. After we’ve processed all of the documents, we need to put the documents through a system service that converts the documents to tiffs and burns in the redactions.

We have some code that converts xps documents to tiffs. The challenge is the redactions. Is there any way to do this with your product suite? If not, is there a way to open the documents in SilverDox and render the Canvas for each container to a tiff?

A:
PDFNet includes support for redaction via ‘pdftron.PDF.Redactor’ add-on (http://www.pdftron.com/pdfnet/features.html#Redaction).

For an example of how to use Redactor please see PDFRedact sample project: http://www.pdftron.com/pdfnet/samplecode.html#PDFRedact

Based on your project description, it seems that you are developing a web based app and that you may be using SilverDox (http://www.pdftron.com/silverdox/samplecode.html) or the WebViewer (http://www.pdftron.com/pdfnet/webviewer/demo.html). Either way, you can use these browser API to add browser based redaction support by drawing custom annotations / rectangles.

However, the redaction process itself would not be done in the browser, but on the server where you would use ‘pdftron.PDF.Redactor’ to apply the redactions to the original (PDF?) document.

If you need to view the final / redacted document in the WebViewer or Silverlight you can call pdftron.PDF.ToXod() to produce the redacted XOD.

PDFTron Redactor is a ‘vector based redactor’ and does not require conversion to TIFF etc. But it required you can always use pdftron.PDFDraw.Export() to convert redacted pages to TIFF or other image formats.

Q: Our requirement is to convert redacted xod files to redacted pdf files.
If I understand your suggestion, we would have to:

  1. Convert the xod files to pdf
  2. Apply the redactions to the pdfs using pdftron.PDF.Redactor
  3. Convert the redaced pdf’s to tiffs.

Is that what your suggesting?

A:

Since you are getting XOD from PDF, you can apply redactions directly on original PDF (with pdftron.PDF.Redactor), then export to redacted XOD and/or TIFF.

You can also do PDF → XOD → PDF → redact → XOD/TIFF but it just look less efficient.

When you save redactions in Silverdox you would save them as a very simple XML (e.g. XFDF) with a bunch of rectangles. You store this your DB. Only when you decide to apply redaction you load the rectangles (i.e. redact region) and apply the redaction on the original document (i.e. PDF) instead of the XOD.

You can then serve the customer with a redacted PDF (no conversion required, just PDFDoc.Save(“redacted.pdf”)), redacted XPS (with PDFDoc.Convert.ToXps(“redacted.xps”)), or redacted XOD (with PDFDoc.Convert.ToXod(“redacted.xod”)), or redacted TIFF (PDFDraw.Export()).

On Wednesday, October 24, 2012 5:48:47 PM UTC-7, Support wrote:

Q:

  1. We have to display PDF/XPS documents in Silverlight (via SilverDox - http://www.pdftron.com/silverdox), create redactions, and save the redactions in a database.

  2. After we’ve processed all of the documents, we need to put the documents through a system service that converts the documents to tiffs and burns in the redactions.

We have some code that converts xps documents to tiffs. The challenge is the redactions. Is there any way to do this with your product suite? If not, is there a way to open the documents in SilverDox and render the Canvas for each container to a tiff?

A:
PDFNet includes support for redaction via ‘pdftron.PDF.Redactor’ add-on (http://www.pdftron.com/pdfnet/features.html#Redaction).

For an example of how to use Redactor please see PDFRedact sample project: http://www.pdftron.com/pdfnet/samplecode.html#PDFRedact

Based on your project description, it seems that you are developing a web based app and that you may be using SilverDox (http://www.pdftron.com/silverdox/samplecode.html) or the WebViewer (http://www.pdftron.com/pdfnet/webviewer/demo.html). Either way, you can use these browser API to add browser based redaction support by drawing custom annotations / rectangles.

However, the redaction process itself would not be done in the browser, but on the server where you would use ‘pdftron.PDF.Redactor’ to apply the redactions to the original (PDF?) document.

If you need to view the final / redacted document in the WebViewer or Silverlight you can call pdftron.PDF.ToXod() to produce the redacted XOD.

PDFTron Redactor is a ‘vector based redactor’ and does not require conversion to TIFF etc. But it required you can always use pdftron.PDFDraw.Export() to convert redacted pages to TIFF or other image formats.

Q:

We have terabytes worth of documents. We can’t store the documents redundantly as xod and pdf. It sounds like the real problem is that xod is the best format for displaying documents in Silverlight, but we have to go through pdf in order to get tiffs. It sounds like our only options are:

  1. Store the documents redundantly as both xod and pdf

  2. Store the documents as pdf. Convert them to xod whenever we need to display them.

  3. Store the documents as xod. Convert them to pdf whenever we need to generate tiffs.


A:

  1. Store the documents redundantly as both xod and pdf

This is the most CPU efficient option but ~ doubles the storage.

  1. Store the documents as pdf. Convert them to xod whenever we need to display them.

This is the least CPU efficient option. Works only if you have very small server loads. For example, see WebViewerStreamin sample which is included as part of PDFNet SDK.

  1. Store the documents as xod. Convert them to pdf whenever we need to generate tiffs.

This is may be a compromise between 1 & 2. Since the conversion from XOD to redacted document would not be frequent this is definitely more CPU efferent than option 2.

On Wednesday, October 24, 2012 6:29:59 PM UTC-7, Support wrote:

Q: Our requirement is to convert redacted xod files to redacted pdf files.
If I understand your suggestion, we would have to:

  1. Convert the xod files to pdf
  2. Apply the redactions to the pdfs using pdftron.PDF.Redactor
  3. Convert the redaced pdf’s to tiffs.

Is that what your suggesting?


A:

Since you are getting XOD from PDF, you can apply redactions directly on original PDF (with pdftron.PDF.Redactor), then export to redacted XOD and/or TIFF.

You can also do PDF → XOD → PDF → redact → XOD/TIFF but it just look less efficient.

When you save redactions in Silverdox you would save them as a very simple XML (e.g. XFDF) with a bunch of rectangles. You store this your DB. Only when you decide to apply redaction you load the rectangles (i.e. redact region) and apply the redaction on the original document (i.e. PDF) instead of the XOD.

You can then serve the customer with a redacted PDF (no conversion required, just PDFDoc.Save(“redacted.pdf”)), redacted XPS (with PDFDoc.Convert.ToXps(“redacted.xps”)), or redacted XOD (with PDFDoc.Convert.ToXod(“redacted.xod”)), or redacted TIFF (PDFDraw.Export()).

On Wednesday, October 24, 2012 5:48:47 PM UTC-7, Support wrote:

Q:

  1. We have to display PDF/XPS documents in Silverlight (via SilverDox - http://www.pdftron.com/silverdox), create redactions, and save the redactions in a database.

  2. After we’ve processed all of the documents, we need to put the documents through a system service that converts the documents to tiffs and burns in the redactions.

We have some code that converts xps documents to tiffs. The challenge is the redactions. Is there any way to do this with your product suite? If not, is there a way to open the documents in SilverDox and render the Canvas for each container to a tiff?

A:
PDFNet includes support for redaction via ‘pdftron.PDF.Redactor’ add-on (http://www.pdftron.com/pdfnet/features.html#Redaction).

For an example of how to use Redactor please see PDFRedact sample project: http://www.pdftron.com/pdfnet/samplecode.html#PDFRedact

Based on your project description, it seems that you are developing a web based app and that you may be using SilverDox (http://www.pdftron.com/silverdox/samplecode.html) or the WebViewer (http://www.pdftron.com/pdfnet/webviewer/demo.html). Either way, you can use these browser API to add browser based redaction support by drawing custom annotations / rectangles.

However, the redaction process itself would not be done in the browser, but on the server where you would use ‘pdftron.PDF.Redactor’ to apply the redactions to the original (PDF?) document.

If you need to view the final / redacted document in the WebViewer or Silverlight you can call pdftron.PDF.ToXod() to produce the redacted XOD.

PDFTron Redactor is a ‘vector based redactor’ and does not require conversion to TIFF etc. But it required you can always use pdftron.PDFDraw.Export() to convert redacted pages to TIFF or other image formats.

Q: If we only store things as xod, how to we convert them to pdf?

A: Since XOD is XPS, you can use pdftron.PDF.Convert.FromXps()

Q: If we only store things as xod, how to we convert them to pdf?

A: Since XOD is XPS, you can use pdftron.PDF.Convert.FromXps()