pdfminer.six/pdfminer
Jeremy Singer-Vine 016239c146
Fix .paint_path handling of single line segments (#530)
* Fix .paint_path handling of single line segments

- Fixes typo ("ml" should have been "mlh")

- Removes if-statement that required individual line segments to be
  strictly horizontal or vertical.

* Treat 'ml'-shape paths as lines not curves

Althoguh 'mlh' is the canonical implementation for a single line
segment, 'ml' is fairly common.

Adds tests and sample PDF.

* Fix trailing whitespace

* Fix point-extraction from Beziér path commands

This commit corrects the manner in which "pts" are extracted from Beziér
path commands. See Table 4.9 of PDF reference manual, and new comments
in code for details. Previously, depending on whether the command (c,
v, or y) the code was extracting some combination of control points (not
on curve) and the actual points-on-curve.

This commit also refactors .paint_path, so that apply_matrix_pt is only
called in one place, and to treat the "h" command in a manner more
consistent with other path commands.

* Add comments to test_paint_path_quadrilaterals

* Parse rect-forming mllll paths as rects not curves

Now that .paint_path has been refactored, adding support for
rect-forming mllll paths requires no extra code, beyond a minor tweak to
the relevant elif statement.

* One changelog line with ref to mr

* Remove PDFLayoutAnalyzer._create_curve because implementation has become trivial due to refactoring

* Extract variables from if statement to make it easier to read

* Optimize imports order

* Trigger travis build

* Revert "Trigger travis build"

This reverts commit 41c05184

* Update travis badge

* Update travis badge

Co-authored-by: Pieter Marsman <pietermarsman@gmail.com>
2021-07-27 18:27:32 +02: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 Remove explicit support for Python 3.4 and 3.5, adding tests for python 3.9 (#522) 2020-10-25 12:34:51 +01:00
arcfour.py Change pycryptodome dependency to the faster, smaller, and industry standard cryptography package (#456) 2020-07-20 22:00:54 +02:00
ascii85.py Drop support for legacy Python 2 (#346) 2020-01-04 16:47:07 +01:00
ccitt.py Drop support for legacy Python 2 (#346) 2020-01-04 16:47:07 +01:00
cmapdb.py Drop support for legacy Python 2 (#346) 2020-01-04 16:47:07 +01:00
converter.py Fix .paint_path handling of single line segments (#530) 2021-07-27 18:27:32 +02:00
encodingdb.py Catch ValueError when converting font encoding differences to characters (#389) 2020-03-16 20:12:45 +01: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 Pass caching parameter to PDFResourceManager in `high_level` functions (#475) 2020-09-10 21:09:07 +02:00
image.py Drop support for legacy Python 2 (#346) 2020-01-04 16:47:07 +01:00
jbig2.py Drop support for legacy Python 2 (#346) 2020-01-04 16:47:07 +01:00
latin_enc.py Drop support for legacy Python 2 (#346) 2020-01-04 16:47:07 +01:00
layout.py Fix ordering of textlines within a textbox when boxes_flow is disabled (#412) 2020-05-09 15:37:49 +02:00
lzw.py Drop support for legacy Python 2 (#346) 2020-01-04 16:47:07 +01:00
pdfcolor.py Drop support for legacy Python 2 (#346) 2020-01-04 16:47:07 +01:00
pdfdevice.py Fix value for font-family in html by removing the subset tag from the PDF font-name (#357) 2020-01-16 22:25:20 +01:00
pdfdocument.py Revert "Fix for when 'trailer' is indented (#513)" (#534) 2020-10-25 13:22:42 +01:00
pdffont.py Fix TypeError: cannot unpack non-iterable PDFObjRef object, when unpacking the value of 'DW2' (#529) 2020-10-25 14:34:45 +01:00
pdfinterp.py Validate that object is PDFStream in do_EI (#451) 2020-07-05 13:42:15 +02:00
pdfpage.py Replace internal usage of PDFTextExtractionNotAllowedError (deprecated) with PDFTextExtractionNotAllowed 2020-07-26 15:09:32 +02:00
pdfparser.py Enforce pep8 coding-style (#345) 2019-12-29 21:20:20 +01:00
pdftypes.py Pack the /P (ermissions) entry from the /Encrypt dictionionary in the file trailer, as unsigned long (#352) 2020-01-07 21:59:13 +01:00
psparser.py add shebang line to script in tools (#408) 2020-04-28 10:58:42 +02:00
runlength.py Drop support for legacy Python 2 (#346) 2020-01-04 16:47:07 +01: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 Allow a pathlib.PurePath object as a input to open_filename (#492) 2020-09-17 21:29:00 +02:00