Commit b079859c4c18d4dc1742459d6e5381f4fce96f61
Committed by
GitHub
Merge pull request #1306 from m-holger/foreign
Fix QPDF::copyForeignObject warning
Showing
2 changed files
with
6 additions
and
3 deletions
libqpdf/QPDF.cc
| ... | ... | @@ -2268,8 +2268,11 @@ QPDF::copyForeignObject(QPDFObjectHandle foreign) |
| 2268 | 2268 | |
| 2269 | 2269 | auto og = foreign.getObjGen(); |
| 2270 | 2270 | if (!obj_copier.object_map.count(og)) { |
| 2271 | - warn(damagedPDF("unexpected reference to /Pages object while copying foreign object; " | |
| 2272 | - "replacing with null")); | |
| 2271 | + warn(damagedPDF( | |
| 2272 | + other.getFilename() + " object " + og.unparse(' '), | |
| 2273 | + foreign.getParsedOffset(), | |
| 2274 | + "unexpected reference to /Pages object while copying foreign object; replacing with " | |
| 2275 | + "null")); | |
| 2273 | 2276 | return QPDFObjectHandle::newNull(); |
| 2274 | 2277 | } |
| 2275 | 2278 | return obj_copier.object_map[foreign.getObjGen()]; | ... | ... |
qpdf/qtest/qpdf/copy-foreign-objects-25.out
| 1 | -WARNING: minimal.pdf (object 6 0, offset 556): unexpected reference to /Pages object while copying foreign object; replacing with null | |
| 1 | +WARNING: minimal.pdf (copy-foreign-objects-in.pdf object 2 0, offset 768): unexpected reference to /Pages object while copying foreign object; replacing with null | |
| 2 | 2 | test 25 done | ... | ... |