in reply to Re: PDF::API2 to search for text in PDF file
in thread PDF::API2 to search for text and place hyperlinks in PDF file
#(250.00, 650.00) This is some pdftext
The text in coordinates is presumably the position on the page. With some assumptions (font size is always 10-12, box width can also constrained/guessed meaningfully), I could put a hyperlink there, which would approximately be at the right position.
Afterwards, manual editing could remove the URL or change it. This would still be much quicker than setting all the URLs manually from scratch. I would also happily switch to a different tool that accomplishes dumping text and position to a text file. For instance, we have acrobat 8 here but I haven't tried its javascript API. A table of
### page ### position x,y ### matched text ####
would suffice for a while. I could use this as input for my script.
I still don't know what to do with text that wraps around on the page, though. These hyperlinks would be incomplete and hence invalid.
|
|---|