3

Is it possible to create an interactive PDF where you can click a scaled down embedded image and it opens it up large in a preview like window hovering in front of the open PDF? Sort of like the PDF is extending outwards and then a second click will close the window back into the PDF. I am thinking along the lines of quicklook in OS X. I don't mean just zooming the document into the clicked picture and then zooming back out again. Maybe javascript is necessary? I know websites have this sort of behavior all the time.

**The following question is similar but specifically not what I want. That solution is just zooming within the document. How to enlarge a picture on click

  • 2
  • No that is causing the PDF file to be zoomed in and zoomed out. I am asking about a new window appearing with the larger image. – David Caliri Feb 03 '14 at 03:51
  • 2
    Why do you want it to appear in a new window? The solution linked in @cmhughes comment has the advantage that the thumbnail is always magnified to the maximum size that just fits into the viewer window. – AlexG Feb 03 '14 at 07:45
  • 1
    @AlexG: To comment it here: How about putting both versions together and releasing this as package on CTAN? Would be useful IMHO. (Longer answers perhaps better in chat.) – Speravir Feb 03 '14 at 17:32
  • @Speravir: I am afraid it wouldn't make it into TeXLive, because it relies on AdobeReader features. I will think about it. – AlexG Feb 03 '14 at 18:58
  • @AlexG: Maybe, but when you’d upload a .tds.zip, one could install it by hand, too. There are other packages relying on special features, think of acrotex. – Speravir Feb 03 '14 at 21:01
  • 1
    @AlexG: Addition to my last one: For acrotex there is the licensing issue, though, why it not is included in TeX Live (but MiKTeX is not that strict). Also all this OCG stuff does not work with every PDF Reader. – Speravir Feb 03 '14 at 22:01
  • @alexg I'd also be interested in such a feature. One reason for not zooming would be to have genuinely less detail in the smaller image (for instance, no text) to make the thumbnail look cleaner. – Stephan Lehmke Feb 05 '14 at 08:28
  • 1
    @StephanLehmke: So if you don't want to use the same content for thumbnail and enlarged views, you could immediately use the \tooltip macro, as in \tooltip{\includegraphics{downscaledimage}}{\includegraphics{highresimage}}. – AlexG Feb 05 '14 at 10:53
  • 1
    @AlexG Ah, Ok. Thank you! So wouldn't that (just use a tooltip with the same image) be an answer to this question? – Stephan Lehmke Feb 06 '14 at 04:45
  • 1
    @Stephan: This wouldn't be as elegant as it could be, because the same graphics would be embedded twice increasing the PDF size. It would be better to post a modified version of the \tooltip macro here, which re-uses the embedded graphics via XObject technique, for which I currently don't have the time. – AlexG Feb 06 '14 at 07:38
  • @AlexG How could this happen? \includegraphics has its own caching mechanism and won't create two objects. – Stephan Lehmke Feb 06 '14 at 07:55

0 Answers0