Copy Annotation onto Multiple Pages

This commit is contained in:
Jakub Melka
2020-12-30 17:06:13 +01:00
parent 6f0b72ba3b
commit 19dd761f35
10 changed files with 124 additions and 47 deletions

View File

@ -78,9 +78,7 @@ PDFDocument PDFRedact::perform(Options options)
}
builder.setPageRotation(newPageReference, page->getPageRotation());
// TODO: Popisek redakce anotace, Overlay text
// TODO: Redact searched text
// TODO: Duplikace redakce na vice stranek
PDFPageContentStreamBuilder contentStreamBuilder(&builder);
@ -131,7 +129,12 @@ PDFDocument PDFRedact::perform(Options options)
if (options.testFlag(CopyOutline))
{
builder.setOutline(m_document->getCatalog()->getOutlineRootPtr().data());
const PDFOutlineItem* outlineItem = m_document->getCatalog()->getOutlineRootPtr().data();
if (outlineItem)
{
builder.setOutline(outlineItem);
}
}
PDFDocument redactedDocument = builder.build();
@ -141,5 +144,4 @@ PDFDocument PDFRedact::perform(Options options)
return optimizer.takeOptimizedDocument();
}
} // namespace pdf