summaryrefslogtreecommitdiffstats
path: root/include/qpdf/QPDF.hh
diff options
context:
space:
mode:
Diffstat (limited to 'include/qpdf/QPDF.hh')
-rw-r--r--include/qpdf/QPDF.hh12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh
index fbac2ab2..b5c07abb 100644
--- a/include/qpdf/QPDF.hh
+++ b/include/qpdf/QPDF.hh
@@ -161,7 +161,8 @@ class QPDF
// be associated with the PDF file. Note that replacing an object
// with QPDFObjectHandle::newNull() effectively removes the object
// from the file since a non-existent object is treated as a null
- // object.
+ // object. To replace a reserved object, call replaceReserved
+ // instead.
QPDF_DLL
void replaceObject(int objid, int generation, QPDFObjectHandle);
@@ -180,6 +181,15 @@ class QPDF
void swapObjects(int objid1, int generation1,
int objid2, int generation2);
+ // Replace a reserved object. This is a wrapper around
+ // replaceObject but it guarantees that the underlying object is a
+ // reserved object. After this call, reserved will be a reference
+ // to replacement.
+ QPDF_DLL
+ void
+ replaceReserved(QPDFObjectHandle reserved,
+ QPDFObjectHandle replacement);
+
// Encryption support
enum encryption_method_e { e_none, e_unknown, e_rc4, e_aes };