Create outline for a document

This commit is contained in:
Jakub Melka
2020-11-15 18:15:10 +01:00
parent e06148fa8c
commit cb3a36f891
8 changed files with 334 additions and 1 deletions

View File

@ -23,6 +23,18 @@
namespace pdf
{
size_t PDFOutlineItem::getTotalCount() const
{
size_t count = m_children.size();
for (size_t i = 0; i < m_children.size(); ++i)
{
count += getChild(i)->getTotalCount();
}
return count;
}
QSharedPointer<PDFOutlineItem> PDFOutlineItem::parse(const PDFDocument* document, const PDFObject& root)
{
const PDFObject& rootDereferenced = document->getObject(root);