Going around "Flate stream is corrupt" exception.


I am using pdftron to convert multipage pdf's to single page tiffs.

On some of my pdf conversions I get an
error:"pdftron.Common.PDFNetException: Exception: Message: Flate
stream is corrupt."

It appears that this only happens when the pdf has a highlight.


This error can occur if PDF document is encrypted, but you don't
initialize document's security handler. To go around the problem call
pdfdoc.InitSecurityHandler() just after opening the document (i.e.
PDFDoc constructor).