mirror of
https://github.com/qpdf/qpdf.git
synced 2024-06-01 01:40:51 +00:00
Dangling ref test: show new object ID
This commit is contained in:
parent
5489f1d8d6
commit
f6367bbada
|
@ -1,3 +1,4 @@
|
|||
new object: 11 0 R
|
||||
all objects
|
||||
1 0 R
|
||||
2 0 R
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
new object: 7 0 R
|
||||
all objects
|
||||
1 0 R
|
||||
2 0 R
|
||||
|
|
|
@ -2062,8 +2062,10 @@ test_53(QPDF& pdf, char const* arg2)
|
|||
{
|
||||
// Test get all objects and dangling ref handling
|
||||
QPDFObjectHandle root = pdf.getRoot();
|
||||
root.replaceKey(
|
||||
"/Q1", pdf.makeIndirectObject(QPDFObjectHandle::newString("potato")));
|
||||
auto new_obj =
|
||||
pdf.makeIndirectObject(QPDFObjectHandle::newString("potato"));
|
||||
root.replaceKey("/Q1", new_obj);
|
||||
std::cout << "new object: " << new_obj.unparse() << std::endl;
|
||||
std::cout << "all objects" << std::endl;
|
||||
for (auto& obj: pdf.getAllObjects()) {
|
||||
std::cout << obj.unparse() << std::endl;
|
||||
|
|
Loading…
Reference in New Issue
Block a user