Skip to content

kogo

kogo (校合) compares an old and new PDF and highlights added or deleted text, figures, equations, and annotations — in the browser and in marked-up PDFs. "校合" is the Japanese publishing term for checking a revision against the original.

All processing happens locally; nothing is sent to an external service.

Install

pip install kogo

CLI

kogo diff old.pdf new.pdf -o out/

See the CLI reference for all flags.

Library

import kogo

result: kogo.ComparisonResult = kogo.compare_pdfs("old.pdf", "new.pdf", "out/")
print(result["summary"]["changed_pages"])

pip install kogo is enough for library use — no web extras required. See the Library API reference for the full signature and result shape.

Web app

pip install "kogo[serve]"
kogo fetch-viewer
kogo serve

Then open http://127.0.0.1:8080. See Web app for configuration and Docker deployment.

Where to go next

  • Library APIcompare_pdfs signature, ComparisonResult shape, write-less mode, progress callback
  • How it works — page alignment, text diff, and visual diff algorithms
  • Recipes — using kogo from a CI step
  • FAQ