Pdf-lib: SVG Path with stroke features

Created on 22 Feb 2020  路  4Comments  路  Source: Hopding/pdf-lib

From #202, there is a feature added for SVG path, great thank to the contributors.
Yet there is some feature missing for path, say
stroke-width, stroke-color, fill, stroke-linecap etc.

I know that will be quite tedious to write a parser for these.
For a short fix, could they be added to the options?

enhancement help wanted

All 4 comments

Hello @ihmc3jn09hk! I'd be willing to accept a PR for this if anybody would like to work on it.

I would like to contribute @Hopding. I had a quick look at the code but yet figure out how it work exactly. I aint JS guru but would like to give it a shot. Maybe please clear my understanding on the stucture before anything else.
In code tracing, svgPath.ts, operator.ts and PDFOperatorNames.ts are the files of interest ?? I cannot find where the implementation of a function is located.
E.g. moveTo()
PDFOperatorNames.ts //A marco defination?
operator.ts //Registration of the function?
svgPath.ts //Here again, another map to the function like operator.ts

So, where exactly is the implementation of the mapped function?
I am sorry if it is a dump question in JS development. I just studied the project for a short time.

@ihmc3jn09hk I just released the PDF embedding feature yesterday. In #348 you mentioned that it would be a good workaround for you. If so, are you still interested in working on this feature? Please let me know if you are, and I'll take some time to answer your questions!

@Hopding wow, that's great. Thanks. It's a big jump for the library. Will try it out asap which I think is fitting my needs. Much thanks to
@tessi the hero for this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jboxxx picture jboxxx  路  4Comments

keyhoffman picture keyhoffman  路  4Comments

msvargas picture msvargas  路  6Comments

DanielJackson-Oslo picture DanielJackson-Oslo  路  3Comments

kevinswartz picture kevinswartz  路  5Comments