Skip to content

Instantly share code, notes, and snippets.

View PhilterPaper's full-sized avatar

Phil Perry PhilterPaper

View GitHub Profile
@PhilterPaper
PhilterPaper / HTML2PDF.pl
Created August 31, 2015 22:39
Wrapper to add page numbers to TOC and links for wkhtmltopdf processing
# wrapper for wkhtmltopdf and pdftk to update links with actual page numbers
# TOC entries get leader dots and page number . . . NN
# internal links (#id) get [page NN]
# written by Phil M Perry
# (c) copyright 2015, Phil M Perry
# license: GNU Lesser General Public License (LGPL) v3
#
use warnings;
# it's a quick & dirty job that doesn't have many safeguards. use at your own
# risk. anyone is welcome to improve upon it!