Skip to main content

pdfutil [Under Development]

Library provides a lot of operations over PDF/Image.

Input and Output

The Libarary expose each function with a standard set of argument which are fixed for eevry function

import pdfutil
coordinates = pdfutil.detect_*(pdf_location, [save_result=False], [show_result=False], [result_location='.'], [args={}])
Name Description
pdf_location input location of PDF, image can also be passed libaray will autodetect the image
save_result Default False, If True will save the result pdf/img in location specified by result_location
show_result Default False, This is used for debugging only when True will popup a matplotlib plot highlighting the regions which are detected with corresponding labels
result_location Default current directory, location where ouptut needs to be saved, ignored if save_result is set as False
args custom set of args in form of dictionaty specific to each function
coordinates Output returned by the function call, this will contain json output in following format
[
  {
    "type": "text",
    "output": {
      "coord": [
        ["pageno_1", "startx_1", "starty_1", "width_1", "height_1"],
        ["pageno_2", "startx_2", "starty_2", "width_2", "height_2"]
      ]
    }
  },
  {
    "type": "table",
    "output": {
      "coord": [
        ["pageno_1", "startx_1", "starty_1", "width_1", "height_1"],
      ]
    }
  }
]

operations

Detecting Tables

import pdfutil
coordinates = pdfutil.detect_tables(pdf_location)

Detecting Text Regions [Paragrahs / Unstructured Content]

import pdfutil
coordinates = pdfutil.detect_text(pdf_location)

Detecting Non-Text Regions [Images / Logos]

import pdfutil
coordinates = pdfutil.detect_non_text(pdf_location)

Detecting Language

import pdfutil
coordinates = pdfutil.detect_non_language(pdf_location)

Detecting Key Value Pairs

import pdfutil
coordinates = pdfutil.detect_key_value_pairs(pdf_location)

Release files for pdfutil 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pdfutil 0.0.1
File Size Uploaded
pdfutil-0.0.1.tar.gz 2.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pdfutil 0.0.1
File Interpreter ABI Platform
pdfutil-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 3.9 kB

Release files / pdfutil-0.0.1.tar.gz

Download URL pdfutil-0.0.1.tar.gz
Size 2.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1cf034e71e888c7993ece8a84d4ee0721ecb2aa6a276504a7720af9b00b8de99
BLAKE2b-256 checksum
How to use checksums
47bea0c846f9d6976ce892a176319b1cf2fc9ea40b81f825b179f2a457de2740
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

Release files / pdfutil-0.0.1-py3-none-any.whl

Download URL pdfutil-0.0.1-py3-none-any.whl
Size 1.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83b635a34207db8d4d4b6f57956cb00d54ce63ba2ab0d3c0380d7bcb6cf8f749
BLAKE2b-256 checksum
How to use checksums
0671b94fa5e1cd14ce1cf1296dbd59a362ca81ecd41fd7e52d1e71fd57ae7022
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page