Skip to content

Releases: doggy8088/pdf-encrypt

v0.3.1

Choose a tag to compare

@github-actions github-actions released this 14 Oct 18:29

Install pdf-encrypt 0.3.1

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/doggy8088/pdf-encrypt/releases/download/v0.3.1/pdf-encrypt-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://github.com/doggy8088/pdf-encrypt/releases/download/v0.3.1/pdf-encrypt-installer.ps1 | iex"

Install prebuilt binaries via Homebrew

brew install pdf-encrypt

Download pdf-encrypt 0.3.1

File Platform Checksum
pdf-encrypt-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
pdf-encrypt-x86_64-apple-darwin.tar.xz Intel macOS checksum
pdf-encrypt-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
pdf-encrypt-aarch64-pc-windows-msvc.msi ARM64 Windows checksum
pdf-encrypt-x86_64-pc-windows-msvc.zip x64 Windows checksum
pdf-encrypt-x86_64-pc-windows-msvc.msi x64 Windows checksum
pdf-encrypt-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum
pdf-encrypt-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum
pdf-encrypt-aarch64-unknown-linux-musl.tar.xz ARM64 MUSL Linux checksum
pdf-encrypt-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 14 Oct 17:33

0.3.0 變更紀錄

新增獨立 PDF 文件屬性編輯功能,保留未指定的資訊與既有加密設定。

  • 新增 edit 指令,與 encrypt 共用八個 --doc-* 參數。省略欄位保留原值,傳入空字串清空值,至少須指定一個欄位。
  • 預設另存為 <原檔名>_edited.pdf;支援 -o、--in-place 與覆蓋確認,已授權時可加 --force。
  • 公開 EditOptions 與 edit_pdf_properties API;報表新增 operation: edit。
  • 同步更新 Document Info 與 XMP,保留未修改的標準、自訂及巢狀屬性,支援不同 namespace 前綴、屬性寫法、自閉合 RDF、壓縮 XMP 與 UTF-8/UTF-16 編碼。
  • 編輯描述時保留原主旨。來源若以 dc:description 共用主旨及描述,原主旨會另存為自訂 XMP Subject。
  • 保留加密 PDF 的演算法、密碼、權限、檔案金鑰與 metadata 加密設定,支援自訂 AES-256 crypt filter 名稱;未加密的輸入仍保持未加密。
  • 在輸出目錄先寫入暫存檔,成功後才原子取代目標,並保留檔案權限;原地修改符號連結時保留連結本身。
  • 遇到無效 Info/XMP、密碼錯誤或無效 XML 字元時停止處理,保留原檔與既有輸出。
  • encrypt 的 metadata 更新也共用保留邏輯,避免丟棄未指定的既有 XMP 屬性。
  • 更新 Help、README 與 PDF 技能文件,指示 AI 代理先以 info --json 讀取原值,使用者已指定的修改直接採用,尚不明確的修改一次請使用者確認,未修改欄位不用重填。

完整正體中文功能提交紀錄:c886d67。發行提交:997a0e0。


使用方式

pdf-encrypt info -i report.pdf --json
pdf-encrypt edit -i report.pdf --doc-title "新標題" --doc-author "作者"
pdf-encrypt edit -i report.pdf -o updated.pdf --doc-keywords ""
pdf-encrypt edit -i encrypted.pdf -p "$PDF_PASSWORD" --doc-description "新描述"

明確要求覆蓋原檔並已取得授權時,可使用 --in-place --force。

密碼相容性

AES-256 可使用開啟密碼或擁有者密碼。AES-128/RC4 若有非空開啟密碼,須使用開啟密碼;目前相依套件的舊版擁有者密碼解密可能產生錯誤值,指令會明確拒絕該情況。免開啟密碼的 PDF 可省略 -p。

驗證

本機 make check、52 項測試與 make release 通過。新增的 13 項整合測試涵蓋欄位修改、屬性及頁面內容保留、文字編碼、四種加密演算法、原地修改、符號連結、檔案權限與失敗保護。

GitHub CI 的 Linux、macOS 與 Windows 工作均成功;Release 的八個目標建置與後續封裝、上傳工作也全部成功。已核對標籤指向本次發行提交、49 個必要資產、32 筆 SHA-256 紀錄,以及 Homebrew/Scoop 雜湊;下載的 macOS Apple Silicon 執行檔已通過文件屬性編輯實測。

發布管道

GitHub Release 原始工作流程曾略過 crates.io 發布;目前已完成 pdf-encrypt 0.3.0 的首次發布。後續版本使用 GitHub Actions OIDC Trusted Publishing,無需長期 CARGO_REGISTRY_TOKEN secret;認證驗證已通過。Windows ARM64 提供 ZIP 與 EXE,Windows x64 另提供 MSI 安裝程式。


Install pdf-encrypt 0.3.0

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/doggy8088/pdf-encrypt/releases/download/v0.3.0/pdf-encrypt-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://github.com/doggy8088/pdf-encrypt/releases/download/v0.3.0/pdf-encrypt-installer.ps1 | iex"

Install prebuilt binaries via Homebrew

brew install pdf-encrypt

Download pdf-encrypt 0.3.0

File Platform Checksum
pdf-encrypt-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
pdf-encrypt-x86_64-apple-darwin.tar.xz Intel macOS checksum
pdf-encrypt-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
pdf-encrypt-x86_64-pc-windows-msvc.zip x64 Windows checksum
pdf-encrypt-x86_64-pc-windows-msvc.msi x64 Windows checksum
pdf-encrypt-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum
pdf-encrypt-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum
pdf-encrypt-aarch64-unknown-linux-musl.tar.xz ARM64 MUSL Linux checksum
pdf-encrypt-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 14 Oct 16:35

0.2.0 變更紀錄

新增 PDF 文件屬性查詢與 AI 欄位預填流程。

  • 新增 info 指令與 properties 別名,支援文字報表及 --json。查詢不改寫原檔,也不產生解密副本。
  • 新增 read_pdf_properties 公開 API,以及 PdfProperties、MetadataStatus、PropertyConflict。回報 PDF 版本、頁數、原始加密狀態、八個文件資訊預填值及來源屬性。
  • 讀取 Document Info 的標準與自訂純量屬性,以及 XMP 的 namespace、屬性寫法、語言替代值、陣列、資源網址及 qualified value。支援中文、PDFDocEncoding、UTF-8/UTF-16 文字與壓縮 XMP;複合 XMP 值保留 XML 並列出警告。
  • 預填值優先採用 Document Info,缺值再取 XMP;保留空字串,以 null 表示未取得值。不同來源的值列入 conflicts,解析問題列入 warnings,並提供各來源的讀取狀態。
  • 更新頂層與 encrypt 說明:AI 代理先讀取輸入 PDF 的既有屬性,再一次請使用者確認預填值,只補充缺值、衝突、無法讀取或需要修改的內容。密碼仍須由使用者提供,範例使用佔位變數。
  • 加入免開啟密碼、使用擁有者密碼並禁止 modify 與 assemble 的完整加密範例。
  • 更新 README 與 PDF 操作技能,新增專案內的 bump-and-release 技能,並修正唯讀整合測試對 assemble 權限的斷言。

完整正體中文提交紀錄:c1b1eee。


使用方式

pdf-encrypt info -i "input.pdf" --json
pdf-encrypt info -i "encrypted.pdf" --password "$PDF_PASSWORD" --json

省略 --json 可顯示文字報表。使用 document_info 預填 --doc-* 參數前,須檢查 conflicts、warnings、info_status 與 xmp_status。

已知限制

AES-256 文件可使用開啟密碼或擁有者密碼查詢。AES-128/RC4 文件若開啟密碼非空,須使用開啟密碼;目前 PDF 相依套件無法可靠地以舊版擁有者密碼解密,新指令會拒絕回傳可能錯誤的值。免開啟密碼的 PDF 可直接查詢。損毀檔案、不支援的加密方式及密碼編碼會明確回報錯誤。

發布管道

本次 GitHub Actions 因未設定 CARGO_REGISTRY_TOKEN 而略過 crates.io 發布;此版本的跨平台執行檔與安裝套件由 GitHub Release 提供。Windows ARM64 提供 ZIP 與 EXE,Windows x64 另提供 MSI 安裝程式。

驗證

本機 make check、39 項測試、make release 與 Cargo 發布預演均通過。新增的 10 項整合測試涵蓋文件屬性、中文與編碼、壓縮 XMP、來源衝突、加密文件、錯誤處理及原檔位元組不變。


Install pdf-encrypt 0.2.0

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/doggy8088/pdf-encrypt/releases/download/v0.2.0/pdf-encrypt-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://github.com/doggy8088/pdf-encrypt/releases/download/v0.2.0/pdf-encrypt-installer.ps1 | iex"

Install prebuilt binaries via Homebrew

brew install pdf-encrypt

Download pdf-encrypt 0.2.0

File Platform Checksum
pdf-encrypt-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
pdf-encrypt-x86_64-apple-darwin.tar.xz Intel macOS checksum
pdf-encrypt-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
pdf-encrypt-x86_64-pc-windows-msvc.zip x64 Windows checksum
pdf-encrypt-x86_64-pc-windows-msvc.msi x64 Windows checksum
pdf-encrypt-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum
pdf-encrypt-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum
pdf-encrypt-aarch64-unknown-linux-musl.tar.xz ARM64 MUSL Linux checksum
pdf-encrypt-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum

v0.1.1

Choose a tag to compare

@github-actions github-actions released this 08 Jul 20:02

Install pdf-encrypt 0.1.1

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/doggy8088/pdf-encrypt/releases/download/v0.1.1/pdf-encrypt-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://github.com/doggy8088/pdf-encrypt/releases/download/v0.1.1/pdf-encrypt-installer.ps1 | iex"

Install prebuilt binaries via Homebrew

brew install pdf-encrypt

Download pdf-encrypt 0.1.1

File Platform Checksum
pdf-encrypt-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
pdf-encrypt-x86_64-apple-darwin.tar.xz Intel macOS checksum
pdf-encrypt-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
pdf-encrypt-aarch64-pc-windows-msvc.msi ARM64 Windows checksum
pdf-encrypt-x86_64-pc-windows-msvc.zip x64 Windows checksum
pdf-encrypt-x86_64-pc-windows-msvc.msi x64 Windows checksum
pdf-encrypt-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum
pdf-encrypt-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum
pdf-encrypt-aarch64-unknown-linux-musl.tar.xz ARM64 MUSL Linux checksum
pdf-encrypt-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 11 May 15:57

Install pdf-encrypt 0.1.0

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/doggy8088/pdf-encrypt/releases/download/v0.1.0/pdf-encrypt-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://github.com/doggy8088/pdf-encrypt/releases/download/v0.1.0/pdf-encrypt-installer.ps1 | iex"

Install prebuilt binaries via Homebrew

brew install pdf-encrypt

Download pdf-encrypt 0.1.0

File Platform Checksum
pdf-encrypt-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
pdf-encrypt-x86_64-apple-darwin.tar.xz Intel macOS checksum
pdf-encrypt-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
pdf-encrypt-aarch64-pc-windows-msvc.msi ARM64 Windows checksum
pdf-encrypt-x86_64-pc-windows-msvc.zip x64 Windows checksum
pdf-encrypt-x86_64-pc-windows-msvc.msi x64 Windows checksum
pdf-encrypt-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum
pdf-encrypt-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum
pdf-encrypt-aarch64-unknown-linux-musl.tar.xz ARM64 MUSL Linux checksum
pdf-encrypt-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum