I'd like to show a pdf file online and provide a translations when words are clicked in pdf. Pdf is coming from user and doesn't have any markup from me. If a translated pdf is available I'd like to show fragments of the translation pdf when sentences/words in original pdf are clicked. If translation is not in a pdf file, I'd show it just as a text overlay. Which possibilities do I have?
I can imagine following solutions:
- no modification to original pdf, on click on sentence an overlay appears. Probably not possible with Adobe Pdf Reader, is there any server-side reader available, where I can do such operations (handle clicks, get clicked text, sdd overlay)?
- convert pdf to html - which converter can I use on server side? (PHP preferred)
- create a custom pdf reader for browser - too complicated
- ??
any suggestions?