aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2009-03-08 19:58:58 +0100
committerJay Berkenbilt <ejb@ql.org>2009-03-08 19:58:58 +0100
commit779d668e1785b87a7f627612d596ba1b30fe167a (patch)
treef2e5a185970c026c088e774f0f8ad1c7ee5bf4f2 /libqpdf
parent1c7c6dd161856c121416c1acb39239a073713104 (diff)
downloadqpdf-779d668e1785b87a7f627612d596ba1b30fe167a.tar.zst
write original object ID in a comment
git-svn-id: svn+q:///qpdf/trunk@658 71b93d88-0707-0410-a8cf-f5a4172ac649
Diffstat (limited to 'libqpdf')
-rw-r--r--libqpdf/QPDFWriter.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/libqpdf/QPDFWriter.cc b/libqpdf/QPDFWriter.cc
index 9051f87a..18f420b5 100644
--- a/libqpdf/QPDFWriter.cc
+++ b/libqpdf/QPDFWriter.cc
@@ -932,7 +932,9 @@ QPDFWriter::writeObjectStream(QPDFObjectHandle object)
{
writeString("%% Object stream: object " +
QUtil::int_to_string(new_obj) + ", index " +
- QUtil::int_to_string(count) + "\n");
+ QUtil::int_to_string(count) +
+ "; original object ID: " +
+ QUtil::int_to_string(obj) + "\n");
}
if (pass == 1)
{
@@ -1026,6 +1028,12 @@ QPDFWriter::writeObject(QPDFObjectHandle object, int object_stream_index)
}
if (object_stream_index == -1)
{
+ if (this->qdf_mode)
+ {
+ writeString("%% Original object ID: " +
+ QUtil::int_to_string(object.getObjectID()) + " " +
+ QUtil::int_to_string(object.getGeneration()) + "\n");
+ }
openObject(new_id);
setDataKey(new_id);
unparseObject(object, 0, 0);