PDFMajor
| Latest Release |
|
PDF-Major is a complete re-write of PDFMiner.six. It is meant to be a more light-weight implementation that makes fewer assumptions on the data. The ultimate goal of this project is to provide a simpler, faster and more functional library that both casual and low-level developers could build upon.
Documentation
See full API documentation here.
Basic Example
from pdfmajor.interpreter import PDFInterpreter
for page in PDFInterpreter("/path/to/pdf.pdf"):
print("page start", page.page_num)
for item in page:
print(" >", item)
print("page end", page.page_num)
Why a re-write?
PDFMiner was designed to run in python 2.7, PDFMiner.six was written to bring cross-version support for python 2 and 3. However, after attempting to build and extend upon PDFMiner.six I found it rather difficult to extend and identify additional details regarding the items encoded in the pdf. This library will attempt to expose as much information as possible to end-users, without having them solely rely on to-xml or to-json exports.
Features
- Functional extraction method based on generators
- Parse, analyze, and convert PDF documents.
- PDF-1.7 specification support. (well, almost)
- Font-Color extraction
- Shape fill and stroke color extraction
- CJK languages and vertical writing scripts support.
- Various font types (Type1, TrueType, Type3, and CID) support.
- Basic encryption (RC4) support.
Note: We took out the layout-analysis process in this version (there is no more LTTextHorizontal or LTTextVertical). While the mathematics behind the grouping process was sound, the coupling of the layout-analysis process with the parsing and interpretation process produced unfriendly-code. This feature could be brought back by running your own implementation of it on the pdfmajor.interpreter.PageInterpreter class, but at the current time is not supported.
How to Install
Source
-
Install Python 3.6.4 or newer.
-
clone this repo
git clone https://github.com/asosnovsky/pdfmajor -
install repo
python setup.py install
Pypi
-
Install Python 3.6.4 or newer.
-
install repo
pip install pdfmajor
Terms and Conditions
(This is so-called MIT/X License)
Copyright (c) 2018-2019 Ariel Sosnovsky
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Metadata
Release files for pdfmajor 1.3.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pdfmajor-1.3.13.tar.gz | 101.6 kB | Without provenance | Details for pdfmajor-1.3.13.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pdfmajor-1.3.13-py3-none-any.whl | Python 3 | none | any | Details for pdfmajor-1.3.13-py3-none-any.whl |
Total release size: 234.5 kB
Release files / pdfmajor-1.3.13.tar.gz
| Download URL | pdfmajor-1.3.13.tar.gz |
|---|---|
| Size | 101.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
03f5dd8bf5de7fa1ff343171d576eb60323e29bf6dcb62ac4786fd3f91fd65ef
|
|
BLAKE2b-256 checksum How to use checksums |
558790e1134c3251e0e37d03a0326f8b5ddb4babe8b5f4a1e4524ab1a10209c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
|
Release files / pdfmajor-1.3.13-py3-none-any.whl
| Download URL | pdfmajor-1.3.13-py3-none-any.whl |
|---|---|
| Size | 132.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
41548a69524020c2815921acb89a8c52c8ceafe925e314aa39a418942bbe8a50
|
|
BLAKE2b-256 checksum How to use checksums |
740ebe004775c062f4dbdfdd4e3007facb31518c056b302c9859f10566060cdb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
|
Security for pdfmajor 1.3.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.