pdfminer.six/tests
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
..
helpers.py Enforce pep8 coding-style (#345) 2019-12-29 21:20:20 +01:00
tempfilepath.py Issue #469 is fixed (When run on Windows a lot of tests fail with the error: [Errno 13] Permission denied) (#484) 2020-10-26 10:10:11 +01:00
test_converter.py Fix .paint_path handling of single line segments (#530) 2021-07-27 18:27:32 +02:00
test_encodingdb.py Catch ValueError when converting font encoding differences to characters (#389) 2020-03-16 20:12:45 +01:00
test_font_size.py Fix bug in computing character bounding box (#348) 2020-01-16 22:15:50 +01:00
test_highlevel_extracttext.py Always try to get CMap, even if name is not recognized (#438) 2020-07-23 20:27:38 +02:00
test_layout.py Also group center-aligned text lines in addition to left-aligned and right-aligned text lines (#382) (#384) 2020-03-23 22:38:39 +01:00
test_pdfdocument.py Fix failing test on develop & cleaning up test files (#319) 2019-10-26 18:42:33 +02:00
test_pdfencoding.py add shebang line to script in tools (#408) 2020-04-28 10:58:42 +02:00
test_pdffont.py Always try to get CMap, even if name is not recognized (#438) 2020-07-23 20:27:38 +02:00
test_pdfminer_ccitt.py Enforce pep8 coding-style (#345) 2019-12-29 21:20:20 +01:00
test_pdfminer_crypto.py Remove unused rijndael encryption implementation (#465) 2020-09-10 19:28:00 +02:00
test_pdfminer_psparser.py Enforce pep8 coding-style (#345) 2019-12-29 21:20:20 +01:00
test_tools_dumppdf.py Issue #469 is fixed (When run on Windows a lot of tests fail with the error: [Errno 13] Permission denied) (#484) 2020-10-26 10:10:11 +01:00
test_tools_pdf2txt.py Issue #469 is fixed (When run on Windows a lot of tests fail with the error: [Errno 13] Permission denied) (#484) 2020-10-26 10:10:11 +01:00
test_utils.py Allow a pathlib.PurePath object as a input to open_filename (#492) 2020-09-17 21:29:00 +02:00