From 1d88955fa68fb7fb0fd2d705bc80655edb7a5972 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sun, 20 Jan 2013 14:55:01 -0500 Subject: Added new QPDFObjectHandle types Keyword and InlineImage These object types are to facilitate content stream parsing. --- include/qpdf/QPDFObjectHandle.hh | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh index 75912e79..932a6678 100644 --- a/include/qpdf/QPDFObjectHandle.hh +++ b/include/qpdf/QPDFObjectHandle.hh @@ -76,7 +76,8 @@ class QPDFObjectHandle QPDF_DLL bool isInitialized() const; - // Exactly one of these will return true for any object. + // Exactly one of these will return true for any object. Keyword + // and InlineImage are only allowed in content streams. QPDF_DLL bool isBool(); QPDF_DLL @@ -90,6 +91,10 @@ class QPDFObjectHandle QPDF_DLL bool isString(); QPDF_DLL + bool isKeyword(); + QPDF_DLL + bool isInlineImage(); + QPDF_DLL bool isArray(); QPDF_DLL bool isDictionary(); @@ -103,7 +108,8 @@ class QPDFObjectHandle QPDF_DLL bool isIndirect(); - // True for everything except array, dictionary, and stream + // True for everything except array, dictionary, stream, word, and + // inline image. QPDF_DLL bool isScalar(); @@ -148,6 +154,10 @@ class QPDFObjectHandle QPDF_DLL static QPDFObjectHandle newString(std::string const& str); QPDF_DLL + static QPDFObjectHandle newKeyword(std::string const&); + QPDF_DLL + static QPDFObjectHandle newInlineImage(std::string const&); + QPDF_DLL static QPDFObjectHandle newArray(); QPDF_DLL static QPDFObjectHandle newArray( @@ -239,6 +249,12 @@ class QPDFObjectHandle QPDF_DLL std::string getUTF8Value(); + // Methods for content stream objects + QPDF_DLL + std::string getKeywordValue(); + QPDF_DLL + std::string getInlineImageValue(); + // Methods for array objects; see also name and array objects QPDF_DLL int getArrayNItems(); @@ -510,6 +526,10 @@ class QPDFObjectHandle QPDF_DLL void assertString(); QPDF_DLL + void assertKeyword(); + QPDF_DLL + void assertInlineImage(); + QPDF_DLL void assertArray(); QPDF_DLL void assertDictionary(); -- cgit v1.2.3-54-g00ecf