89 std::unique_ptr<CPDF_Document::RenderDataIface> pRenderData,
90 std::unique_ptr<CPDF_Document::PageDataIface> pPageData,
91 const ByteString& password);
94 return m_pHintTables.get();
98 enum class InternalStatus : uint8_t {
116 enum class Type { kUnknown = 0, kPage, kPages, kArray };
121 Type m_type = Type::kUnknown;
122 uint32_t m_dwPageNo = 0;
123 std::vector<std::unique_ptr<PageNode>> m_ChildNodes;
126 static constexpr int kMaxPageRecursionDepth = 1024;
128 bool CheckDocStatus();
130 bool CheckFirstPage();
131 bool CheckHintTables();
138 bool CheckPageStatus();
147 bool PreparePageItem();
149 bool CheckAndLoadAllXref();
153 bool CheckPage(uint32_t dwPage);
155 bool LoadDocPage(uint32_t dwPage);
156 bool CheckPageNode(
const PageNode& pageNode,
160 bool CheckUnknownPageNode(uint32_t dwPageNo, PageNode* pPageNode);
161 bool CheckArrayPageNode(uint32_t dwPageNo, PageNode* pPageNode);
162 bool CheckPageCount();
163 bool IsFirstCheck(uint32_t dwPage);
164 void ResetFirstCheck(uint32_t dwPage);
165 bool ValidatePage(uint32_t dwPage)
const;
171 std::unique_ptr<CPDF_LinearizedHeader> m_pLinearized;
172 bool m_bDocAvail =
false;
173 InternalStatus m_internalStatus = InternalStatus::kHeader;
174 std::unique_ptr<CPDF_CrossRefAvail> m_pCrossRefAvail;
177 std::vector<uint32_t> m_PageObjList;
178 std::set<uint32_t> m_SeenPageObjList;
179 uint32_t m_PagesObjNum = 0;
180 bool m_bLinearedDataOK =
false;
181 bool m_bMainXRefLoadTried =
false;
182 bool m_bMainXRefLoadedOK =
false;
183 bool m_bPagesTreeLoad =
false;
184 bool m_bPagesLoad =
false;
185 std::unique_ptr<CPDF_PageObjectAvail> m_pFormAvail;
186 std::vector<RetainPtr<CPDF_Object>> m_PagesArray;
187 bool m_bTotalLoadPageTree =
false;
188 bool m_bCurPageDictLoadOK =
false;
189 bool m_bHeaderAvail =
false;
191 std::set<uint32_t> m_pageMapCheckState;
192 std::set<uint32_t> m_pagesLoadState;
193 std::unique_ptr<CPDF_HintTables> m_pHintTables;
194 std::map<uint32_t, std::unique_ptr<CPDF_PageObjectAvail>> m_PagesObjAvail;
195 std::map<RetainPtr<
const CPDF_Object>,
196 std::unique_ptr<CPDF_PageObjectAvail>,
198 m_PagesResourcesAvail;
std::pair< CPDF_Parser::Error, std::unique_ptr< CPDF_Document > > ParseDocument(std::unique_ptr< CPDF_Document::RenderDataIface > pRenderData, std::unique_ptr< CPDF_Document::PageDataIface > pPageData, const ByteString &password)