hash_mismatch error


PSPDFKit Server has been deprecated and replaced by PSPDFKit Document Engine. All PSPDFKit Server and PSPDFKit for Web Server-Backed licenses will work as before and be supported until 15 May 2024 (we will contact you about license migration). To start using Document Engine, refer to the migration guide. With Document Engine, you’ll have access to robust new capabilities (read the blog for more information).

Question: What does the hash_mismatch error response mean?


When you upload documents from a URL, PSPDFKit Server calculates SHA256 hash of its contents and stores it in the database. Since the file is stored in your infrastructure, PSPDFKit Server fetches it when necessary, e.g. in order to render it for viewing. When the fetched document’s SHA256 doesn’t match the hash that was stored on upload, a hash_mismatch error is returned.

To prevent this error, you must make sure that the URL you provided on upload always returns the exact same file.