Object content viewer

This commit is contained in:
Jakub Melka
2021-06-13 18:54:47 +02:00
parent c0b0fb6010
commit f4ea513208
11 changed files with 283 additions and 6 deletions

View File

@ -519,4 +519,19 @@ qint64 PDFDocumentWriter::getDocumentFileSize(const PDFDocument* document)
return -1;
}
QByteArray PDFDocumentWriter::getSerializedObject(const PDFObject& object)
{
QBuffer buffer;
if (buffer.open(QBuffer::WriteOnly))
{
PDFWriteObjectVisitor visitor(&buffer);
object.accept(&visitor);
buffer.close();
}
return buffer.data();
}
} // namespace pdf