hyperref icon indicating copy to clipboard operation
hyperref copied to clipboard

PDF form parameter 'menulength' does not work

Open donovaly opened this issue 8 years ago • 2 comments

I use hyperref v6.85a and pdfTeX 1.40.17.

In the hyperref manual it is stated that menulength will determine the number of displayed entries in a list. But

\renewcommand*{\DefaultOptionsofPopdownBox}{print, menulength=2} \ChoiceMenu[popdown, name=country2, default=Ar]{Country:}{Albania=Al, Armenia=Ar, Azerbaidschan=Az}

shows me all 3 entries instead of the desired 2. I am quite sure that menulength worked in previous versions of hyperref.

donovaly avatar Apr 18 '17 00:04 donovaly

I don't think that anything has changed here, the code from 2014 looks identical.

The popdown option doesn't do much, it is used only once, and then only if combo is active too. menulength seems to be used only if the menu is of type list (that is if combo is not active):


\documentclass{article}
\usepackage{xcolor}
\usepackage{hyperref}

\begin{document}
\begin{Form}

\renewcommand*{\DefaultOptionsofComboBox}{print, color=blue}

\renewcommand*{\DefaultOptionsofPopdownBox}{print, color=red}

\renewcommand*{\DefaultOptionsofListBox}{print, color=green, menulength=2}

\ChoiceMenu[combo, name=country1, default=Ar]
  {Country:}{Albania=Al, Armenia=Ar, Azerbaidschan=Az,Germany=de,england=en}
\ChoiceMenu[combo,popdown, name=country2, default=Ar]
  {Country:}{Albania=Al, Armenia=Ar, Azerbaidschan=Az,Germany=de,england=en}
\ChoiceMenu[name=country3, default=Ar]{Country:}
  {Albania=Al, Armenia=Ar, Azerbaidschan=Az,Germany=de,england=en}

\end{Form}
\end{document}

u-fischer avatar May 13 '17 16:05 u-fischer

Thanks Ulrike, but this is my point - the manual lacks information. It took me a lot of time to find out the different cases. Therefore the docs should be updated.

donovaly avatar Aug 14 '17 00:08 donovaly