2

Would it possible to create a say 3-page PDF document with LaTeX such that

  1. On page 1 the reader is presented with a yes/no question through something like a radio button;
  2. If the answer is yes, then the reader may go on to page 2 and 3;
  3. If the answer is no, then the reader goes to page 3, while page 2 remains hidden to him/her.

The idea is to create document with a non-disclosure clause in the cover page. If accepted, green light with reading the whole document. If declined, the access is only granted from one other page onwards, or to none.

A tricky implication is that page 2 in the example should ideally remain inaccessible also to previews, thumbnails and so forth.

I am aware of a similar unanswered question 'conditional text triggered by form'. If my question is too far-fetched, as I fear, it would be interesting to address that question instead.

Thanks for dealing with this.

1

The only means I can think of is OCGs (PDF Layers). However, it cannot eliminate pages, only hide their content.

\documentclass{article}
\usepackage{ocgx2} % supports multi-page PDF Layers
\usepackage{color}
\usepackage{kantlipsum}
\usepackage{hyperref}

\begin{document}
I agree \raisebox{-0.25\height}{\huge%
  \makebox[0pt][l]{\showocg{classified}{\color{red}$\circ$}}%
  \begin{ocg}{I agree.}{classified}{off}$\color{green}\bullet$\end{ocg}%
} to tell nothing about the following content to anybody.

Or \hyperlink{public}{skip} the classified content.

\newpage
\begin{ocg}[printocg=never,exportocg=never]{...}{classified}{off}
\kant[1-20]
\end{ocg}
\newpage

\hypertarget{public}{}The following information is public:

\Huge The End.

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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