Closed msageryd closed 3 months ago
Thank you @Sharcoux As the original pdf-lib is unsupported, what fork would you recommend to use?
I think I'm fine with the current features of pdf-lib, but it seems a bit risky to use an abandoned lib.
The solution in the link should work here too
Thanks again. Is Cantoo using this fork in production? In that case it seems really solid.
I can't work out how the forks interacts. According to the network graph, the cantoo-scribe fork stopped getting commits long ago, but you, François, seem to have many commits to the rouxm fork.
We do and some other projects too.
Thanks again. I have now made a deeper dive and a proof of concept for our use case. This looks very promising, especially your svg support. Great work!
I will have to tweak our current code for generating svg to be more compliant and be usable in pdf-lib. Specifically I think have to make a version of our svg which does not use symbols and defs. Do you know if PDF geometry has support for reusing elements like SVG has?
My use case is to place hundreds, sometimes thousands of "flags" on blueprints. Most of the flags has symbols, which could be reused to save space.
Hi @msageryd , could you please provide me the link to the fork with which you built your POC?
Thanks again. I have now made a deeper dive and a proof of concept for our use case. This looks very promising, especially your svg support. Great work!
I will have to tweak our current code for generating svg to be more compliant and be usable in pdf-lib. Specifically I think have to make a version of our svg which does not use symbols and defs. Do you know if PDF geometry has support for reusing elements like SVG has?
My use case is to place hundreds, sometimes thousands of "flags" on blueprints. Most of the flags has symbols, which could be reused to save space.
According to my knowledge of it, yes, each element is embed in a dictionary and you'll then apply that element anywhere you want on the document. This means that you should not see the pdf size increase when inserting the same image multiple times. This is why there are 2 different commands needed to insert an image: embedJpg
(or embedPng
) and drawImage
Describe your idea
It would be awesome to be able to define a clickable area on a page and add a url to the area. pdfKit can do this, but I need to operate on existsing files, which pdfKit cannot do.
How could this be implemented?
PDF has support for clickable elements, so I suppose there are some low level functionality for this.
What problem are you trying to solve?
I want to cklick in my PDF
Why does this matter to you?
I have elements in my pdfs which are clickable and leads to a specific url for each element.
Would others find this helpful?
This is a function in pdfKit and I think pdf-lib would benefit from such a function.
Are you interested in implementing your proposal?
Yes
Why are you submitting a proposal?
I'm just pitching the idéa because I would love this functionality. I can probably not be of much help.
Additional Notes
No response