Skip to main content

Crate pdfops

Crate pdfops 

Source
Expand description

Fast PDF operations with JSON results, built for AI agents.

The same commands are exposed three ways: the pdfops CLI, an MCP server (pdfops mcp) and this library. See tools::TOOLS for the full list.

Modulesยง

cli
Command line interface. Every command prints one JSON document on stdout; failures print {"error": ...} on stderr and exit with status 1.
doc
Loading, saving and low level object helpers on top of lopdf.
font
Fonts for text that pdfops draws itself (stamps and form field appearances).
limits
Caps on what one command may consume.
mcp
Model Context Protocol server over stdio.
ops
One module per group of commands. Every command takes its argument struct and returns a JSON value, so the CLI and the MCP server share one code path.
pagespec
Page selection syntax shared by every command.
progress
Progress events for commands that take a while.
sandbox
Optional confinement of file access to one directory, for the MCP server.
tools
The command registry behind the MCP server and pdfops tools.