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
fpdf_doc.cpp File Reference

(813d9ae984a99e739b99cf694a9d5b24d0a6b7a7)

#include "public/fpdf_doc.h"
#include <memory>
#include <set>
#include <utility>
#include "constants/form_fields.h"
#include "core/fpdfapi/page/cpdf_annotcontext.h"
#include "core/fpdfapi/page/cpdf_page.h"
#include "core/fpdfapi/parser/cpdf_array.h"
#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfapi/parser/cpdf_number.h"
#include "core/fpdfapi/parser/cpdf_string.h"
#include "core/fpdfapi/parser/fpdf_parser_decode.h"
#include "core/fpdfdoc/cpdf_aaction.h"
#include "core/fpdfdoc/cpdf_bookmark.h"
#include "core/fpdfdoc/cpdf_bookmarktree.h"
#include "core/fpdfdoc/cpdf_dest.h"
#include "core/fpdfdoc/cpdf_linklist.h"
#include "core/fpdfdoc/cpdf_pagelabel.h"
#include "fpdfsdk/cpdfsdk_helpers.h"
#include "public/fpdf_formfill.h"
#include "third_party/base/check.h"
#include "third_party/base/containers/contains.h"
#include "third_party/base/numerics/safe_conversions.h"
+ Include dependency graph for fpdf_doc.cpp:

Go to the source code of this file.

Functions

FPDF_EXPORT FPDF_BOOKMARK FPDF_CALLCONV FPDFBookmark_GetFirstChild (FPDF_DOCUMENT document, FPDF_BOOKMARK bookmark)
 
FPDF_EXPORT FPDF_BOOKMARK FPDF_CALLCONV FPDFBookmark_GetNextSibling (FPDF_DOCUMENT document, FPDF_BOOKMARK bookmark)
 
FPDF_EXPORT unsigned long FPDF_CALLCONV FPDFBookmark_GetTitle (FPDF_BOOKMARK bookmark, void *buffer, unsigned long buflen)
 
FPDF_EXPORT int FPDF_CALLCONV FPDFBookmark_GetCount (FPDF_BOOKMARK bookmark)
 
FPDF_EXPORT FPDF_BOOKMARK FPDF_CALLCONV FPDFBookmark_Find (FPDF_DOCUMENT document, FPDF_WIDESTRING title)
 
FPDF_EXPORT FPDF_DEST FPDF_CALLCONV FPDFBookmark_GetDest (FPDF_DOCUMENT document, FPDF_BOOKMARK bookmark)
 
FPDF_EXPORT FPDF_ACTION FPDF_CALLCONV FPDFBookmark_GetAction (FPDF_BOOKMARK bookmark)
 
FPDF_EXPORT unsigned long FPDF_CALLCONV FPDFAction_GetType (FPDF_ACTION action)
 
FPDF_EXPORT FPDF_DEST FPDF_CALLCONV FPDFAction_GetDest (FPDF_DOCUMENT document, FPDF_ACTION action)
 
FPDF_EXPORT unsigned long FPDF_CALLCONV FPDFAction_GetFilePath (FPDF_ACTION action, void *buffer, unsigned long buflen)
 
FPDF_EXPORT unsigned long FPDF_CALLCONV FPDFAction_GetURIPath (FPDF_DOCUMENT document, FPDF_ACTION action, void *buffer, unsigned long buflen)
 
FPDF_EXPORT int FPDF_CALLCONV FPDFDest_GetDestPageIndex (FPDF_DOCUMENT document, FPDF_DEST dest)
 
FPDF_EXPORT unsigned long FPDF_CALLCONV FPDFDest_GetView (FPDF_DEST dest, unsigned long *pNumParams, FS_FLOAT *pParams)
 
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFDest_GetLocationInPage (FPDF_DEST dest, FPDF_BOOL *hasXVal, FPDF_BOOL *hasYVal, FPDF_BOOL *hasZoomVal, FS_FLOAT *x, FS_FLOAT *y, FS_FLOAT *zoom)
 
FPDF_EXPORT FPDF_LINK FPDF_CALLCONV FPDFLink_GetLinkAtPoint (FPDF_PAGE page, double x, double y)
 
FPDF_EXPORT int FPDF_CALLCONV FPDFLink_GetLinkZOrderAtPoint (FPDF_PAGE page, double x, double y)
 
FPDF_EXPORT FPDF_DEST FPDF_CALLCONV FPDFLink_GetDest (FPDF_DOCUMENT document, FPDF_LINK link)
 
FPDF_EXPORT FPDF_ACTION FPDF_CALLCONV FPDFLink_GetAction (FPDF_LINK link)
 
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFLink_Enumerate (FPDF_PAGE page, int *start_pos, FPDF_LINK *link_annot)
 
FPDF_EXPORT FPDF_ANNOTATION FPDF_CALLCONV FPDFLink_GetAnnot (FPDF_PAGE page, FPDF_LINK link_annot)
 
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFLink_GetAnnotRect (FPDF_LINK link_annot, FS_RECTF *rect)
 
FPDF_EXPORT int FPDF_CALLCONV FPDFLink_CountQuadPoints (FPDF_LINK link_annot)
 
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFLink_GetQuadPoints (FPDF_LINK link_annot, int quad_index, FS_QUADPOINTSF *quad_points)
 
FPDF_EXPORT FPDF_ACTION FPDF_CALLCONV FPDF_GetPageAAction (FPDF_PAGE page, int aa_type)
 
FPDF_EXPORT unsigned long FPDF_CALLCONV FPDF_GetFileIdentifier (FPDF_DOCUMENT document, FPDF_FILEIDTYPE id_type, void *buffer, unsigned long buflen)
 
FPDF_EXPORT unsigned long FPDF_CALLCONV FPDF_GetMetaText (FPDF_DOCUMENT document, FPDF_BYTESTRING tag, void *buffer, unsigned long buflen)
 
FPDF_EXPORT unsigned long FPDF_CALLCONV FPDF_GetPageLabel (FPDF_DOCUMENT document, int page_index, void *buffer, unsigned long buflen)
 

Function Documentation

◆ FPDF_GetFileIdentifier()

FPDF_EXPORT unsigned long FPDF_CALLCONV FPDF_GetFileIdentifier ( FPDF_DOCUMENT document,
FPDF_FILEIDTYPE id_type,
void * buffer,
unsigned long buflen )

Definition at line 461 of file fpdf_doc.cpp.

References CPDFDocumentFromFPDFDocument().

Referenced by CheckPDFiumCApi().

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

◆ FPDF_GetMetaText()

FPDF_EXPORT unsigned long FPDF_CALLCONV FPDF_GetMetaText ( FPDF_DOCUMENT document,
FPDF_BYTESTRING tag,
void * buffer,
unsigned long buflen )

Definition at line 487 of file fpdf_doc.cpp.

References CPDFDocumentFromFPDFDocument(), and Utf16EncodeMaybeCopyAndReturnLength().

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

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

◆ FPDF_GetPageAAction()

FPDF_EXPORT FPDF_ACTION FPDF_CALLCONV FPDF_GetPageAAction ( FPDF_PAGE page,
int aa_type )

Definition at line 438 of file fpdf_doc.cpp.

References CPDF_AAction::ActionExist(), CPDFPageFromFPDFPage(), FPDFActionFromCPDFDictionary(), CPDF_AAction::GetAction(), CPDF_Action::GetDict(), pdfium::form_fields::kAA, CPDF_AAction::kClosePage, and CPDF_AAction::kOpenPage.

Referenced by CheckPDFiumCApi(), and TEST_F().

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

◆ FPDF_GetPageLabel()

FPDF_EXPORT unsigned long FPDF_CALLCONV FPDF_GetPageLabel ( FPDF_DOCUMENT document,
int page_index,
void * buffer,
unsigned long buflen )

Definition at line 506 of file fpdf_doc.cpp.

References CPDF_PageLabel::CPDF_PageLabel(), and CPDFDocumentFromFPDFDocument().

Referenced by CheckPDFiumCApi().

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

◆ FPDFAction_GetDest()

FPDF_EXPORT FPDF_DEST FPDF_CALLCONV FPDFAction_GetDest ( FPDF_DOCUMENT document,
FPDF_ACTION action )

Definition at line 194 of file fpdf_doc.cpp.

References CPDFDictionaryFromFPDFAction(), CPDFDocumentFromFPDFDocument(), FPDFAction_GetType(), FPDFDestFromCPDFArray(), CPDF_Dest::GetArray(), and CPDF_Action::GetDest().

Referenced by CheckPDFiumCApi(), and TEST_F().

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

◆ FPDFAction_GetFilePath()

FPDF_EXPORT unsigned long FPDF_CALLCONV FPDFAction_GetFilePath ( FPDF_ACTION action,
void * buffer,
unsigned long buflen )

Definition at line 210 of file fpdf_doc.cpp.

References CPDFDictionaryFromFPDFAction(), FPDFAction_GetType(), CPDF_Action::GetFilePath(), NulTerminateMaybeCopyAndReturnLength(), and fxcrt::WideString::ToUTF8().

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

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

◆ FPDFAction_GetType()

FPDF_EXPORT unsigned long FPDF_CALLCONV FPDFAction_GetType ( FPDF_ACTION action)

Definition at line 173 of file fpdf_doc.cpp.

References CPDFDictionaryFromFPDFAction(), CPDF_Action::GetType(), CPDF_Action::kGoTo, CPDF_Action::kGoToE, CPDF_Action::kGoToR, CPDF_Action::kLaunch, and CPDF_Action::kURI.

Referenced by CheckPDFiumCApi(), FPDFAction_GetDest(), FPDFAction_GetFilePath(), FPDFAction_GetURIPath(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

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

◆ FPDFAction_GetURIPath()

FPDF_EXPORT unsigned long FPDF_CALLCONV FPDFAction_GetURIPath ( FPDF_DOCUMENT document,
FPDF_ACTION action,
void * buffer,
unsigned long buflen )

Definition at line 223 of file fpdf_doc.cpp.

References fxcrt::ByteString::c_str(), CPDFDictionaryFromFPDFAction(), CPDFDocumentFromFPDFDocument(), FPDFAction_GetType(), and CPDF_Action::GetURI().

Referenced by CheckPDFiumCApi(), and TEST_F().

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

◆ FPDFBookmark_Find()

FPDF_EXPORT FPDF_BOOKMARK FPDF_CALLCONV FPDFBookmark_Find ( FPDF_DOCUMENT document,
FPDF_WIDESTRING title )

Definition at line 126 of file fpdf_doc.cpp.

References CPDF_BookmarkTree::CPDF_BookmarkTree(), CPDFDocumentFromFPDFDocument(), fxcrt::WideString::IsEmpty(), and WideStringFromFPDFWideString().

Referenced by CheckPDFiumCApi(), and TEST_F().

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

◆ FPDFBookmark_GetAction()

FPDF_EXPORT FPDF_ACTION FPDF_CALLCONV FPDFBookmark_GetAction ( FPDF_BOOKMARK bookmark)

Definition at line 164 of file fpdf_doc.cpp.

References CPDFDictionaryFromFPDFBookmark(), FPDFActionFromCPDFDictionary(), CPDF_Bookmark::GetAction(), and CPDF_Action::GetDict().

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

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

◆ FPDFBookmark_GetCount()

FPDF_EXPORT int FPDF_CALLCONV FPDFBookmark_GetCount ( FPDF_BOOKMARK bookmark)

Definition at line 117 of file fpdf_doc.cpp.

References CPDFDictionaryFromFPDFBookmark(), and CPDF_Bookmark::GetCount().

Referenced by CheckPDFiumCApi(), and TEST_F().

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

◆ FPDFBookmark_GetDest()

FPDF_EXPORT FPDF_DEST FPDF_CALLCONV FPDFBookmark_GetDest ( FPDF_DOCUMENT document,
FPDF_BOOKMARK bookmark )

Definition at line 142 of file fpdf_doc.cpp.

References CPDFDictionaryFromFPDFBookmark(), CPDFDocumentFromFPDFDocument(), FPDFDestFromCPDFArray(), CPDF_Bookmark::GetAction(), CPDF_Dest::GetArray(), CPDF_Action::GetDest(), CPDF_Bookmark::GetDest(), and CPDF_Action::HasDict().

Referenced by CheckPDFiumCApi(), and TEST_F().

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

◆ FPDFBookmark_GetFirstChild()

FPDF_EXPORT FPDF_BOOKMARK FPDF_CALLCONV FPDFBookmark_GetFirstChild ( FPDF_DOCUMENT document,
FPDF_BOOKMARK bookmark )

Definition at line 78 of file fpdf_doc.cpp.

References CPDF_BookmarkTree::CPDF_BookmarkTree(), CPDFDictionaryFromFPDFBookmark(), CPDFDocumentFromFPDFDocument(), FPDFBookmarkFromCPDFDictionary(), CPDF_Bookmark::GetDict(), and CPDF_BookmarkTree::GetFirstChild().

Referenced by CheckPDFiumCApi(), and TEST_F().

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

◆ FPDFBookmark_GetNextSibling()

FPDF_EXPORT FPDF_BOOKMARK FPDF_CALLCONV FPDFBookmark_GetNextSibling ( FPDF_DOCUMENT document,
FPDF_BOOKMARK bookmark )

Definition at line 90 of file fpdf_doc.cpp.

References CPDF_BookmarkTree::CPDF_BookmarkTree(), CPDFDictionaryFromFPDFBookmark(), CPDFDocumentFromFPDFDocument(), FPDFBookmarkFromCPDFDictionary(), CPDF_Bookmark::GetDict(), and CPDF_BookmarkTree::GetNextSibling().

Referenced by CheckPDFiumCApi(), and TEST_F().

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

◆ FPDFBookmark_GetTitle()

FPDF_EXPORT unsigned long FPDF_CALLCONV FPDFBookmark_GetTitle ( FPDF_BOOKMARK bookmark,
void * buffer,
unsigned long buflen )

Definition at line 106 of file fpdf_doc.cpp.

References CPDFDictionaryFromFPDFBookmark(), CPDF_Bookmark::GetTitle(), and Utf16EncodeMaybeCopyAndReturnLength().

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

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

◆ FPDFDest_GetDestPageIndex()

FPDF_EXPORT int FPDF_CALLCONV FPDFDest_GetDestPageIndex ( FPDF_DOCUMENT document,
FPDF_DEST dest )

Definition at line 245 of file fpdf_doc.cpp.

References CPDFArrayFromFPDFDest(), CPDFDocumentFromFPDFDocument(), and CPDF_Dest::GetDestPageIndex().

Referenced by CheckPDFiumCApi(), and TEST_F().

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

◆ FPDFDest_GetLocationInPage()

FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFDest_GetLocationInPage ( FPDF_DEST dest,
FPDF_BOOL * hasXVal,
FPDF_BOOL * hasYVal,
FPDF_BOOL * hasZoomVal,
FS_FLOAT * x,
FS_FLOAT * y,
FS_FLOAT * zoom )

Definition at line 276 of file fpdf_doc.cpp.

References CPDFArrayFromFPDFDest(), and CPDF_Dest::GetXYZ().

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

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

◆ FPDFDest_GetView()

FPDF_EXPORT unsigned long FPDF_CALLCONV FPDFDest_GetView ( FPDF_DEST dest,
unsigned long * pNumParams,
FS_FLOAT * pParams )

Definition at line 259 of file fpdf_doc.cpp.

References CPDFArrayFromFPDFDest(), and CPDF_Dest::GetZoomMode().

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

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

◆ FPDFLink_CountQuadPoints()

FPDF_EXPORT int FPDF_CALLCONV FPDFLink_CountQuadPoints ( FPDF_LINK link_annot)

Definition at line 412 of file fpdf_doc.cpp.

Referenced by CheckPDFiumCApi(), and TEST_F().

+ Here is the caller graph for this function:

◆ FPDFLink_Enumerate()

FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFLink_Enumerate ( FPDF_PAGE page,
int * start_pos,
FPDF_LINK * link_annot )

Definition at line 363 of file fpdf_doc.cpp.

References CPDFPageFromFPDFPage().

Referenced by CheckPDFiumCApi(), and TEST_F().

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

◆ FPDFLink_GetAction()

FPDF_EXPORT FPDF_ACTION FPDF_CALLCONV FPDFLink_GetAction ( FPDF_LINK link)

Definition at line 355 of file fpdf_doc.cpp.

References CPDFDictionaryFromFPDFLink(), FPDFActionFromCPDFDictionary(), CPDF_Link::GetAction(), and CPDF_Action::GetDict().

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

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

◆ FPDFLink_GetAnnot()

FPDF_EXPORT FPDF_ANNOTATION FPDF_CALLCONV FPDFLink_GetAnnot ( FPDF_PAGE page,
FPDF_LINK link_annot )

Definition at line 389 of file fpdf_doc.cpp.

References CPDFPageFromFPDFPage(), and IPDFPageFromFPDFPage().

Referenced by CheckPDFiumCApi(), and TEST_F().

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

◆ FPDFLink_GetAnnotRect()

FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFLink_GetAnnotRect ( FPDF_LINK link_annot,
FS_RECTF * rect )

Definition at line 402 of file fpdf_doc.cpp.

References CPDFDictionaryFromFPDFLink(), FSRectFFromCFXFloatRect(), and CPDF_Dictionary::GetRectFor().

Referenced by CheckPDFiumCApi(), and TEST_F().

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

◆ FPDFLink_GetDest()

FPDF_EXPORT FPDF_DEST FPDF_CALLCONV FPDFLink_GetDest ( FPDF_DOCUMENT document,
FPDF_LINK link )

Definition at line 337 of file fpdf_doc.cpp.

References CPDFDictionaryFromFPDFLink(), CPDFDocumentFromFPDFDocument(), FPDFDestFromCPDFArray(), CPDF_Link::GetAction(), CPDF_Dest::GetArray(), CPDF_Action::GetDest(), CPDF_Link::GetDest(), and CPDF_Action::HasDict().

Referenced by CheckPDFiumCApi(), and TEST_F().

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

◆ FPDFLink_GetLinkAtPoint()

FPDF_EXPORT FPDF_LINK FPDF_CALLCONV FPDFLink_GetLinkAtPoint ( FPDF_PAGE page,
double x,
double y )

Definition at line 301 of file fpdf_doc.cpp.

References CPDFPageFromFPDFPage(), and CPDF_LinkList::GetLinkAtPoint().

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

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

◆ FPDFLink_GetLinkZOrderAtPoint()

FPDF_EXPORT int FPDF_CALLCONV FPDFLink_GetLinkZOrderAtPoint ( FPDF_PAGE page,
double x,
double y )

Definition at line 319 of file fpdf_doc.cpp.

References CPDFPageFromFPDFPage(), and CPDF_LinkList::GetLinkAtPoint().

Referenced by CheckPDFiumCApi(), and TEST_F().

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

◆ FPDFLink_GetQuadPoints()

FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFLink_GetQuadPoints ( FPDF_LINK link_annot,
int quad_index,
FS_QUADPOINTSF * quad_points )

Definition at line 419 of file fpdf_doc.cpp.

References CPDFDictionaryFromFPDFLink().

Referenced by CheckPDFiumCApi(), and TEST_F().

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