Open AngusWR opened 3 months ago
Hi, the problem here isn't that non_stroking_color
is incorrect, the problem is that fill
is set on all subpaths of a complex path even if some of them should not be filled (whether the even-odd or the nonzero-winding rule is applied).
pdfminer.six doesn't actually apply either of those rules, it just returns all of the subpaths as separate LTCurve objects, and that is the real problem here.
LTCurve objects seem to have an incorrect non_stroking_color for intended hollow parts of a shape. I've put together a simplified document and some code demonstrating the bug. The example PDF "donut2.pdf" contains a hollow shape that was inserted in Microsoft Word, then converted to PDF.
Original PDF: donut2.pdf
Output PDF: output.pdf
Possibly related to #861