![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include "public/fpdf_text.h"
#include <algorithm>
#include <limits>
#include <memory>
#include <vector>
#include "build/build_config.h"
#include "core/fpdfapi/font/cpdf_font.h"
#include "core/fpdfapi/page/cpdf_page.h"
#include "core/fpdfapi/page/cpdf_textobject.h"
#include "core/fpdfdoc/cpdf_viewerpreferences.h"
#include "core/fpdftext/cpdf_linkextract.h"
#include "core/fpdftext/cpdf_textpage.h"
#include "core/fpdftext/cpdf_textpagefind.h"
#include "core/fxcrt/check_op.h"
#include "core/fxcrt/compiler_specific.h"
#include "core/fxcrt/fx_memcpy_wrappers.h"
#include "core/fxcrt/numerics/safe_conversions.h"
#include "core/fxcrt/span.h"
#include "core/fxcrt/span_util.h"
#include "core/fxcrt/stl_util.h"
#include "fpdfsdk/cpdfsdk_helpers.h"
Go to the source code of this file.
FPDF_EXPORT void FPDF_CALLCONV FPDFLink_CloseWebLinks | ( | FPDF_PAGELINK | link_page | ) |
Definition at line 569 of file fpdf_text.cpp.
References CPDFLinkExtractFromFPDFPageLink().
Referenced by CheckPDFiumCApi(), FPDFPageLinkDeleter::operator()(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
FPDF_EXPORT int FPDF_CALLCONV FPDFLink_CountRects | ( | FPDF_PAGELINK | link_page, |
int | link_index ) |
Definition at line 520 of file fpdf_text.cpp.
References CPDFLinkExtractFromFPDFPageLink().
Referenced by CheckPDFiumCApi(), and TEST_F().
FPDF_EXPORT int FPDF_CALLCONV FPDFLink_CountWebLinks | ( | FPDF_PAGELINK | link_page | ) |
Definition at line 487 of file fpdf_text.cpp.
References CPDFLinkExtractFromFPDFPageLink().
Referenced by CheckPDFiumCApi(), TEST_F(), and TEST_F().
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFLink_GetRect | ( | FPDF_PAGELINK | link_page, |
int | link_index, | ||
int | rect_index, | ||
double * | left, | ||
double * | top, | ||
double * | right, | ||
double * | bottom ) |
Definition at line 529 of file fpdf_text.cpp.
References CPDFLinkExtractFromFPDFPageLink().
Referenced by CheckPDFiumCApi(), and TEST_F().
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFLink_GetTextRange | ( | FPDF_PAGELINK | link_page, |
int | link_index, | ||
int * | start_char_index, | ||
int * | char_count ) |
Definition at line 552 of file fpdf_text.cpp.
References CPDFLinkExtractFromFPDFPageLink().
Referenced by CheckPDFiumCApi(), and TEST_F().
FPDF_EXPORT int FPDF_CALLCONV FPDFLink_GetURL | ( | FPDF_PAGELINK | link_page, |
int | link_index, | ||
unsigned short * | buffer, | ||
int | buflen ) |
Definition at line 495 of file fpdf_text.cpp.
References fxcrt::WideString::WideString(), CPDFLinkExtractFromFPDFPageLink(), and fxcrt::WideString::ToUTF16LE().
Referenced by CheckPDFiumCApi(), TEST_F(), TEST_F(), and TEST_F().
FPDF_EXPORT FPDF_PAGELINK FPDF_CALLCONV FPDFLink_LoadWebLinks | ( | FPDF_TEXTPAGE | text_page | ) |
Definition at line 475 of file fpdf_text.cpp.
References CPDFTextPageFromFPDFTextPage().
Referenced by CheckPDFiumCApi(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
FPDF_EXPORT void FPDF_CALLCONV FPDFText_ClosePage | ( | FPDF_TEXTPAGE | text_page | ) |
Definition at line 56 of file fpdf_text.cpp.
References CPDFTextPageFromFPDFTextPage().
Referenced by CheckPDFiumCApi(), FPDFTextPageDeleter::operator()(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
FPDF_EXPORT int FPDF_CALLCONV FPDFText_CountChars | ( | FPDF_TEXTPAGE | text_page | ) |
Definition at line 62 of file fpdf_text.cpp.
References CPDF_TextPage::CountChars(), and CPDFTextPageFromFPDFTextPage().
Referenced by CheckPDFiumCApi(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and WriteText().
FPDF_EXPORT int FPDF_CALLCONV FPDFText_CountRects | ( | FPDF_TEXTPAGE | text_page, |
int | start, | ||
int | count ) |
Definition at line 350 of file fpdf_text.cpp.
References CPDF_TextPage::CountRects(), and CPDFTextPageFromFPDFTextPage().
Referenced by CheckPDFiumCApi(), TEST_F(), and TEST_F().
FPDF_EXPORT void FPDF_CALLCONV FPDFText_FindClose | ( | FPDF_SCHHANDLE | handle | ) |
Definition at line 464 of file fpdf_text.cpp.
References CPDFTextPageFindFromFPDFSchHandle().
Referenced by CheckPDFiumCApi(), and FPDFTextFindDeleter::operator()().
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFText_FindNext | ( | FPDF_SCHHANDLE | handle | ) |
Definition at line 431 of file fpdf_text.cpp.
References CPDFTextPageFindFromFPDFSchHandle(), and CPDF_TextPageFind::FindNext().
Referenced by CheckPDFiumCApi().
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFText_FindPrev | ( | FPDF_SCHHANDLE | handle | ) |
Definition at line 439 of file fpdf_text.cpp.
References CPDFTextPageFindFromFPDFSchHandle(), and CPDF_TextPageFind::FindPrev().
Referenced by CheckPDFiumCApi().
FPDF_EXPORT FPDF_SCHHANDLE FPDF_CALLCONV FPDFText_FindStart | ( | FPDF_TEXTPAGE | text_page, |
FPDF_WIDESTRING | findwhat, | ||
unsigned long | flags, | ||
int | start_index ) |
Definition at line 409 of file fpdf_text.cpp.
References CPDF_TextPageFind::Options::bConsecutive, CPDF_TextPageFind::Options::bMatchCase, CPDF_TextPageFind::Options::bMatchWholeWord, and CPDFTextPageFromFPDFTextPage().
Referenced by CheckPDFiumCApi().
FPDF_EXPORT int FPDF_CALLCONV FPDFText_GetBoundedText | ( | FPDF_TEXTPAGE | text_page, |
double | left, | ||
double | top, | ||
double | right, | ||
double | bottom, | ||
unsigned short * | buffer, | ||
int | buflen ) |
Definition at line 377 of file fpdf_text.cpp.
References CFX_FloatRect::CFX_FloatRect(), CPDFTextPageFromFPDFTextPage(), CPDF_TextPage::GetTextByRect(), and fxcrt::WideString::ToUTF16LE().
Referenced by CheckPDFiumCApi(), and TEST_F().
FPDF_EXPORT float FPDF_CALLCONV FPDFText_GetCharAngle | ( | FPDF_TEXTPAGE | text_page, |
int | index ) |
Definition at line 216 of file fpdf_text.cpp.
References CFX_Matrix::a, CFX_Matrix::c, and CPDF_TextPage::CharInfo::m_Matrix.
Referenced by CheckPDFiumCApi(), and TEST_F().
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFText_GetCharBox | ( | FPDF_TEXTPAGE | text_page, |
int | index, | ||
double * | left, | ||
double * | right, | ||
double * | bottom, | ||
double * | top ) |
Definition at line 236 of file fpdf_text.cpp.
References CFX_FloatRect::bottom, CFX_FloatRect::left, CPDF_TextPage::CharInfo::m_CharBox, CFX_FloatRect::right, and CFX_FloatRect::top.
Referenced by CheckPDFiumCApi(), and TEST_F().
FPDF_EXPORT int FPDF_CALLCONV FPDFText_GetCharIndexAtPos | ( | FPDF_TEXTPAGE | text_page, |
double | x, | ||
double | y, | ||
double | xTolerance, | ||
double | yTolerance ) |
Definition at line 301 of file fpdf_text.cpp.
References CPDFTextPageFromFPDFTextPage(), and CPDF_TextPage::GetIndexAtPos().
Referenced by CheckPDFiumCApi(), and TEST_F().
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFText_GetCharOrigin | ( | FPDF_TEXTPAGE | text_page, |
int | index, | ||
double * | x, | ||
double * | y ) |
Definition at line 286 of file fpdf_text.cpp.
Referenced by CheckPDFiumCApi(), TEST_F(), and TEST_F().
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFText_GetFillColor | ( | FPDF_TEXTPAGE | text_page, |
int | index, | ||
unsigned int * | R, | ||
unsigned int * | G, | ||
unsigned int * | B, | ||
unsigned int * | A ) |
Definition at line 168 of file fpdf_text.cpp.
References FXSYS_GetBValue(), FXSYS_GetGValue(), and FXSYS_GetRValue().
Referenced by CheckPDFiumCApi(), and TEST_F().
FPDF_EXPORT unsigned long FPDF_CALLCONV FPDFText_GetFontInfo | ( | FPDF_TEXTPAGE | text_page, |
int | index, | ||
void * | buffer, | ||
unsigned long | buflen, | ||
int * | flags ) |
Definition at line 129 of file fpdf_text.cpp.
Referenced by CheckPDFiumCApi(), and TEST_F().
FPDF_EXPORT double FPDF_CALLCONV FPDFText_GetFontSize | ( | FPDF_TEXTPAGE | text_page, |
int | index ) |
Definition at line 119 of file fpdf_text.cpp.
Referenced by CheckPDFiumCApi(), TEST_F(), TEST_F(), and TEST_F().
FPDF_EXPORT int FPDF_CALLCONV FPDFText_GetFontWeight | ( | FPDF_TEXTPAGE | text_page, |
int | index ) |
Definition at line 154 of file fpdf_text.cpp.
Referenced by CheckPDFiumCApi(), and TEST_F().
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFText_GetLooseCharBox | ( | FPDF_TEXTPAGE | text_page, |
int | index, | ||
FS_RECTF * | rect ) |
Definition at line 258 of file fpdf_text.cpp.
Referenced by CheckPDFiumCApi(), TEST_F(), and TEST_F().
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFText_GetMatrix | ( | FPDF_TEXTPAGE | text_page, |
int | index, | ||
FS_MATRIX * | matrix ) |
Definition at line 270 of file fpdf_text.cpp.
References FSMatrixFromCFXMatrix(), and CPDF_TextPage::CharInfo::m_Matrix.
Referenced by CheckPDFiumCApi(), and TEST_F().
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFText_GetRect | ( | FPDF_TEXTPAGE | text_page, |
int | rect_index, | ||
double * | left, | ||
double * | top, | ||
double * | right, | ||
double * | bottom ) |
Definition at line 357 of file fpdf_text.cpp.
References CFX_FloatRect::bottom, CPDFTextPageFromFPDFTextPage(), CPDF_TextPage::GetRect(), CFX_FloatRect::left, CFX_FloatRect::right, and CFX_FloatRect::top.
Referenced by CheckPDFiumCApi(), and TEST_F().
FPDF_EXPORT int FPDF_CALLCONV FPDFText_GetSchCount | ( | FPDF_SCHHANDLE | handle | ) |
Definition at line 456 of file fpdf_text.cpp.
References CPDFTextPageFindFromFPDFSchHandle(), and CPDF_TextPageFind::GetMatchedCount().
Referenced by CheckPDFiumCApi().
FPDF_EXPORT int FPDF_CALLCONV FPDFText_GetSchResultIndex | ( | FPDF_SCHHANDLE | handle | ) |
Definition at line 448 of file fpdf_text.cpp.
References CPDFTextPageFindFromFPDFSchHandle(), and CPDF_TextPageFind::GetCurOrder().
Referenced by CheckPDFiumCApi().
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFText_GetStrokeColor | ( | FPDF_TEXTPAGE | text_page, |
int | index, | ||
unsigned int * | R, | ||
unsigned int * | G, | ||
unsigned int * | B, | ||
unsigned int * | A ) |
Definition at line 192 of file fpdf_text.cpp.
References FXSYS_GetBValue(), FXSYS_GetGValue(), and FXSYS_GetRValue().
Referenced by CheckPDFiumCApi(), and TEST_F().
FPDF_EXPORT int FPDF_CALLCONV FPDFText_GetText | ( | FPDF_TEXTPAGE | page, |
int | start_index, | ||
int | char_count, | ||
unsigned short * | result ) |
Definition at line 316 of file fpdf_text.cpp.
References CPDF_TextPage::CountChars(), CPDFTextPageFromFPDFTextPage(), CPDF_TextPage::GetPageText(), and fxcrt::WideString::ToUCS2LE().
Referenced by CheckPDFiumCApi(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV FPDFText_GetTextObject | ( | FPDF_TEXTPAGE | text_page, |
int | index ) |
Definition at line 78 of file fpdf_text.cpp.
Referenced by CheckPDFiumCApi(), and TEST_F().
FPDF_EXPORT unsigned int FPDF_CALLCONV FPDFText_GetUnicode | ( | FPDF_TEXTPAGE | text_page, |
int | index ) |
Definition at line 68 of file fpdf_text.cpp.
References CPDF_TextPage::CharInfo::m_Unicode.
Referenced by CheckPDFiumCApi(), TEST_F(), TEST_F(), and WriteText().
FPDF_EXPORT int FPDF_CALLCONV FPDFText_HasUnicodeMapError | ( | FPDF_TEXTPAGE | text_page, |
int | index ) |
Definition at line 110 of file fpdf_text.cpp.
References CPDF_TextPage::kNotUnicode, and CPDF_TextPage::CharInfo::m_CharType.
Referenced by CheckPDFiumCApi(), and TEST_F().
FPDF_EXPORT int FPDF_CALLCONV FPDFText_IsGenerated | ( | FPDF_TEXTPAGE | text_page, |
int | index ) |
Definition at line 88 of file fpdf_text.cpp.
References CPDF_TextPage::kGenerated, and CPDF_TextPage::CharInfo::m_CharType.
Referenced by CheckPDFiumCApi(), and TEST_F().
FPDF_EXPORT int FPDF_CALLCONV FPDFText_IsHyphen | ( | FPDF_TEXTPAGE | text_page, |
int | index ) |
Definition at line 98 of file fpdf_text.cpp.
References CPDF_TextPage::kHyphen, and CPDF_TextPage::CharInfo::m_CharType.
Referenced by CheckPDFiumCApi(), and TEST_F().
FPDF_EXPORT FPDF_TEXTPAGE FPDF_CALLCONV FPDFText_LoadPage | ( | FPDF_PAGE | page | ) |
Definition at line 43 of file fpdf_text.cpp.
References CPDF_ViewerPreferences::CPDF_ViewerPreferences(), CPDFPageFromFPDFPage(), CPDF_Page::GetDocument(), and CPDF_ViewerPreferences::IsDirectionR2L().
Referenced by CheckPDFiumCApi(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().