Hopding / pdf-lib

Create and modify PDF documents in any JavaScript environment
https://pdf-lib.js.org
MIT License
6.74k stars 645 forks source link

Make PDFDocument derivable #1495

Open stefanwerfling opened 1 year ago

stefanwerfling commented 1 year ago

Describe your idea

I don't see why this is a library and the object with "private" prevents all derivation and use of the internal methods!? I can understand if you want to give something "safety" to use and prevent errors. But I wanted to write costumer meta data into the PDF now, which is intentionally not supported. Now I wanted to derive the object, which is also not possible.

How could this be implemented?

My suggestion now, please do everything "proctected" instead of "private", makes a lot more sense!

What problem are you trying to solve?

Class extends

Why does this matter to you?

For my project to add costumer metadata to the PDF

Would others find this helpful?

I think other developers could positively build on it!

Are you interested in implementing your proposal?

Yes

Why are you submitting a proposal?

-

Additional Notes

-

romanstark commented 8 months ago

I have the same problem. See https://github.com/Hopding/pdf-lib/discussions/1569

stefanwerfling commented 8 months ago

@romanstark Hi! :) If I had the time, I would implement it with a fork immediately. But I actually wanted it to be officially supported (it would be of greater benefit to everyone).