Skip to content

Draft: Insert/Remove pages

lbaudin1 requested to merge lbaudin1/poppler-freetextglib:editpagesapi into master

This draft branch adds some APIs to insert/remove pages from a document. More precisely, it adds:

  • some code in Catalog.cc to copy pages from one document to the other
  • some code to remove pages but currently it only removes things from the catalog dictionary (maybe some GC would be useful to reduce the document size)
  • a small utility pdfcombine that merge documents with the code above. I should probably remove that, pdfunite is sufficient.
  • for glib, a way to save documents to a GOutputStream (this is useful to serialize/deserialize docs)

The code is mostly a big refactoring of the merging code of pdfunite.

There are a few missing things missing such as the output intent (not sure it's that useful?), and it needs some code cleanup and way more testing.

I am creating this in case I am on a wrong track ;)

And the related Papers branch (it has not been rebased for a long time): https://gitlab.gnome.org/lbaudin/papers-freetextannotation/-/tree/editpagesapi

Merge request reports

Loading