3 Commits
Author SHA1 Message Date
ari 3f561f3488 - removed none-develop dependency on tqdm
- ensured all test pdfs are properly pushed
2019-08-18 18:00:50 -04:00
ari 989de3122e corrected gitignore to not ignore lorem-v5.pdf 2019-08-18 17:59:14 -04:00
ari 20be0aa49e removed dependency on tqdm 2019-08-18 17:55:08 -04:00
10 changed files with 10 additions and 12 deletions

No files matched your search

+1 -1
View File
@@ -10,7 +10,7 @@ tests/*.txt
.idea/
.vscode
tests/samples/output
samples
./samples
**__pycache**\
.mypy_cache
.ipynb_checkpoints
+1 -1
View File
@@ -1 +1 @@
v1.3.8
v1.3.9
+5 -5
View File
@@ -16,11 +16,11 @@
</tr>
</table>
PDF-Major is a fork 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.
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 documentation [here](https://asosnovsky.github.io/pdfmajor/).
See [full API documentation here](https://asosnovsky.github.io/pdfmajor/api/).
## Basic Example
```py
@@ -34,9 +34,9 @@ for page in PDFInterpreter("/path/to/pdf.pdf"):
```
## Why Another Fork?
## 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.
`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
@@ -97,7 +97,7 @@ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""
__version__ = (1, 3, 8)
__version__ = (1, 3, 9)
if __name__ == '__main__':
print(
+2 -4
View File
@@ -1,7 +1,5 @@
from typing import List
from tqdm import tqdm
from ..parser.PDFPage import PDFPage
from ..utils import set_log_level, get_logger, logging
from .commands.state import PDFStateStack, PDFColorSpace, PREDEFINED_COLORSPACE
@@ -53,7 +51,7 @@ class PDFInterpreter:
caching=self.caching,
check_extractable=self.check_extractable
)
for page_num, page in tqdm(enumerate(pages), desc="Reading pages...", disable=self.debug_level > logging.INFO):
for page_num, page in enumerate(pages):
self.__pages.append(PageInterpreter(page, page_num, font_cache))
yield self.__pages[-1]
log.info(f"Done Reading {len(self.__pages)} pages.")
@@ -64,7 +62,7 @@ class PDFInterpreter:
def __iter__(self):
if len(self.__pages) > 0:
set_log_level(self.debug_level)
for page in tqdm(self.__pages, desc="Reading pages from store...", disable=self.debug_level > logging.INFO):
for page in self.__pages:
yield page
set_log_level(logging.WARNING)
else:
Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 KiB

Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -10,7 +10,7 @@ import sys
with open('README.md') as readme_file:
SETUP = {
"name": "pdfmajor",
"version": "1.3.8",
"version": "1.3.9",
"packages": find_packages(include=['pdfmajor*']),
"install_requires": [
'pycryptodome==3.8.2',
BIN
View File
Binary file not shown.