Hand-written, based on the text example in Appendix G.2 in the PDF 1.7 spec, with the xref table fixed up by `mutool clean`: mutool clean -dggg Tests/LibPDF/text.pdf Tests/LibPDF/text.pdf