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.13.1.tar.gz (17.3 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: rho-pdf-diff-0.13.1.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.4

File hashes

Hashes for rho-pdf-diff-0.13.1.tar.gz
Algorithm Hash digest
SHA256 30801df38480740ab9d79f009051bd64d9362077c33a5c13c82000b63c2cab6b
MD5 50b874f7f0a3a8e4fba153d6df00c0c1
BLAKE2b-256 60eaede58ce136a63faaa195adb48012d0784189b7049e4a209d922543cc1ad9

See more details on using hashes here.

Supported by

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