Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Can't Distinguish Bezier vs Linear Curves #112

Open
vitchyr opened this issue Jun 19, 2015 · 1 comment
Open

Can't Distinguish Bezier vs Linear Curves #112

vitchyr opened this issue Jun 19, 2015 · 1 comment

Comments

@vitchyr
Copy link

vitchyr commented Jun 19, 2015

I am using PDFMiner to extract vector graphics out of a PDF. It works really well for lines, as well as groups of lines. However, it seems that everything that isn't just a line or rectangle is grouped into the LTCurve class, which has a pts attribute. But given a list of points, one can't distinguish if they should be interpreted as points on a line, or points defining a Bezier curve.

I'm wondering if there's anyone way to make this distinction. I looked through the source code of converter.py, and all of that information seems to be stored in shape, which consists of strings like "myllllv."

Is there something that already tells me if an LTCurve is a Bezier curve? If not, I'd be happy to implement this functionality myself and make a pull request, but I'm not sure how to make sense of something like "myllllv." Any guidance would be appreciated!

@roier-rodriguez
Copy link

I'm having the same issue here, I don't know if there's a series of lines but I'm getting a lot of points, with pts I'm getting the same pair of Vec2, but with get_pts() I'm getting something between 2 ( this can't be a bezier curve ) or more than 3 pairs of Vec2, the right way to do this should be
https://developer.mozilla.org/en/docs/Web/SVG/Tutorial/Paths

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants