Add SetEditType

This commit is contained in:
Svetlana Kulikova
2025-08-28 13:45:56 +03:00
parent 6c3f0e88cb
commit 03809c0a1c
3 changed files with 17 additions and 2 deletions

View File

@ -115,9 +115,16 @@ bool CPdfFile::EditPdf(const std::wstring& wsDstFile)
m_pInternal->pWriter = new CPdfWriter(m_pInternal->pAppFonts, false, this, true, 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, CPdfEditor::Mode::WriteNew);
m_pInternal->pEditor = new CPdfEditor(m_pInternal->wsSrcFile, m_pInternal->wsPassword, wsDstFile, m_pInternal->pReader, m_pInternal->pWriter);
return m_pInternal->pEditor->GetError() == 0;
}
void CPdfFile::SetEditType(int nType)
{
if (!m_pInternal->pEditor)
return;
if (nType == 1)
m_pInternal->pEditor->SetMode(CPdfEditor::Mode::WriteNew);
}
bool CPdfFile::EditPage(int nPageIndex)
{
if (!m_pInternal->pEditor)