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

    Function createFromEncryptionOptions

    • Creates a security handler from encryption options. Automatically selects the appropriate handler version based on the encryption method.

      Parameters

      Returns PdfSecurityHandler

      A configured security handler.

      Error if no encryption is selected or the type is unsupported.

      const handler = createFromEncryptionOptions({
      method: { default: 'AES-256-CBC' },
      password: 'secret',
      permissions: { print: true, copy: false }
      })