mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-19 05:57:25 +08:00
Fix bug 74727
This commit is contained in:
@ -361,6 +361,12 @@ bool CPdfReader::IsNeedCMap()
|
||||
void CPdfReader::SetCMapMemory(BYTE* pData, DWORD nSizeData)
|
||||
{
|
||||
((GlobalParamsAdaptor*)globalParams)->SetCMapMemory(pData, nSizeData);
|
||||
|
||||
if (m_vPDFContext.empty())
|
||||
return;
|
||||
CPdfReaderContext* pPDFContext = m_vPDFContext.back();
|
||||
std::map<std::wstring, std::wstring> mFonts = PdfReader::CAnnotFonts::GetAllFonts(pPDFContext->m_pDocument, m_pFontManager, pPDFContext->m_pFontList);
|
||||
m_mFonts.insert(mFonts.begin(), mFonts.end());
|
||||
}
|
||||
void CPdfReader::SetCMapFolder(const std::wstring& sFolder)
|
||||
{
|
||||
@ -616,8 +622,11 @@ bool CPdfReader::MergePages(BYTE* pData, DWORD nLength, const std::wstring& wsPa
|
||||
return false;
|
||||
}
|
||||
|
||||
std::map<std::wstring, std::wstring> mFonts = PdfReader::CAnnotFonts::GetAllFonts(pDoc, m_pFontManager, pContext->m_pFontList);
|
||||
m_mFonts.insert(mFonts.begin(), mFonts.end());
|
||||
if (!IsNeedCMap())
|
||||
{
|
||||
std::map<std::wstring, std::wstring> mFonts = PdfReader::CAnnotFonts::GetAllFonts(pDoc, m_pFontManager, pContext->m_pFontList);
|
||||
m_mFonts.insert(mFonts.begin(), mFonts.end());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -652,8 +661,11 @@ bool CPdfReader::MergePages(const std::wstring& wsFile, const std::wstring& wsPa
|
||||
return false;
|
||||
}
|
||||
|
||||
std::map<std::wstring, std::wstring> mFonts = PdfReader::CAnnotFonts::GetAllFonts(pDoc, m_pFontManager, pContext->m_pFontList);
|
||||
m_mFonts.insert(mFonts.begin(), mFonts.end());
|
||||
if (!IsNeedCMap())
|
||||
{
|
||||
std::map<std::wstring, std::wstring> mFonts = PdfReader::CAnnotFonts::GetAllFonts(pDoc, m_pFontManager, pContext->m_pFontList);
|
||||
m_mFonts.insert(mFonts.begin(), mFonts.end());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user