Merge remote-tracking branch 'origin/feature/pdf-redact' into develop

This commit is contained in:
Svetlana Kulikova
2026-05-25 17:45:08 +03:00
19 changed files with 584 additions and 267 deletions

View File

@ -143,7 +143,7 @@ bool CPdfFile::EditPdf(const std::wstring& wsDstFile)
m_pInternal->pReader->CleanUp();
RELEASEOBJECT(m_pInternal->pWriter);
m_pInternal->pWriter = new CPdfWriter(m_pInternal->pAppFonts, false, this, true, m_pInternal->wsTempFolder);
m_pInternal->pWriter = new CPdfWriter(m_pInternal->pAppFonts, false, this, false, m_pInternal->wsTempFolder);
RELEASEOBJECT(m_pInternal->pEditor);
m_pInternal->pEditor = new CPdfEditor(m_pInternal->wsSrcFile, m_pInternal->wsPassword, wsDstFile, m_pInternal->pReader, m_pInternal->pWriter);
@ -162,6 +162,12 @@ void CPdfFile::SetEditType(int nType)
if (nType == 1)
m_pInternal->pEditor->SetMode(CPdfEditor::Mode::WriteNew);
}
void CPdfFile::RedactInfo(int nFlag, const std::vector<IAdvancedCommand*>& arrForms)
{
if (!m_pInternal->pEditor)
return;
m_pInternal->pEditor->RedactInfo(nFlag, arrForms);
}
bool CPdfFile::EditPage(int nPageIndex)
{
if (!m_pInternal->pEditor)
@ -1398,7 +1404,7 @@ HRESULT CPdfFile::IsSupportAdvancedCommand(const IAdvancedCommand::AdvancedComma
case IAdvancedCommand::AdvancedCommandType::Link:
case IAdvancedCommand::AdvancedCommandType::DocInfo:
case IAdvancedCommand::AdvancedCommandType::FormField:
case IAdvancedCommand::AdvancedCommandType::Annotaion:
case IAdvancedCommand::AdvancedCommandType::Annotation:
case IAdvancedCommand::AdvancedCommandType::DeleteAnnot:
case IAdvancedCommand::AdvancedCommandType::WidgetsInfo:
case IAdvancedCommand::AdvancedCommandType::ShapeStart:
@ -1446,7 +1452,7 @@ HRESULT CPdfFile::AdvancedCommand(IAdvancedCommand* command)
{
return m_pInternal->pWriter->AddFormField(m_pInternal->pAppFonts, (CFormFieldInfo*)command, m_pInternal->wsTempFolder);
}
case IAdvancedCommand::AdvancedCommandType::Annotaion:
case IAdvancedCommand::AdvancedCommandType::Annotation:
{
CAnnotFieldInfo* pCommand = (CAnnotFieldInfo*)command;
if (m_pInternal->pEditor && m_pInternal->pEditor->IsEditPage())