![](https://secure.gravatar.com/avatar/adfff96f4299fb3ee3b199b06eea68da.jpg?s=120&d=mm&r=g)
Bugs item #335, was opened at 2005-05-05 14:51
You can respond by visiting:
http://sarovar.org/tracker/?func=detail&atid=493&aid=335&group_id=106
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Heiko Oberdiek (oberdiek)
Assigned to: Nobody (None)
Summary: Empty name (\pdfdest name{}xyz) destroys /Names array
Initial Comment:
Hello,
empty strings are suppressed by pdf_print_str
(pdftex.ch). This is fatal for many places,
resulting in invalid PDF files (no working
bookmarks, ...):
\pdfdest name{}xyz
First page
\vfil\break
\pdfdest name{foobar}xyz
\pdfoutline goto name{foobar} count 0{Second page}
Second page.
\bye
The generated PDF file contains:
/Names [ 4 0 R (foobar) 10 0 R]
/Limits [ (foobar)]
instead of
/Names [() 4 0 R (foobar) 10 0 R]
/Limits [() (foobar)]
Suggested fix (modulo line breaks):
*** pdftex.ch.org 2005-04-24 00:39:28.000000000 +0200
--- pdftex.ch 2005-05-05 14:45:27.000000000 +0200
***************
*** 1921,1928 ****
begin
i := str_start[s];
j := i + length(s) - 1;
! if (i > j) then
return; {null string}
if (str_pool[i] = '(') and (str_pool[j] = ')')
then begin
pdf_print(s);
return;
--- 1921,1930 ----
begin
i := str_start[s];
j := i + length(s) - 1;
! if (i > j) then begin
! pdf_print("()");
return; {null string}
+ end;
if (str_pool[i] = '(') and (str_pool[j] = ')')
then begin
pdf_print(s);
return;
Yours sincerely
Heiko