diff options
Diffstat (limited to 'core/fpdfapi/parser/cpdf_parser.cpp')
-rw-r--r-- | core/fpdfapi/parser/cpdf_parser.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/fpdfapi/parser/cpdf_parser.cpp b/core/fpdfapi/parser/cpdf_parser.cpp index 6cdd6ab789..599b04199d 100644 --- a/core/fpdfapi/parser/cpdf_parser.cpp +++ b/core/fpdfapi/parser/cpdf_parser.cpp @@ -1287,6 +1287,11 @@ uint32_t CPDF_Parser::GetFirstPageNo() const { return m_pLinearized ? m_pLinearized->GetFirstPageNo() : 0; } +void CPDF_Parser::SetLinearizedHeader( + std::unique_ptr<CPDF_LinearizedHeader> pLinearized) { + m_pLinearized = std::move(pLinearized); +} + std::unique_ptr<CPDF_Dictionary> CPDF_Parser::LoadTrailerV4() { if (m_pSyntax->GetKeyword() != "trailer") return nullptr; @@ -1354,7 +1359,7 @@ CPDF_Parser::Error CPDF_Parser::StartLinearizedParse( if (eRet != SUCCESS) return eRet; - m_pDocument->LoadLinearizedDoc(m_pLinearized.get()); + m_pDocument->LoadDoc(); if (!m_pDocument->GetRoot() || m_pDocument->GetPageCount() == 0) { if (bXRefRebuilt) return FORMAT_ERROR; @@ -1367,7 +1372,7 @@ CPDF_Parser::Error CPDF_Parser::StartLinearizedParse( if (eRet != SUCCESS) return eRet; - m_pDocument->LoadLinearizedDoc(m_pLinearized.get()); + m_pDocument->LoadDoc(); if (!m_pDocument->GetRoot()) return FORMAT_ERROR; } |