All Projects → asosnovsky → pdfmajor

asosnovsky / pdfmajor

Licence: MIT License
A better PDF Extraction Tool using the latest and fastest python features

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to pdfmajor

JuCC
JuCC - Jadavpur University Compiler Compiler
Stars: ✭ 34 (+78.95%)
Mutual labels:  parsing
loquat
Monadic parser combinators for JavaScript / TypeScript
Stars: ✭ 47 (+147.37%)
Mutual labels:  parsing
ruby-marshal
Haskell library to parse a subset of Ruby objects serialised with Marshal.dump
Stars: ✭ 30 (+57.89%)
Mutual labels:  parsing
siemstress
Very basic CLI SIEM (Security Information and Event Management system).
Stars: ✭ 24 (+26.32%)
Mutual labels:  parsing
racket-bitsyntax
Erlang-style binaries/bitstrings for Racket
Stars: ✭ 29 (+52.63%)
Mutual labels:  parsing
kolasu
Kotlin Language Support – AST Library
Stars: ✭ 45 (+136.84%)
Mutual labels:  parsing
bracer
Java library for parsing and evaluating math expressions
Stars: ✭ 18 (-5.26%)
Mutual labels:  parsing
LR
explore different techniques to generate LR(k) parsing code
Stars: ✭ 13 (-31.58%)
Mutual labels:  parsing
php-binary
A PHP library for parsing structured binary streams.
Stars: ✭ 30 (+57.89%)
Mutual labels:  parsing
Jsonify
♨️A delightful JSON parsing framework.
Stars: ✭ 42 (+121.05%)
Mutual labels:  parsing
tangle-rs
a collection of tools to do tangle in rust
Stars: ✭ 23 (+21.05%)
Mutual labels:  parsing
Ohm-S
A Squeak/Smalltalk implementation of the metaprogramming framework Ohm.
Stars: ✭ 18 (-5.26%)
Mutual labels:  parsing
statham-schema
Statham is a Python Model Parsing Library for JSON Schema.
Stars: ✭ 21 (+10.53%)
Mutual labels:  parsing
octet
A library that makes working with bytebuffers painless.
Stars: ✭ 79 (+315.79%)
Mutual labels:  parsing
YaccConstructor
Platform for parser generators and other grammarware research and development. GLL, RNGLR, graph parsing algorithms, and many others are included.
Stars: ✭ 36 (+89.47%)
Mutual labels:  parsing
PSStringScanner
Provides lexical scanning operations on a String
Stars: ✭ 45 (+136.84%)
Mutual labels:  parsing
copper
An integrated context-aware scanner and parser generator
Stars: ✭ 14 (-26.32%)
Mutual labels:  parsing
node-typescript-parser
Parser for typescript (and javascript) files, that compiles those files and generates a human understandable AST.
Stars: ✭ 121 (+536.84%)
Mutual labels:  parsing
structures
Declarative binary data builder and parser: simple, fast, extensible
Stars: ✭ 29 (+52.63%)
Mutual labels:  parsing
CYK-Parser
A CYK parser written in Python 3.
Stars: ✭ 24 (+26.32%)
Mutual labels:  parsing

PDFMajor

Latest Release 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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].