Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
Facilitate testing by returning a vec of URLs instead of printing them
directly to STDOUT.
|
|
|
|
Create a custom error type to use instead of the `unwrap`s.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Thanks to plinth (https://stackoverflow.com/users/20481/plinth) on Stack
Overflow, learned that URLs are stored in /A entries in a PDF:
> To get the link to go somewhere you'll need either a /Dest or an /A
> entry in the link annot (but not both). /Dest is an older artifact for
> page-level navigation - you won't use this. Instead, use the /A entry
> which is an action dictionary. So if you wanted to navigate to the url
> http://www.google.com, you would make your annotation look like this:
>
> << /Type /Annot /Subtype /Link /Rect [ x1 y1 x2 y2 ]
> /A << /Type /Action /S /URI /URI (http://www.google.com) >>
> >>
https://stackoverflow.com/questions/19492229/add-a-hyperlink-into-a-pdf-document/19496996#19496996
To extract URLs, find the /A objects and get the text value of their
`URI` fields.
|
|
Walk the different objects in the PDF to discover how hyperlinks are
stored and how I can access them.
|
|
$ rustc --version
rustc 1.38.0 (625451e37 2019-09-23)
$ cargo init --bin
|