0.4 rewrite of PDFutils