implement rellengths for PDF output