Fix of font drawing

This commit is contained in:
Jakub Melka
2019-03-31 18:08:36 +02:00
parent a462e0b768
commit cd981183b0
5 changed files with 182 additions and 19 deletions

View File

@ -273,6 +273,17 @@ QByteArray PDFDocumentDataLoaderDecorator::readName(const PDFObject& object)
return QByteArray();
}
QByteArray PDFDocumentDataLoaderDecorator::readString(const PDFObject& object)
{
const PDFObject& dereferencedObject = m_document->getObject(object);
if (dereferencedObject.isString())
{
return dereferencedObject.getString();
}
return QByteArray();
}
PDFInteger PDFDocumentDataLoaderDecorator::readInteger(const PDFObject& object, PDFInteger defaultValue) const
{
const PDFObject& dereferencedObject = m_document->getObject(object);
@ -479,4 +490,14 @@ QByteArray PDFDocumentDataLoaderDecorator::readNameFromDictionary(const PDFDicti
return QByteArray();
}
QByteArray PDFDocumentDataLoaderDecorator::readStringFromDictionary(const PDFDictionary* dictionary, const char* key)
{
if (dictionary->hasKey(key))
{
return readString(dictionary->get(key));
}
return QByteArray();
}
} // namespace pdf