Documentize CLI plugins
Open the app: Get the CLI plugins → (products.documentize.ai)
Summary
A CLI plugin is a small, self-contained command-line tool that does one operation: merge, compress, rotate, extract text, OCR, and so on. You download it from the plugin catalog at products.documentize.ai/pdf-cli, run it with the .NET runtime, and chain several of them in a shell script. Processing happens on your computer.
Install
- Open the catalog, search or filter by category (AI, Convert, Edit, Extract, OCR, Security, Archive) and download the plugin's zip.
- Install the .NET 10 runtime (not the SDK). The download is a pre-built
.dll. - Put your
documentize.liclicense file next to the plugin's.dll. Without it the plugin runs in evaluation mode. - On Linux only, install graphics and fonts:
sudo apt-get install -y libgdiplus fontconfig fonts-liberation fonts-dejavu-core - Check it works:
dotnet Documentize.Merge.dll --help.
Windows and macOS need no extra packages in normal use. Some zips also contain a native executable (./Documentize.Merge, Documentize.Merge.exe), which you can run instead of dotnet ...dll.
The folder model (read this once)
Plugins do not take file paths as flags. They work on a task folder pair:
- input:
<PLUGIN_INPUT_DIR>/<task-id>/ - output:
<PLUGIN_OUTPUT_DIR>/<task-id>/
Both variables default to /tmp/documentize/input and /tmp/documentize/output on Linux/macOS (%TEMP%\documentize\... on Windows). Always pass your own --task-id, otherwise a random GUID is used and you will not know where the result went. Every plugin also leaves a <task-id>.json handoff file in the output folder; ignore it when running by hand.
Exit codes in the plugin readmes: 0 success, 1 the task ran but failed (details on stderr), 2 usage error.
One example per family
Flags below come from the plugin readmes.
export PLUGIN_INPUT_DIR=$HOME/dmz/in PLUGIN_OUTPUT_DIR=$HOME/dmz/out
# Merge: files in the input folder are merged in filename order. No other flags.
mkdir -p $PLUGIN_INPUT_DIR/j1 && cp a.pdf b.pdf $PLUGIN_INPUT_DIR/j1/
dotnet Documentize.Merge.dll --task-id j1
# Compress: --compress-type is an int preset, default 1
dotnet Documentize.Compress.dll --task-id j2 --compress-type 1
# Rotate: --angle (default 90), --rotate-type (a = all pages), --page-num
dotnet Documentize.Rotate.dll --task-id j3 --angle 90
# Remove pages: --remove-range is required, e.g. 1,3,5-7
dotnet Documentize.RemovePages.dll --task-id j4 --remove-range 1,3
# OCR to searchable PDF: --language (Tesseract code, default eng)
dotnet Documentize.OcrSearchable.dll --task-id j5 --language eng
Chaining by shell
There is no pipe: step N's output folder becomes step N+1's input folder. Wrap that in a small function:
step() { # step <prev-task> <next-task> <plugin> [flags...]
prev=$1; next=$2; plugin=$3; shift 3
mkdir -p "$PLUGIN_INPUT_DIR/$next"
cp "$PLUGIN_OUTPUT_DIR/$prev"/*.pdf "$PLUGIN_INPUT_DIR/$next/"
dotnet "Documentize.$plugin.dll" --task-id "$next" "$@"
}
# merge -> remove cover page -> compress
dotnet Documentize.Merge.dll --task-id m1 # inputs already in $PLUGIN_INPUT_DIR/m1
step m1 m2 RemovePages --remove-range 1
step m2 m3 Compress --compress-type 1
ls "$PLUGIN_OUTPUT_DIR/m3"
Use set -e so a non-zero exit stops the chain. The order rules from Organize apply: organize first, compress last.
Alternative input
Instead of flags, a plugin accepts one base64-encoded JSON argument (PascalCase fields plus "ID"). Handy when another program launches the plugin; see the readme in each zip.
Notes and cautions
- Catalog pages may show a
doccli-style command; the readmes in the plugin zips are authoritative (verify against the zip you downloaded). - Expect first-run license checks and an internet connection for activation (verify per plugin).