pdfintegrity

does PDF support data degradation protection?


So we can add signatures to PDF files, which sign the content hash of the document. however, if one bit flips due to bitrot, the file will be corrupt and the signature worthless. Does PDF have some built in data integrity protection that would allow it to repair bitrot to a certain degree?

I'm aware that this can be achieved on a filesystem level, but I wonder if the PDF format itself also has facilities for this, and if so, how they can be enabled and whether they are included in PDF/A?


Solution

  • Does PDF have some built in data integrity protection that would allow it to repair bitrot to a certain degree?

    No. Quite the contrary, data streams in PDFs may be (and often are) compressed using FLATE. In uncompressed content streams a bit flip usually only damages a single instruction or two, often having only an effect on small parts of the page rendering. But in a compressed content stream it usually damages all instructions starting at the flip. If this happens early in the stream, the whole page cannot be rendered anymore.