Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bf88c38

Browse files
committed
Fix the broken PDF links, really this time!
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.
1 parent a2c2a83 commit bf88c38

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Doc/tools/toc2bkm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def write_toc(toc, fp):
101101

102102
def write_toc_entry(entry, fp, layer):
103103
stype, snum, title, pageno, toc = entry
104-
s = "\\pdfoutline goto name{page.%dx}" % pageno
104+
s = "\\pdfoutline goto name{page%03d}" % pageno
105105
if toc:
106106
s = "%s count -%d" % (s, len(toc))
107107
if snum:

0 commit comments

Comments
 (0)