mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Refactoring - prepare for undo/redo and document modification
This commit is contained in:
@ -434,9 +434,13 @@ void PDFRasterizerPool::render(const std::vector<PDFInteger>& pageIndices,
|
||||
emit renderError(PDFRenderError(error.type, PDFTranslationContext::tr("Page %1: %2").arg(pageIndex + 1).arg(error.message)));
|
||||
}
|
||||
|
||||
// We can const-cast here, because we do not modify the document in annotation manager.
|
||||
// Annotations are just rendered to the target picture.
|
||||
PDFModifiedDocument modifiedDocument(const_cast<PDFDocument*>(m_document), const_cast<PDFOptionalContentActivity*>(m_optionalContentActivity));
|
||||
|
||||
// Annotation manager
|
||||
PDFAnnotationManager annotationManager(m_fontCache, m_cmsManager, m_optionalContentActivity, m_meshQualitySettings, m_features, PDFAnnotationManager::Target::Print, nullptr);
|
||||
annotationManager.setDocument(m_document, m_optionalContentActivity);
|
||||
annotationManager.setDocument(modifiedDocument);
|
||||
|
||||
// Render page to image
|
||||
PDFRasterizer* rasterizer = acquire();
|
||||
|
Reference in New Issue
Block a user