Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cfdf_document.h
Go to the documentation of this file.
1// Copyright 2016 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#ifndef CORE_FPDFAPI_PARSER_CFDF_DOCUMENT_H_
8#define CORE_FPDFAPI_PARSER_CFDF_DOCUMENT_H_
9
10#include <memory>
11
12#include "core/fpdfapi/parser/cpdf_indirect_object_holder.h"
13#include "core/fxcrt/retain_ptr.h"
14#include "third_party/base/containers/span.h"
15
16class CPDF_Dictionary;
18
19class CFDF_Document final : public CPDF_IndirectObjectHolder {
20 public:
23 pdfium::span<const uint8_t> span);
24
26 ~CFDF_Document() override;
27
28 ByteString WriteToString() const;
29 const CPDF_Dictionary* GetRoot() const { return m_pRootDict.Get(); }
30 RetainPtr<CPDF_Dictionary> GetMutableRoot() const { return m_pRootDict; }
31
32 private:
33 void ParseStream(RetainPtr<IFX_SeekableReadStream> pFile);
34
35 RetainPtr<CPDF_Dictionary> m_pRootDict;
37};
38
39#endif // CORE_FPDFAPI_PARSER_CFDF_DOCUMENT_H_
static std::unique_ptr< CFDF_Document > CreateNewDoc()
const CPDF_Dictionary * GetRoot() const
static std::unique_ptr< CFDF_Document > ParseMemory(pdfium::span< const uint8_t > span)
RetainPtr< CPDF_Dictionary > GetMutableRoot() const
~CFDF_Document() override
ByteString WriteToString() const
bool ReplaceIndirectObjectIfHigherGeneration(uint32_t objnum, RetainPtr< CPDF_Object > pObj)