@rishabhdugar

PDF Lock & Unlock

Lock and unlock PDF documents. Add AES-256/AES-128/RC4 encryption with granular permissions, unlock encrypted PDFs with multiple decryption engines, and inspect encryption status. Powered by PDFAPIHub.

当前版本
v1.0.0
code-plugin社区source-linked

PDF Lock & Unlock — OpenClaw Plugin

Lock and unlock PDF documents using the PDFAPIHub API. This OpenClaw plugin gives your AI agent the ability to add password protection, set granular permissions, decrypt encrypted PDFs, and inspect PDF security status.

What It Does

Protect PDFs with password encryption or remove password protection from encrypted documents — perfect for securing confidential files, enabling read-only distribution, and unlocking PDFs for further processing.

Features

  • AES-256 Encryption — Industry-standard encryption (default)
  • AES-128 & RC4 — Alternative encryption for legacy compatibility
  • User & Owner Passwords — Separate passwords for viewing vs editing
  • Granular Permissions — Control print, copy, modify, annotate, fill forms, extract, assemble
  • Multi-Engine Decryption — PyPDF2, pikepdf (AES-256), PyMuPDF, pdfplumber fallback chain
  • Re-Encryption — Unlock with old password, lock with new password in one workflow
  • Encryption Detection — Check if a PDF is encrypted before processing
  • PDF Metadata — Inspect page count, file size, title, author, subject
  • Multiple Output Formats — Download URL, base64 string, or raw PDF file
  • File Size Tracking — Response includes original and output sizes

Tools

ToolDescription
lock_pdfAdd password protection with encryption and granular permissions
unlock_pdfRemove password protection from encrypted PDFs
pdf_infoCheck encryption status, page count, and metadata

Installation

openclaw plugins install clawhub:pdf-lock-unlock

Configuration

Add your API key in ~/.openclaw/openclaw.json:

{
  "plugins": {
    "entries": {
      "pdf-lock-unlock": {
        "enabled": true,
        "env": {
          "PDFAPIHUB_API_KEY": "your-api-key-here"
        }
      }
    }
  }
}

Get your free API key at https://pdfapihub.com.

Usage Examples

Just ask your OpenClaw agent:

  • "Lock this PDF with password 'secure2026'"
  • "Encrypt this contract — allow printing but deny copying and editing"
  • "Unlock this PDF with password 'oldpass123'"
  • "Is this PDF encrypted?"
  • "Re-encrypt this PDF with a new password"

Use Cases

  • Confidential Documents — Encrypt contracts, NDAs, and financial reports before sharing
  • Read-Only Distribution — Allow viewing and printing but prevent copying or editing
  • Client Deliverables — Password-protect reports before sending to clients
  • Compliance — Encrypt sensitive PDFs for HIPAA, GDPR, or SOC 2 compliance
  • Exam Papers — Lock exam PDFs until exam time, then share the password
  • IP Protection — Restrict copying from proprietary documents
  • Workflow Automation — Unlock encrypted PDFs before merging, splitting, or parsing

API Documentation

Full API docs: https://pdfapihub.com/docs

License

MIT

源码与版本

源码仓库

PdfApiHub/openclaw-pdf-lock-unlock

打开仓库

源码提交

851329fb4ee359ef6e6f1527c0abceec51893c5b

查看提交

安装命令

openclaw plugins install clawhub:pdf-lock-unlock

元数据

  • 包名: pdf-lock-unlock
  • 创建时间: 2026/04/17
  • 更新时间: 2026/04/17
  • 执行代码:
  • 源码标签: main

兼容性

  • 构建于 OpenClaw: 2026.3.24-beta.2
  • 插件 API 范围: >=2026.3.24-beta.2
  • 标签: latest
  • 文件数: 7