Matching Clip to Its Image #2925
Replies: 1 comment
-
Vector graphics extraction currently is the only place where we join the "standard" results with clipping information. In the end I believe you have no choice other than following the path you sketched out. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Im attempting to create a version of layers for each drawn element of a pdf -- ie text, drawings, images. So far I have a function that infers seqno for images by looping through index of bbox_log and matching 2 of 4 bbox coordinates along with a tolerance and filtering on image type. Drawings and Text already have seqnos so that is how I filled in the gaps with Image. This so far is working fine. My problem is some images have clipping masks and Id like to extract that info and associate it with the correct image, Im inclined to use something similar, matching 2 of the bbox coordinates between images and clips but I realize clipping paths could have a higher probably that have bboxs that have no matching coordinates, ie all sides of the clip are smaller or bigger. This would break the logic Im following. Ideally I could use something like a seqno or some other key in dicts that could associate the two items instead of trying to infer. So I wanted to ask before I get a bit too far down the rabbit hole if there is an easier way to link these two elements either natively or another approach? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions