3 # $Cambridge: exim/doc/doc-docbook/PageLabelPDF,v 1.2 2006/04/04 14:03:49 ph10 Exp $
5 # Program to add page label information to the PDF output file. I have not
6 # found a way of automatically discovering the number of frontmatter pages
7 # in the document. It is therefore taken as an argument to be inserted into the
10 $add = "/PageLabels << /Nums [ 0 << /S /r >>\n" .
11 " $ARGV[0] << /S /D >>\n" .
21 $before += length($_);
22 last if $_ =~ "^<< /Type /Catalog";
30 last if $_ =~ /^xref$/;
39 printf "%010d $rest\n", $was + (($was > $before)? $extra : 0);
47 print $1 + $extra, "\n";