Bug#1067196: qpdf: contrary to the documentation, fix-qdf aborts on removed objects
Jay Berkenbilt dixit: >How's that? That explains it very well and not ambiguous to nōn-native speakers (I hope). Thanks, //mirabilos -- 15:41⎜ Somebody write a testsuite for helloworld :-)
Bug#1067196: qpdf: contrary to the documentation, fix-qdf aborts on removed objects
(Sorry for the duplicate -- I inadvertently failed to cc the bug report on my private reply.) On Sun, Apr 14, 2024, at 1:50 PM, Thorsten Glaser wrote: > Jay Berkenbilt dixit: > > >As it happens, I am upstream. > > Oh, nice ☻ in that case, thanks for qpdf. > > >--- > >It is not generally practical to remove objects from QDF files without > >messing up object numbering, but if you remove all indirect references > >to an object (without removing the object itself), this will leave the > >object unreferenced. Then you can run qpdf on the file (after running > >:command:`fix-qdf`), and qpdf will omit the now-orphaned object. > >--- > > That fixes the ambiguity but leaves the reader¹ wondering, on two > reading passes, what other references than indirect there are. > The reader who has not digested the PDF spec in and out, at least. > > If you s/ indirect//, would it still be correct? That would be > less possibly-ambiguous, I think. If it triggers this thought in you, it will trigger it in others. New wording: 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 without removing the object itself (by removing all indirect objects that point to it), this will leave the object unreferenced. Then you can run qpdf on the file (after running :command:`fix-qdf`), and qpdf will omit the now-orphaned object. > bye, > //mirabilos > ① or at least me right now > -- > Beware of ritual lest you forget the meaning behind it. > yeah but it means if you really care about something, don't > ritualise it, or you will lose it. don't fetishise it, don't > obsess. or you'll forget why you love it in the first place. >
Bug#1067196: qpdf: contrary to the documentation, fix-qdf aborts on removed objects
Jay Berkenbilt dixit: >As it happens, I am upstream. Oh, nice ☻ in that case, thanks for qpdf. >--- >It is not generally practical to remove objects from QDF files without >messing up object numbering, but if you remove all indirect references >to an object (without removing the object itself), this will leave the >object unreferenced. Then you can run qpdf on the file (after running >:command:`fix-qdf`), and qpdf will omit the now-orphaned object. >--- That fixes the ambiguity but leaves the reader¹ wondering, on two reading passes, what other references than indirect there are. The reader who has not digested the PDF spec in and out, at least. If you s/ indirect//, would it still be correct? That would be less possibly-ambiguous, I think. bye, //mirabilos ① or at least me right now -- Beware of ritual lest you forget the meaning behind it. yeah but it means if you really care about something, don't ritualise it, or you will lose it. don't fetishise it, don't obsess. or you'll forget why you love it in the first place.
Bug#1067196: qpdf: contrary to the documentation, fix-qdf aborts on removed objects
Sorry for the top-post. As it happens, I am upstream. I have rewritten the pargraph as follows. I think this is clearer. What do you think? If you like it, I'll close this. My fix is here: https://github.com/qpdf/qpdf/pull/1187 --- It is not generally practical to remove objects from QDF files without messing up object numbering, but if you remove all indirect references to an object (without removing the object itself), this will leave the object unreferenced. Then you can run qpdf on the file (after running :command:`fix-qdf`), and qpdf will omit the now-orphaned object. --- On Sun, Apr 7, 2024, at 5:04 AM, Thorsten Glaser wrote: > Jay Berkenbilt dixit: > > >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. > > Yes, I meant that. At least two people assumed that “remove all > references” includes the object itself, but now that you point it > out, it likely doesn’t, but we are no native speakers, so I don’t > know which of the two interpretations is more likely to them or > if even both are possible. > > Maybe, if you have good connections to upstream, suggest to them > to add “(but not the object itself)” to behind “all references to > an object”, but the bug can then be closed. > > Thanks for looking into it, > //mirabilos > -- > Solange man keine schmutzigen Tricks macht, und ich meine *wirklich* > schmutzige Tricks, wie bei einer doppelt verketteten Liste beide > Pointer XORen und in nur einem Word speichern, funktioniert Boehm ganz > hervorragend. -- Andreas Bogk über boehm-gc in d.a.s.r >
Bug#1067196: qpdf: contrary to the documentation, fix-qdf aborts on removed objects
Jay Berkenbilt dixit: >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. Yes, I meant that. At least two people assumed that “remove all references” includes the object itself, but now that you point it out, it likely doesn’t, but we are no native speakers, so I don’t know which of the two interpretations is more likely to them or if even both are possible. Maybe, if you have good connections to upstream, suggest to them to add “(but not the object itself)” to behind “all references to an object”, but the bug can then be closed. Thanks for looking into it, //mirabilos -- Solange man keine schmutzigen Tricks macht, und ich meine *wirklich* schmutzige Tricks, wie bei einer doppelt verketteten Liste beide Pointer XORen und in nur einem Word speichern, funktioniert Boehm ganz hervorragend. -- Andreas Bogk über boehm-gc in d.a.s.r
Bug#1067196: qpdf: contrary to the documentation, fix-qdf aborts on removed objects
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…
Bug#1067196: qpdf: contrary to the documentation, fix-qdf aborts on removed objects
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… -- System Information: Debian Release: 11.9 APT prefers oldstable-updates APT policy: (500, 'oldstable-updates'), (500, 'oldstable-security'), (500, 'oldstable-proposed-updates'), (500, 'oldstable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.10.0-27-amd64 (SMP w/2 CPU threads) Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=C, LC_CTYPE=C (charmap=UTF-8) (ignored: LC_ALL set to C.UTF-8), LANGUAGE not set Shell: /bin/sh linked to /bin/lksh Init: sysvinit (via /sbin/init) Versions of packages qpdf depends on: ii libc6 2.31-13+deb11u8 ii libgcc-s1 10.2.1-6 ii libqpdf28 10.1.0-1 ii libstdc++6 10.2.1-6 qpdf recommends no packages. qpdf suggests no packages. -- no debconf information