5

Can anyone tell me how to add link or button to the pdf that when user press it it will open a print window?

N.N.
  • 36,163
joanna
  • 95
  • 1
  • 4
  • 1
    Did you try the hyperref package. I can access the Adobe Acrobat Menus. – Tobi Oct 05 '11 at 09:01
  • 1
    You could probably use Acrobat's JavaScript interface. I had a quick look at the JavaScript documentation for Acrobat and couldn't find a Print method (but it has events related to printing). Be aware that if this is possible, only Acrobat Reader will understand it, and it might require to process the PDF through Acrobat Writer to set the permissions. – raphink Oct 05 '11 at 09:03
  • @Tobi: This is very interesting indeed. – raphink Oct 05 '11 at 09:06

1 Answers1

7

Based on Tobi's comment, you can use hyperref's \AcrobatMenu macro:

\documentclass{scrbook}

\usepackage{hyperref}
\usepackage{lipsum}

\begin{document}

\Acrobatmenu{Print}{Print doc}
\lipsum

\end{document}

It even works with other readers such as evince.

raphink
  • 31,894
  • 1
    It works with Skim (Mac) and Mac OS X Preview too but not if PDF is opened in Safari (without Adobe Reader plugin). – Tobi Oct 05 '11 at 09:19
  • And one more question: do you know if i can print just current page ? – joanna Oct 05 '11 at 09:42
  • 1
    @joanna: The \AcrobatMenu macro only launches the menu, it doesn't allow to manipulate what's inside the printing box (which might be different between viewers, even). – raphink Oct 05 '11 at 09:44