Structure tree text extractor (basics)

This commit is contained in:
Jakub Melka
2020-10-13 19:14:05 +02:00
parent 08b38ce813
commit b0f8e1f1e3
3 changed files with 274 additions and 1 deletions

View File

@ -113,6 +113,20 @@ PDFDocumentTextFlow PDFDocumentTextFlowFactory::create(const PDFDocument* docume
break;
}
case Algorithm::Structure:
{
if (!structureTree.isValid())
{
m_errors << PDFRenderError(RenderErrorType::Error, PDFTranslationContext::tr("Valid tagged document required."));
break;
}
PDFStructureTreeTextExtractor extractor(document, &structureTree);
extractor.perform(pageIndices);
break;
}
default:
Q_ASSERT(false);
break;