pdf-lite - v1.0.1
    Preparing search index...

    Function createStandardSecurityHandlerFromDictionary

    • Creates a standard security handler from an encryption dictionary. Selects the appropriate version (V1-V5) based on the dictionary parameters.

      Parameters

      • dict: PdfEncryptionDictionary

        The encryption dictionary from the PDF trailer.

      • Optionaloptions: {
            documentId?: PdfId;
            ownerPassword?: string | ByteArray;
            password?: string | ByteArray;
        }

        Optional configuration including passwords and document ID.

      Returns PdfStandardSecurityHandler

      The appropriate standard security handler instance.

      Error if the version/revision combination is unsupported.

      const handler = createStandardSecurityHandlerFromDictionary(encryptDict, {
      password: 'user',
      ownerPassword: 'owner'
      })