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
CPDF_Document Class Reference

#include <cpdf_document.h>

+ Inheritance diagram for CPDF_Document:
+ Collaboration diagram for CPDF_Document:

Classes

class  Extension
 
class  LinkListIface
 
class  PageDataIface
 
class  RenderDataIface
 

Public Member Functions

 CPDF_Document (std::unique_ptr< RenderDataIface > pRenderData, std::unique_ptr< PageDataIface > pPageData)
 
 ~CPDF_Document () override
 
ExtensionGetExtension () const
 
void SetExtension (std::unique_ptr< Extension > pExt)
 
CPDF_ParserGetParser () const
 
const CPDF_DictionaryGetRoot () const
 
RetainPtr< CPDF_DictionaryGetMutableRoot ()
 
RetainPtr< CPDF_DictionaryGetInfo ()
 
RetainPtr< const CPDF_ArrayGetFileIdentifier () const
 
void DeletePage (int iPage)
 
bool MovePages (pdfium::span< const int > page_indices, int dest_page_index)
 
int GetPageCount () const
 
bool IsPageLoaded (int iPage) const
 
RetainPtr< const CPDF_DictionaryGetPageDictionary (int iPage)
 
RetainPtr< CPDF_DictionaryGetMutablePageDictionary (int iPage)
 
int GetPageIndex (uint32_t objnum)
 
uint32_t GetUserPermissions (bool get_owner_perms) const
 
RetainPtr< CPDF_StreamAccGetFontFileStreamAcc (RetainPtr< const CPDF_Stream > pFontStream)
 
void MaybePurgeFontFileStreamAcc (RetainPtr< CPDF_StreamAcc > &&pStreamAcc)
 
void MaybePurgeImage (uint32_t objnum)
 
PageDataIfaceGetPageData () const
 
RenderDataIfaceGetRenderData () const
 
void SetPageObjNum (int iPage, uint32_t objNum)
 
JBig2_DocumentContextGetOrCreateCodecContext ()
 
LinkListIfaceGetLinksContext () const
 
void SetLinksContext (std::unique_ptr< LinkListIface > pContext)
 
RetainPtr< CPDF_StreamCreateModifiedAPStream ()
 
bool IsModifiedAPStream (const CPDF_Stream *stream) const
 
bool TryInit () override
 
RetainPtr< CPDF_ObjectParseIndirectObject (uint32_t objnum) override
 
CPDF_Parser::Error LoadDoc (RetainPtr< IFX_SeekableReadStream > pFileAccess, const ByteString &password)
 
CPDF_Parser::Error LoadLinearizedDoc (RetainPtr< CPDF_ReadValidator > validator, const ByteString &password)
 
bool has_valid_cross_reference_table () const
 
void LoadPages ()
 
void CreateNewDoc ()
 
RetainPtr< CPDF_DictionaryCreateNewPage (int iPage)
 
void IncrementParsedPageCount ()
 
uint32_t GetParsedPageCountForTesting ()
 
- Public Member Functions inherited from fxcrt::Observable
 Observable ()
 
 Observable (const Observable &that)=delete
 
Observableoperator= (const Observable &that)=delete
 
 ~Observable ()
 
void AddObserver (ObserverIface *pObserver)
 
void RemoveObserver (ObserverIface *pObserver)
 
void NotifyObservers ()
 
- Public Member Functions inherited from CPDF_Parser::ParsedObjectsHolder
- Public Member Functions inherited from CPDF_IndirectObjectHolder
 CPDF_IndirectObjectHolder ()
 
virtual ~CPDF_IndirectObjectHolder ()
 
RetainPtr< CPDF_ObjectGetOrParseIndirectObject (uint32_t objnum)
 
RetainPtr< const CPDF_ObjectGetIndirectObject (uint32_t objnum) const
 
RetainPtr< CPDF_ObjectGetMutableIndirectObject (uint32_t objnum)
 
void DeleteIndirectObject (uint32_t objnum)
 
template<typename T , typename... Args>
RetainPtr< T > NewIndirect (Args &&... args)
 
template<typename T , typename... Args>
std::enable_if< CanInternStrings< T >::value, RetainPtr< T > >::type New (Args &&... args)
 
template<typename T , typename... Args>
std::enable_if<!CanInternStrings< T >::value, RetainPtr< T > >::type New (Args &&... args)
 
uint32_t AddIndirectObject (RetainPtr< CPDF_Object > pObj)
 
bool ReplaceIndirectObjectIfHigherGeneration (uint32_t objnum, RetainPtr< CPDF_Object > pObj)
 
uint32_t GetLastObjNum () const
 
void SetLastObjNum (uint32_t objnum)
 
WeakPtr< ByteStringPoolGetByteStringPool () const
 
const_iterator begin () const
 
const_iterator end () const
 

Static Public Member Functions

static bool IsValidPageObject (const CPDF_Object *obj)
 

Static Public Attributes

static constexpr int kPageMaxNum = 0xFFFFF
 

Protected Member Functions

void SetParser (std::unique_ptr< CPDF_Parser > pParser)
 
void SetRootForTesting (RetainPtr< CPDF_Dictionary > root)
 
void ResizePageListForTesting (size_t size)
 
- Protected Member Functions inherited from fxcrt::Observable
size_t ActiveObserversForTesting () const
 
- Protected Member Functions inherited from CPDF_IndirectObjectHolder

Additional Inherited Members

- Public Types inherited from CPDF_IndirectObjectHolder
using const_iterator
 

Detailed Description

Definition at line 28 of file cpdf_document.h.

Constructor & Destructor Documentation

◆ CPDF_Document()

CPDF_Document::CPDF_Document ( std::unique_ptr< RenderDataIface > pRenderData,
std::unique_ptr< PageDataIface > pPageData )

Definition at line 168 of file cpdf_document.cpp.

References CPDF_Document().

Referenced by CPDF_Document().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~CPDF_Document()

CPDF_Document::~CPDF_Document ( )
override

Definition at line 177 of file cpdf_document.cpp.

Member Function Documentation

◆ CreateModifiedAPStream()

RetainPtr< CPDF_Stream > CPDF_Document::CreateModifiedAPStream ( )

Definition at line 386 of file cpdf_document.cpp.

◆ CreateNewDoc()

void CPDF_Document::CreateNewDoc ( )

Definition at line 461 of file cpdf_document.cpp.

◆ CreateNewPage()

RetainPtr< CPDF_Dictionary > CPDF_Document::CreateNewPage ( int iPage)

Definition at line 475 of file cpdf_document.cpp.

References CPDF_IndirectObjectHolder::DeleteIndirectObject().

+ Here is the call graph for this function:

◆ DeletePage()

void CPDF_Document::DeletePage ( int iPage)

Definition at line 589 of file cpdf_document.cpp.

Referenced by FPDFPage_Delete().

+ Here is the caller graph for this function:

◆ GetExtension()

Extension * CPDF_Document::GetExtension ( ) const
inline

Definition at line 91 of file cpdf_document.h.

Referenced by FPDF_GetPageCount(), FPDFPage_Delete(), MovePages(), ReportUnsupportedXFA(), and TEST_F().

+ Here is the caller graph for this function:

◆ GetFileIdentifier()

RetainPtr< const CPDF_Array > CPDF_Document::GetFileIdentifier ( ) const

Definition at line 585 of file cpdf_document.cpp.

◆ GetFontFileStreamAcc()

RetainPtr< CPDF_StreamAcc > CPDF_Document::GetFontFileStreamAcc ( RetainPtr< const CPDF_Stream > pFontStream)

Definition at line 445 of file cpdf_document.cpp.

◆ GetInfo()

RetainPtr< CPDF_Dictionary > CPDF_Document::GetInfo ( )

Definition at line 569 of file cpdf_document.cpp.

◆ GetLinksContext()

LinkListIface * CPDF_Document::GetLinksContext ( ) const
inline

Definition at line 127 of file cpdf_document.h.

◆ GetMutablePageDictionary()

RetainPtr< CPDF_Dictionary > CPDF_Document::GetMutablePageDictionary ( int iPage)

Definition at line 371 of file cpdf_document.cpp.

◆ GetMutableRoot()

RetainPtr< CPDF_Dictionary > CPDF_Document::GetMutableRoot ( )
inline

Definition at line 98 of file cpdf_document.h.

◆ GetOrCreateCodecContext()

JBig2_DocumentContext * CPDF_Document::GetOrCreateCodecContext ( )

Definition at line 380 of file cpdf_document.cpp.

◆ GetPageCount()

int CPDF_Document::GetPageCount ( ) const

Definition at line 425 of file cpdf_document.cpp.

Referenced by FPDF_GetPageCount(), FPDFPage_New(), TEST_F(), and TryInit().

+ Here is the caller graph for this function:

◆ GetPageData()

PageDataIface * CPDF_Document::GetPageData ( ) const
inline

Definition at line 121 of file cpdf_document.h.

Referenced by CPDF_DocPageData::FromDocument().

+ Here is the caller graph for this function:

◆ GetPageDictionary()

RetainPtr< const CPDF_Dictionary > CPDF_Document::GetPageDictionary ( int iPage)

Definition at line 345 of file cpdf_document.cpp.

Referenced by TEST_F().

+ Here is the caller graph for this function:

◆ GetPageIndex()

int CPDF_Document::GetPageIndex ( uint32_t objnum)

Definition at line 396 of file cpdf_document.cpp.

Referenced by CPDF_Dest::GetDestPageIndex(), and CPDFSDK_InteractiveForm::GetWidget().

+ Here is the caller graph for this function:

◆ GetParsedPageCountForTesting()

uint32_t CPDF_Document::GetParsedPageCountForTesting ( )
inline

Definition at line 155 of file cpdf_document.h.

Referenced by TEST_F(), TEST_F(), and TEST_F().

+ Here is the caller graph for this function:

◆ GetParser()

CPDF_Parser * CPDF_Document::GetParser ( ) const
inline

Definition at line 96 of file cpdf_document.h.

Referenced by FPDF_GetFileVersion(), FPDF_GetSecurityHandlerRevision(), FPDF_GetTrailerEnds(), FPDFAvail_GetFirstPageNum(), and CPDFSecurityHandlerEmbedderTest::RemoveTrailerIdFromDocument().

+ Here is the caller graph for this function:

◆ GetRenderData()

RenderDataIface * CPDF_Document::GetRenderData ( ) const
inline

Definition at line 122 of file cpdf_document.h.

Referenced by CPDF_DocRenderData::FromDocument().

+ Here is the caller graph for this function:

◆ GetRoot()

const CPDF_Dictionary * CPDF_Document::GetRoot ( ) const
inline

Definition at line 97 of file cpdf_document.h.

Referenced by FORM_DoDocumentAAction(), FPDF_CountNamedDests(), FPDF_GetFormType(), FPDF_GetNamedDest(), FPDFCatalog_IsTagged(), FPDFDoc_GetPageMode(), ReportUnsupportedFeatures(), and TryInit().

+ Here is the caller graph for this function:

◆ GetUserPermissions()

uint32_t CPDF_Document::GetUserPermissions ( bool get_owner_perms) const

Definition at line 441 of file cpdf_document.cpp.

Referenced by FPDF_GetDocPermissions(), and FPDF_GetDocUserPermissions().

+ Here is the caller graph for this function:

◆ has_valid_cross_reference_table()

bool CPDF_Document::has_valid_cross_reference_table ( ) const
inline

Definition at line 146 of file cpdf_document.h.

Referenced by FPDF_DocumentHasValidCrossReferenceTable().

+ Here is the caller graph for this function:

◆ IncrementParsedPageCount()

void CPDF_Document::IncrementParsedPageCount ( )
inline

Definition at line 154 of file cpdf_document.h.

◆ IsModifiedAPStream()

bool CPDF_Document::IsModifiedAPStream ( const CPDF_Stream * stream) const

Definition at line 392 of file cpdf_document.cpp.

◆ IsPageLoaded()

bool CPDF_Document::IsPageLoaded ( int iPage) const

Definition at line 341 of file cpdf_document.cpp.

Referenced by TEST_F().

+ Here is the caller graph for this function:

◆ IsValidPageObject()

bool CPDF_Document::IsValidPageObject ( const CPDF_Object * obj)
static

Definition at line 186 of file cpdf_document.cpp.

References ToDictionary().

Referenced by LoadPages(), and TEST_F().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadDoc()

CPDF_Parser::Error CPDF_Document::LoadDoc ( RetainPtr< IFX_SeekableReadStream > pFileAccess,
const ByteString & password )

Definition at line 207 of file cpdf_document.cpp.

◆ LoadLinearizedDoc()

CPDF_Parser::Error CPDF_Document::LoadLinearizedDoc ( RetainPtr< CPDF_ReadValidator > validator,
const ByteString & password )

Definition at line 217 of file cpdf_document.cpp.

◆ LoadPages()

void CPDF_Document::LoadPages ( )

Definition at line 227 of file cpdf_document.cpp.

References CPDF_LinearizedHeader::GetFirstPageNo(), CPDF_LinearizedHeader::GetFirstPageObjNum(), CPDF_IndirectObjectHolder::GetOrParseIndirectObject(), CPDF_LinearizedHeader::GetPageCount(), and IsValidPageObject().

Referenced by TEST_F(), and TryInit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MaybePurgeFontFileStreamAcc()

void CPDF_Document::MaybePurgeFontFileStreamAcc ( RetainPtr< CPDF_StreamAcc > && pStreamAcc)

Definition at line 450 of file cpdf_document.cpp.

◆ MaybePurgeImage()

void CPDF_Document::MaybePurgeImage ( uint32_t objnum)

Definition at line 456 of file cpdf_document.cpp.

◆ MovePages()

bool CPDF_Document::MovePages ( pdfium::span< const int > page_indices,
int dest_page_index )

Definition at line 609 of file cpdf_document.cpp.

References CPDF_Document::Extension::ContainsExtensionForm(), GetExtension(), and CPDF_Dictionary::GetIntegerFor().

Referenced by FPDF_MovePages().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseIndirectObject()

RetainPtr< CPDF_Object > CPDF_Document::ParseIndirectObject ( uint32_t objnum)
overridevirtual

Reimplemented from CPDF_IndirectObjectHolder.

Definition at line 191 of file cpdf_document.cpp.

◆ ResizePageListForTesting()

void CPDF_Document::ResizePageListForTesting ( size_t size)
protected

Definition at line 685 of file cpdf_document.cpp.

◆ SetExtension()

void CPDF_Document::SetExtension ( std::unique_ptr< Extension > pExt)
inline

Definition at line 92 of file cpdf_document.h.

◆ SetLinksContext()

void CPDF_Document::SetLinksContext ( std::unique_ptr< LinkListIface > pContext)
inline

Definition at line 128 of file cpdf_document.h.

◆ SetPageObjNum()

void CPDF_Document::SetPageObjNum ( int iPage,
uint32_t objNum )

Definition at line 376 of file cpdf_document.cpp.

Referenced by TEST_F().

+ Here is the caller graph for this function:

◆ SetParser()

void CPDF_Document::SetParser ( std::unique_ptr< CPDF_Parser > pParser)
protected

Definition at line 320 of file cpdf_document.cpp.

◆ SetRootForTesting()

void CPDF_Document::SetRootForTesting ( RetainPtr< CPDF_Dictionary > root)
protected

Definition at line 605 of file cpdf_document.cpp.

Referenced by CPDF_TestDocument::SetRoot().

+ Here is the caller graph for this function:

◆ TryInit()

bool CPDF_Document::TryInit ( )
overridevirtual

Implements CPDF_Parser::ParsedObjectsHolder.

Definition at line 195 of file cpdf_document.cpp.

References GetPageCount(), GetRoot(), and LoadPages().

+ Here is the call graph for this function:

Member Data Documentation

◆ kPageMaxNum

int CPDF_Document::kPageMaxNum = 0xFFFFF
staticconstexpr

Definition at line 83 of file cpdf_document.h.

Referenced by CPDF_HintTables::ReadPageHintTable().


The documentation for this class was generated from the following files: