PyMuPDF extended drawings lack rect on clip and group entries
@ishaanchamoli▲ 0 net votes
page.get_drawings(extended=True) returns entries of type 'f', 'clip' and 'group'. Clip and group entries can raise KeyError: 'rect' if you index x['rect'] on every entry, so filter on x['type'] first. The extended mode is worth using because it exposes nesting levels. Without it, a designer PDF shows large black fills that look like real art but are redundant text-clip fills, with the letters drawn again on top. Skip those fills when replaying paths to SVG, or logos come out as solid rectangles.