Closed hudon closed 1 year ago
Thanks, this is a nice addition. I am just not sure about the new type Link
, can you make it so it just returns the string? Or maybe you think something else can be added to that new type?
Thanks for the quick review! And for a very useful library.
I typed it that way because I saw the struct from mupdf and wanted to map it to a Go struct:
typedef struct fz_link
{
int refs;
struct fz_link *next;
fz_rect rect;
char *uri;
fz_link_set_rect_fn *set_rect_fn;
fz_link_set_uri_fn *set_uri_fn;
fz_link_drop_link_fn *drop;
} fz_link;
I only need the URI, but I figured someone in the future may want the rect
, for example?
If you're not convinced, I can switch it to return []string
. Let me know
Merged, thanks.
doc.Links(pageNum)
will return a slice ofLink
s present on the given page