Password-Protected PDFs in Our JavaScript Viewer

Lock and unlock PDF documents with a password using industry-strength encryption protocols. Get additional resources by visiting our guide about opening password-protected PDFs in JavaScript.

Password-protected documents can be opened programmatically by setting the password property in the configuration object passed to PSPDFKit.load().

However, as can be seen in the code sample below, no specific configuration is needed to open password-protected PDFs in our JavaScript viewer. Just open a PDF and enter the password when prompted.

Password: test

Information

This code sample is an example that illustrates how to use our SDK. Please adapt it to your specific use case.