Text operators (first part)

This commit is contained in:
Jakub Melka
2019-03-25 18:44:45 +01:00
parent 8c417b2afb
commit 21e125bd40
9 changed files with 5198 additions and 20 deletions

View File

@ -98,6 +98,11 @@ public:
/// \param defaultValue Default value
PDFReal readNumber(const PDFObject& object, PDFReal defaultValue) const;
/// Reads a boolean from the object, if it is possible.
/// \param object Object, can be an indirect reference to object (it is dereferenced)
/// \param defaultValue Default value
bool readBoolean(const PDFObject& object, bool defaultValue) const;
/// Reads a text string from the object, if it is possible.
/// \param object Object, can be an indirect reference to object (it is dereferenced)
/// \param defaultValue Default value
@ -206,6 +211,12 @@ public:
/// \param object Object containing array of numbers
std::vector<PDFInteger> readIntegerArray(const PDFObject& object) const;
/// Reads boolean from dictionary. If dictionary entry doesn't exist, or error occurs, default value is returned.
/// \param dictionary Dictionary containing desired data
/// \param key Entry key
/// \param defaultValue Default value
bool readBooleanFromDictionary(const PDFDictionary* dictionary, const char* key, bool defaultValue) const;
private:
const PDFDocument* m_document;
};