Documentize.Plugins for developers
Summary
The CLI tools you met in CLI plugins are built on a small, shared plugin contract. Developers who want to run these plugins from their own software, or understand how the platform schedules them, work with the Documentize.Plugins project (products.documentize.com). This page describes the contract as visible to a user of the downloads; the developer documentation on that site is the authority.
The contract in plain words
- A plugin is a program with a stable entry point and a named set of options (for example
--angle,--remove-range), all with defaults. - It reads input files from
<PLUGIN_INPUT_DIR>/<task-id>/and writes results to<PLUGIN_OUTPUT_DIR>/<task-id>/. - Everything a task needs can instead be sent as one base64-encoded JSON argument; field names are the option names in PascalCase plus
IDfor the task id. - It reports status through its exit code (0 success, 1 task failed, 2 bad arguments) and writes a
<task-id>.jsonhandoff file for the Plugin Manager. - It runs with the .NET 10 runtime and, for the document engine, a
documentize.liclicense next to the assembly.
The Plugin Manager in the platform is the program that launches plugins this way for cloud tasks. Running a plugin by hand, as in the CLI chapter, is the same call without the manager.
Embedding in your own code
You can drive plugins from any language that can start a process, set two environment variables and read exit codes:
PLUGIN_INPUT_DIR=/srv/in PLUGIN_OUTPUT_DIR=/srv/out \
dotnet Documentize.Compress.dll --task-id "$ID" --compress-type 1
Create the input folder per task, copy files in, run, read the output folder. For .NET code, Aspose.PDF.FOSS on NuGet is a separate open-source library linked from the how-to guides, aimed at the same kinds of jobs in code.
Writing your own plugin
The catalog invites submissions; the catalog page mentions a "Submit Plugin" form. A contract test project exists in the repository (Documentize.Plugin.Contracts.Tests) to keep plugins honest about this contract, but its content is internal. For the SDK, templates and submission rules, use the developer site (verify).