Skip to main content

Rho AI Fork of pdf-diff

Project description

rho-pdf-diff

Package forked from https://github.com/JoshData/pdf-diff

Installation

This package relies on the system dependency pdftotext. After that is installed, simply install using setup.py with `pip install -e .[dev,test].

Usage

Script

There is an included script for generating a text diff between two PDF documents, rho-pdf-diff. The simplest usage is:

rho-pdf-diff <old-pdf-path> <new-pdf-path> <output-path>

To see additional options run rho-pdf-diff --help. There are a number of flags for disabling some filters which attempt to remove unimportant diffs.

Library

The main workflow for creating diff images from raw documents can be found in the source of the rho-pdf-diff script. This essentially involves creating a Document object for both of the old and new PDFs, and passing these to initialize a DiffResult. DiffResult also can take a sequence of DiffFilter objects, which are essentially rules for using information available at the Document level for removing unwanted diffs from being included in the final result.

After the text diff is created by the logic in DiffResult, a searchable PDF containing the side-by-side documents with diffs marked is generated using the DiffImageWriter class. Note: the page alignment step is currently very slow for long documents with many diffs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rho-pdf-diff-0.14.0.tar.gz (17.4 kB view details)

Uploaded Source

File details

Details for the file rho-pdf-diff-0.14.0.tar.gz.

File metadata

  • Download URL: rho-pdf-diff-0.14.0.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.4

File hashes

Hashes for rho-pdf-diff-0.14.0.tar.gz
Algorithm Hash digest
SHA256 5a0acead5dab8c3a209671220d081863d95f4b84a467be599eb4e719e39f277c
MD5 e446aca4aeaa4fc8379982a6de83ecfc
BLAKE2b-256 1184160862943dc4af7b649b450c5b7aa33508f83fe44c0831b51f6fabf056b3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page