Create ChangePassword for pdf

This commit is contained in:
Svetlana Kulikova
2023-12-26 17:31:19 +03:00
parent 96929ac63a
commit 59fcd227ea
10 changed files with 243 additions and 13 deletions

View File

@ -94,7 +94,7 @@ static const long c_BrushTypeRadialGradient = 8002;
// CPdfRenderer
//
//----------------------------------------------------------------------------------------
CPdfWriter::CPdfWriter(NSFonts::IApplicationFonts* pAppFonts, bool isPDFA, IRenderer* pRenderer) : m_oCommandManager(this)
CPdfWriter::CPdfWriter(NSFonts::IApplicationFonts* pAppFonts, bool isPDFA, IRenderer* pRenderer, bool bCreate) : m_oCommandManager(this)
{
// Создаем менеджер шрифтов с собственным кэшем
m_pFontManager = pAppFonts->GenerateFontManager();
@ -108,7 +108,7 @@ CPdfWriter::CPdfWriter(NSFonts::IApplicationFonts* pAppFonts, bool isPDFA, IRend
if (isPDFA)
m_pDocument->SetPDFAConformanceMode(true);
if (!m_pDocument || !m_pDocument->CreateNew())
if (!m_pDocument || (bCreate && !m_pDocument->CreateNew()))
{
SetError();
return;