[pdftex] PDF Outlines in different versions of MiKTeX

Heiko Oberdiek oberdiek at uni-freiburg.de
Sat Mar 8 01:43:13 CET 2008


On Fri, Mar 07, 2008 at 07:56:18AM -0600, Brad Burkman wrote:

> I run pdfTeX 3.141592-1.20a (MiKTeX 2.4) on one computer, and pdfTeX
> 3.141529-1.40.4 (MiKTeX 2.6) on another.  When I compile the following
> text:
> 
> \pdfcatalog{/PageMode/UseOutlines}
> 
> \pdfdest name{(-19,-17),(5,25),(17,19)} fit 
> 
> \pdfoutline goto
> name{(-19,-17),(5,25),(17,19)}{(-19,-17),(5,25),(17,19)}

> on the earlier version, everything works just fine.  With the later
> version, however, I get an outline pane but no bookmarks.  Just a blank
> pane.   Has there been a syntax change?  Perhaps different versions of
> Acrobat?  Windows XP v/s Vista?  

Error message of xpdf:
  Error (54): Dictionary key must be a name object
And the PDF shows:
  1 0 obj
  << /S /GoTo /D (-19,-17),(5,25),(17,19) >>
  endobj
The surrounding parentheses are missing.

pdftex.web, procedure pdf_print_str(s: str_number):
    ...
    if (str_pool[i] = '(') and (str_pool[j] = ')') then begin
        pdf_print(s);
        return;
    end;
    ...

* First the test is insufficient, as the example shows.
  The test for a hex string is better.
* Also it looks like a design error.
  I doubt, a user would suspect that
    \pdfdest name {abc} fit
  and
    \pdfdest name {(abc)} fit
  and
    \pdfdest name {<616263>} fit
  are using the same destination name.
* Another BUG:
    \pdfdest name{a} fit
    \pdfdest name{(x)} fit
    \end
  The result is a wrong destination name tree:
    /Names [(x) 5 0 R (a) 4 0 R]
    /Limits [(x) (a)]
  `x' is sorted as destination name "(x)", but
   written as destination name "x".

I think, pdfTeX shouldn't assume special meanings of the
destination names. The byte string from the token list
of keyword "name" should be the destination name without
special meanings. And if pdfTeX writes the name, it takes
care of the protection of special characters.

Otherwise the user would have to use
  \pdfdest name{(\pdfescapestring{...})}...
  \pdfdest name{<\pdfescapehex{...}>}...
to get control over the exact name. This isn't a good design,
because implementation issues leaks into the user interface.

Yours sincerely
  Heiko <oberdiek at uni-freiburg.de>


More information about the pdftex mailing list