pdfminer.six/pdfminer
Andrew Baumann 1d1602e0c5
Added feature: page labels (#680)
* port page label code from pdfannots

* add tests and clean up

* more cleanup; harden against non-conforming input

* one more test

* update CHANGELOG

* cleanup & respond to review feedback (incomplete)

* Refactor implementation of get_page_labels() into a NumberTree and PageLabels class.

* PageLabels *is* a NumberTree and should always behave like one. This justifies inheriting its data and behavior. And it simplifies the code a bit more.

* fix type errors and cleanup slightly

 * fix mypy errors (including tweaking code to avoid problematic dynamic types)
 * hoist dict_value from NumberTree (where it may not be a dict) to PageLabels (where it must be)
 * avoid repeated warnings by calling _parse() recursively, and checking sortedness only at the end

Co-authored-by: Pieter Marsman <pietermarsman@gmail.com>
2022-02-01 10:08:05 +01:00
..
cmap Include compiled cmap resources to simplify installation for CJK languages 2015-12-27 13:32:29 +09:00
Makefile apply more patches 2010-02-13 15:00:43 +00:00
__init__.py Bump version to 20211012 2021-10-12 20:45:24 +02:00
_saslprep.py Add type annotations (#661) 2021-10-09 16:23:28 +02:00
arcfour.py Remove obsolete returns (#707) 2022-02-01 01:49:46 +01:00
ascii85.py Add type annotations (#661) 2021-10-09 16:23:28 +02:00
ccitt.py Remove obsolete returns (#707) 2022-02-01 01:49:46 +01:00
cmapdb.py Remove obsolete returns (#707) 2022-02-01 01:49:46 +01:00
converter.py Remove obsolete returns (#707) 2022-02-01 01:49:46 +01:00
data_structures.py Added feature: page labels (#680) 2022-02-01 10:08:05 +01:00
encodingdb.py Add type annotations (#661) 2021-10-09 16:23:28 +02:00
fontmetrics.py Drop support for legacy Python 2 (#346) 2020-01-04 16:47:07 +01:00
glyphlist.py Drop support for legacy Python 2 (#346) 2020-01-04 16:47:07 +01:00
high_level.py Add type annotations (#661) 2021-10-09 16:23:28 +02:00
image.py Remove obsolete returns (#707) 2022-02-01 01:49:46 +01:00
jbig2.py Fixes jbig2 writer to write valid jb2 files 2022-01-23 21:41:08 +01:00
latin_enc.py Add type annotations (#661) 2021-10-09 16:23:28 +02:00
layout.py Remove obsolete returns (#707) 2022-02-01 01:49:46 +01:00
lzw.py Remove obsolete returns (#707) 2022-02-01 01:49:46 +01:00
pdfcolor.py Remove obsolete returns (#707) 2022-02-01 01:49:46 +01:00
pdfdevice.py Remove obsolete returns (#707) 2022-02-01 01:49:46 +01:00
pdfdocument.py Added feature: page labels (#680) 2022-02-01 10:08:05 +01:00
pdffont.py Add support identity unicode cmap (#626) 2021-10-13 21:52:00 +02:00
pdfinterp.py Remove obsolete returns (#707) 2022-02-01 01:49:46 +01:00
pdfpage.py Added feature: page labels (#680) 2022-02-01 10:08:05 +01:00
pdfparser.py Remove obsolete returns (#707) 2022-02-01 01:49:46 +01:00
pdftypes.py Remove obsolete returns (#707) 2022-02-01 01:49:46 +01:00
psparser.py Remove obsolete returns (#707) 2022-02-01 01:49:46 +01:00
py.typed export type annotations in package (#679) 2022-01-25 22:11:17 +01:00
runlength.py Add type annotations (#661) 2021-10-09 16:23:28 +02:00
settings.py Remove webapp and other (un)helpful application references: django, cgi, and pyinstaller. (#320) 2019-10-26 19:16:37 +02:00
utils.py Added feature: page labels (#680) 2022-02-01 10:08:05 +01:00