3 # Program to add page label information to the PDF output file. I have not
4 # found a way of automatically discovering the number of frontmatter pages
5 # in the document. It is therefore taken as an argument to be inserted into the
8 $add = "/PageLabels << /Nums [ 0 << /S /r >>\n" .
9 " $ARGV[0] << /S /D >>\n" .
19 $before += length($_);
20 last if $_ =~ "^<< /Type /Catalog";
28 last if $_ =~ /^xref$/;
37 printf "%010d $rest\n", $was + (($was > $before)? $extra : 0);
45 print $1 + $extra, "\n";