Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question
1  
Did you try the hyperref package. I can access the Adobe Acrobat Menus. –  Tobi Oct 5 '11 at 9: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. –  ℝaphink Oct 5 '11 at 9:03
    
@Tobi: This is very interesting indeed. –  ℝaphink Oct 5 '11 at 9:06
add comment

1 Answer

up vote 6 down vote accepted

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.

share|improve this answer
    
Thanks for that! I will try if it works. –  joanna Oct 5 '11 at 9:16
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 5 '11 at 9:19
    
Yes, it works :) thanks a lot for help –  joanna Oct 5 '11 at 9:28
    
And one more question: do you know if i can print just current page ? –  joanna Oct 5 '11 at 9: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). –  ℝaphink Oct 5 '11 at 9:44
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.