repair PDF files in QDF form after editing
fix-qdf < infilename > outfilename
The fix-qdf program is part of the qpdf package.
The fix-qdf program reads a PDF file in QDF form and writes out the same file with stream lengths, cross-reference table entries, and object stream offset tables regenerated.
For details about fix-qdf and about PDF files in QDF mode, please see the qpdf manual, which can be found at https://qpdf.readthedocs.io.