pdfminer.six/tests
Jeremy Singer-Vine f2c967f500
Ignore path constructors that do not begin with m (#749)
* Ignore path constructors that do not begin with  m

Per PDF Reference Section 4.4.1, "path construction operators may be
invoked in any sequence, but the first one invoked must be m or re to
begin a new subpath." Since pdfminer.six already converts all `re`
(rectangle) operators to their equivelent `mlllh` representation, paths
ingested by `.paint_path(...)` that do not begin with the `m` operator
are invalid.

In addition to the advantage of hewing to the PDF Reference, this change
also avoids the `ValueError: not enough values to unpack (expected 2,
got 1)` error raised by the ` pts = [apply_matrix_pt(self.ctm, pt) for
pt in raw_pts]` line in `converter.py` when parsing PDFs that
(erroneously) include `("h",)` paths.

* Update CHANGELOG.md

Co-authored-by: Pieter Marsman <pietermarsman@gmail.com>
2022-05-06 22:15:00 +02:00
..
helpers.py Check blackness in github actions (#711) 2022-02-11 22:46:51 +01:00
tempfilepath.py Check blackness in github actions (#711) 2022-02-11 22:46:51 +01:00
test_converter.py Ignore path constructors that do not begin with m (#749) 2022-05-06 22:15:00 +02:00
test_encodingdb.py Check blackness in github actions (#711) 2022-02-11 22:46:51 +01:00
test_font_size.py Check blackness in github actions (#711) 2022-02-11 22:46:51 +01:00
test_highlevel_extracttext.py Check blackness in github actions (#711) 2022-02-11 22:46:51 +01:00
test_layout.py Ignore empty characters when analyzing layout (#689) 2022-02-22 21:20:26 +01:00
test_pdfdocument.py Check blackness in github actions (#711) 2022-02-11 22:46:51 +01:00
test_pdfencoding.py Check blackness in github actions (#711) 2022-02-11 22:46:51 +01:00
test_pdffont.py Check blackness in github actions (#711) 2022-02-11 22:46:51 +01:00
test_pdfminer_ccitt.py Check blackness in github actions (#711) 2022-02-11 22:46:51 +01:00
test_pdfminer_crypto.py Check blackness in github actions (#711) 2022-02-11 22:46:51 +01:00
test_pdfminer_psparser.py Check blackness in github actions (#711) 2022-02-11 22:46:51 +01:00
test_pdfpage.py Check blackness in github actions (#711) 2022-02-11 22:46:51 +01:00
test_tools_dumppdf.py Check blackness in github actions (#711) 2022-02-11 22:46:51 +01:00
test_tools_pdf2txt.py Check blackness in github actions (#711) 2022-02-11 22:46:51 +01:00
test_utils.py Check blackness in github actions (#711) 2022-02-11 22:46:51 +01:00