diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/qpdf/QPDFObjectHandle.hh | 16 | ||||
-rw-r--r-- | include/qpdf/qpdf-c.h | 9 |
2 files changed, 25 insertions, 0 deletions
diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh index ccc3993e..f540272d 100644 --- a/include/qpdf/QPDFObjectHandle.hh +++ b/include/qpdf/QPDFObjectHandle.hh @@ -365,6 +365,22 @@ class QPDFObjectHandle QPDF_DLL bool isScalar(); + // True if the object is a name object representing the provided name. + QPDF_DLL + bool isNameAndEquals(std::string const& name); + + // True if the object is a dictionary of the specified type and + // subtype, if any. + QPDF_DLL + bool isDictionaryOfType(std::string const& type, + std::string const& subtype = ""); + + // True if the object is a stream of the specified type and + // subtype, if any. + QPDF_DLL + bool isStreamOfType(std::string const& type, + std::string const& subtype = ""); + // Public factory methods // Wrap an object in an array if it is not already an array. This diff --git a/include/qpdf/qpdf-c.h b/include/qpdf/qpdf-c.h index 7369e616..b62f2e09 100644 --- a/include/qpdf/qpdf-c.h +++ b/include/qpdf/qpdf-c.h @@ -676,6 +676,15 @@ extern "C" { QPDF_BOOL qpdf_oh_is_indirect(qpdf_data qpdf, qpdf_oh oh); QPDF_DLL QPDF_BOOL qpdf_oh_is_scalar(qpdf_data qpdf, qpdf_oh oh); + + QPDF_DLL + QPDF_BOOL qpdf_oh_is_name_and_equals( + qpdf_data qpdf, qpdf_oh oh, char const* name); + + QPDF_DLL + QPDF_BOOL qpdf_oh_is_dictionary_of_type( + qpdf_data qpdf, qpdf_oh oh, char const* type, char const* subtype); + QPDF_DLL enum qpdf_object_type_e qpdf_oh_get_type_code(qpdf_data qpdf, qpdf_oh oh); QPDF_DLL |