Can you tell me where in the docs it says what you're describing? Here's a direct quote from the current qpdf documentation:
It is not generally practical to remove objects from QDF files without messing up object numbering, but if you remove all references to an object, you can run qpdf on the file (after running fix-qdf), and qpdf will omit the now-orphaned object. To me, it seems that the documentation matches the observed and intended behavior. Maybe there was an error in the older docs that have been subsequently fixed. On Tue, Mar 19, 2024, at 5:14 PM, Thorsten Glaser wrote: > Package: qpdf > Version: 10.1.0-1 > Severity: normal > Tags: upstream > X-Debbugs-Cc: t...@mirbsd.de, n...@naturalnet.de > > The qpdf documentation states that it is possible to remove an object > then run fix-qdf and it should renumber the remaining objects. > > In an exemplary PDF, I did this: > > - qpdf --qdf dings.pdf dings.qdf > - $EDITOR dings.qdf > - remove object '38 0' and the one reference to it > - fix-qdf dings.qdf >dings2.qdf > > It complained about the missing object: > > dings.qdf:20254: expected object 38 > > Line 20254 here is exactly the beginning of object '39 0' > after the end of object '37 0'. > > ──┤ Workaround ├──────────────────────────────────────────────────────── > > Just removing all the references and letting qpdf clean up the > now-unreferenced object seems to have worked here. > > But this does still not work as documented…