fschutt / printpdf

An easy-to-use library for writing PDF in Rust
https://docs.rs/printpdf/
MIT License
777 stars 95 forks source link

add hyperlink support using link annotations #149

Closed alpaylan closed 10 months ago

alpaylan commented 10 months ago

Mentioned in this issue, the crate previously didn't have a way of adding hyperlinks. This PR introduces Link Annotations(can be found in page 394 at Adobe PDF 1.7 format) that allows for selecting a rectangle within the page, and use it as a URI. Although it is possible to have a more general structure that supports all types of annotations, I believe that would take an enormous amount of time with little benefits in return. I will be expecting your comments.

fschutt commented 10 months ago

I'll need to look into the build failures, LGTM otherwise.

alpaylan commented 10 months ago

Glad to hear that!

alpaylan commented 10 months ago

@fschutt I found a bug, I'll commit a fix in a moment

alpaylan commented 10 months ago

@fschutt I was wondering if you had time to look into merging this.