c***n 发帖数: 408 | 1 For example, we have a pdf file, which has different text. ABC, CDE, XYZ.
etc. These texts don't have hyperlink, just plain text.
Now we want to trigger an event when clicking on the text XYZ. Can we do
that? thanks | c***n 发帖数: 408 | | p*****2 发帖数: 21240 | 3 问题问的有问题吧
【在 c***n 的大作中提到】 : For example, we have a pdf file, which has different text. ABC, CDE, XYZ. : etc. These texts don't have hyperlink, just plain text. : Now we want to trigger an event when clicking on the text XYZ. Can we do : that? thanks
| g*****g 发帖数: 34805 | 4 I don't know how to trigger an event on pdf text, you probably need to go
through low level mouse event and try to match the cursor position. For text
in Swing, it's much simpler, you can listen on the Swing text component.
【在 c***n 的大作中提到】 : For example, we have a pdf file, which has different text. ABC, CDE, XYZ. : etc. These texts don't have hyperlink, just plain text. : Now we want to trigger an event when clicking on the text XYZ. Can we do : that? thanks
| z****e 发帖数: 54598 | 5 靠
你打算在pdf里面加吗?
分成两大块
1)读取pdf,以及写pdf的类库你要找一个出来
2)parse pdf里面的text,对于http://, https://, www.开头的链接parse
然后将生成的link写回原来的pdf文件 | c*********e 发帖数: 16335 | 6 这个简单。以前做过把一世界地图的每个国家分割开,用map.比如
【在 c***n 的大作中提到】 : For example, we have a pdf file, which has different text. ABC, CDE, XYZ. : etc. These texts don't have hyperlink, just plain text. : Now we want to trigger an event when clicking on the text XYZ. Can we do : that? thanks
|
|