diff options
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp index 11370075d6..b90c784f6f 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp @@ -4181,7 +4181,7 @@ FX_BOOL CPDF_DataAvail::HaveResourceAncestor(CPDF_Dictionary *pDict) if (!pParentDict) { return FALSE; } - CPDF_Object *pRet = pParentDict->GetElement("Resource"); + CPDF_Object *pRet = pParentDict->GetElement("Resources"); if (pRet) { m_pPageResource = pRet; return TRUE; @@ -4287,11 +4287,12 @@ FX_BOOL CPDF_DataAvail::IsPageAvail(FX_INT32 iPage, IFX_DownloadHints* pHints) } } if (m_pPageDict && !m_bNeedDownLoadResource) { - CPDF_Object *pRes = m_pPageDict->GetElement("Resource"); - if (!pRes) { + m_pPageResource = m_pPageDict->GetElement("Resources"); + if (!m_pPageResource) { m_bNeedDownLoadResource = HaveResourceAncestor(m_pPageDict); + } else { + m_bNeedDownLoadResource = TRUE; } - m_bNeedDownLoadResource = FALSE; } if (m_bNeedDownLoadResource) { FX_BOOL bRet = CheckResources(pHints); |