diff options
author | Jay Berkenbilt <ejb@ql.org> | 2013-01-22 15:57:07 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2013-01-22 16:01:45 +0100 |
commit | 913eb5ac35011b3d28c653b6f89d936c8f99c844 (patch) | |
tree | ded1a2e1b5f9fcdf6a5e77e44e30aa528be306be /examples | |
parent | f81152311e5737e5e0de9dd9462311f306c6921b (diff) | |
download | qpdf-913eb5ac35011b3d28c653b6f89d936c8f99c844.tar.zst |
Add getTypeCode() and getTypeName()
Add virtual methods to QPDFObject, wrappers to QPDFObjectHandle, and
implementations to all the QPDF_Object types.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/pdf-parse-content.cc | 2 | ||||
-rw-r--r-- | examples/qtest/parse-content/content.out | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/examples/pdf-parse-content.cc b/examples/pdf-parse-content.cc index 1c3cae16..430c0a06 100644 --- a/examples/pdf-parse-content.cc +++ b/examples/pdf-parse-content.cc @@ -30,10 +30,10 @@ class ParserCallbacks: public QPDFObjectHandle::ParserCallbacks void ParserCallbacks::handleObject(QPDFObjectHandle obj) { + std::cout << obj.getTypeName() << ": "; if (obj.isInlineImage()) { std::string val = obj.getInlineImageValue(); - std::cout << "inline image: "; char buf[3]; buf[2] = '\0'; for (size_t i = 0; i < val.length(); ++i) diff --git a/examples/qtest/parse-content/content.out b/examples/qtest/parse-content/content.out index 9c07edc2..dc6bd8d1 100644 --- a/examples/qtest/parse-content/content.out +++ b/examples/qtest/parse-content/content.out @@ -1,11 +1,11 @@ -BT -/F1 -24 -Tf -72 -720 -Td -(Potato) -Tj -ET +keyword: BT +name: /F1 +integer: 24 +keyword: Tf +integer: 72 +integer: 720 +keyword: Td +string: (Potato) +keyword: Tj +keyword: ET -EOF- |