Fix invalid string offset warning in PDF output
Make local links work

This adds anchors for all headers so local (in-page) links work (mPDF
doesn't seem to use ids as anchors).