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 <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/stl_util.h"
#include "fpdfsdk/cpdfsdk_helpers.h"
#include "third_party/base/check_op.h"
#include "third_party/base/numerics/safe_conversions.h"
Go to the source code of this file.
FPDF_EXPORT void FPDF_CALLCONV FPDFLink_CloseWebLinks | ( | FPDF_PAGELINK | link_page | ) |
Definition at line 563 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 513 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 482 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 522 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 545 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 490 of file fpdf_text.cpp.
References fxcrt::WideString::WideString(), fxcrt::ByteString::c_str(), 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 470 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 53 of file fpdf_text.cpp.
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(), TEST_F(), and TEST_F().
FPDF_EXPORT int FPDF_CALLCONV FPDFText_CountChars | ( | FPDF_TEXTPAGE | text_page | ) |
Definition at line 59 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(), TEST_F(), and WriteText().
FPDF_EXPORT int FPDF_CALLCONV FPDFText_CountRects | ( | FPDF_TEXTPAGE | text_page, |
int | start, | ||
int | count ) |
Definition at line 352 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 459 of file fpdf_text.cpp.
Referenced by CheckPDFiumCApi(), and FPDFTextFindDeleter::operator()().
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFText_FindNext | ( | FPDF_SCHHANDLE | handle | ) |
Definition at line 426 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 434 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 406 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 379 of file fpdf_text.cpp.
References CFX_FloatRect::CFX_FloatRect(), fxcrt::ByteString::c_str(), 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 217 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 237 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 302 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 287 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 169 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 115 of file fpdf_text.cpp.
References fxcrt::ByteString::c_str().
Referenced by CheckPDFiumCApi(), and TEST_F().
FPDF_EXPORT double FPDF_CALLCONV FPDFText_GetFontSize | ( | FPDF_TEXTPAGE | text_page, |
int | index ) |
Definition at line 105 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 141 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 259 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 271 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 359 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 451 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 443 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 193 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 317 of file fpdf_text.cpp.
References fxcrt::ByteString::c_str(), CPDF_TextPage::CountChars(), CPDFTextPageFromFPDFTextPage(), CPDF_TextPage::GetPageText(), and fxcrt::WideString::ToUTF16LE().
Referenced by CheckPDFiumCApi(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
FPDF_EXPORT FPDF_TEXT_RENDERMODE FPDF_CALLCONV FPDFText_GetTextRenderMode | ( | FPDF_TEXTPAGE | text_page, |
int | index ) |
Definition at line 155 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 65 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 96 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 74 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 84 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 40 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(), and TEST_F().