mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Object content viewer
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user