]> granicus.if.org Git - python/commitdiff
Fix the broken PDF links, really this time!
authorFred Drake <fdrake@acm.org>
Wed, 15 Apr 1998 17:50:22 +0000 (17:50 +0000)
committerFred Drake <fdrake@acm.org>
Wed, 15 Apr 1998 17:50:22 +0000 (17:50 +0000)
Appending a junk char to the end doesn't quite do it, or doesn't seem to at
any rate.  Instead, pad the page numbers to always be 3 charaters wide, with
leading zeros.

Doc/tools/toc2bkm.py

index 0d22fb1e2c2a58f4b2a77df44fd70cc14a5f01bc..ed78f36c37ff56e0f899d950b46bdfc1d15c799a 100755 (executable)
@@ -101,7 +101,7 @@ def write_toc(toc, fp):
 
 def write_toc_entry(entry, fp, layer):
     stype, snum, title, pageno, toc = entry
-    s = "\\pdfoutline goto name{page.%dx}" % pageno
+    s = "\\pdfoutline goto name{page%03d}" % pageno
     if toc:
        s = "%s count -%d" % (s, len(toc))
     if snum: