2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-06-02 10:20:52 +00:00

write original object ID in a comment

git-svn-id: svn+q:///qpdf/trunk@658 71b93d88-0707-0410-a8cf-f5a4172ac649
This commit is contained in:
Jay Berkenbilt 2009-03-08 18:58:58 +00:00
parent 1c7c6dd161
commit 779d668e17

View File

@ -932,7 +932,9 @@ QPDFWriter::writeObjectStream(QPDFObjectHandle object)
{ {
writeString("%% Object stream: object " + writeString("%% Object stream: object " +
QUtil::int_to_string(new_obj) + ", index " + 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) if (pass == 1)
{ {
@ -1026,6 +1028,12 @@ QPDFWriter::writeObject(QPDFObjectHandle object, int object_stream_index)
} }
if (object_stream_index == -1) 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); openObject(new_id);
setDataKey(new_id); setDataKey(new_id);
unparseObject(object, 0, 0); unparseObject(object, 0, 0);