Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[FEATURE] get_page_annotations_mut #332

Open
jeertmans opened this issue Sep 28, 2024 · 3 comments
Open

[FEATURE] get_page_annotations_mut #332

jeertmans opened this issue Sep 28, 2024 · 3 comments

Comments

@jeertmans
Copy link
Contributor

Hello,

I wrote a small CLI that merges page annotations, and I had to implement a get_page_annotations_mut function to this end, as this is not featured in your crate.

Would it make sense to you to include such a feature? If so, I'd be happy to make a PR :-)

My implementation: https://github.com/jeertmans/rpdf/blob/9b2a4086d8482b2d7e74c973d556abbdf3d2cc68/src/cli/annotations.rs#L153-L185 (note that the unwrap logic dates back to before <0.34)

@janriemer
Copy link

Oh, this is really neat, thank you! I'm currently writing a crate on top of lopdf that can attach arbitrary files to pages of pdfs and for this I also need mutable access to the annotations.

Until this is not implemented in lopdf:
@jeertmans can I use your code (of course with proper attribution) in my crate (licensed under MIT/APACHE 2.0)? If yes, under which license does it fall? Thank you! 🙂

@jeertmans
Copy link
Contributor Author

Hi @janriemer, my code is under the MIT licence, which is quite permissive so you can just steal it and adapt it as you want, but I appreciate any mention :)

@Heinenen
Copy link
Collaborator

I don't think the API of lopdf follows any coherent strategy, so adding another function shouldn't be a problem.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants