Aspose::Pdf::Text::TextSearchOptions Class Referencefinal

Represents text search options More...

#include "TextSearchOptions.h"

Inherits Aspose::Pdf::Text::TextOptions.

Public Member Functions

ASPOSE_PDF_SHARED_API bool get_IsRegularExpressionUsed () const
 Gets indication that regular expression is used. More...
 
ASPOSE_PDF_SHARED_API void set_IsRegularExpressionUsed (bool value)
 Sets indication that regular expression is used. More...
 
ASPOSE_PDF_SHARED_API bool get_LimitToPageBounds () const
 Gets indication that text is searched within the page bounds. More...
 
ASPOSE_PDF_SHARED_API void set_LimitToPageBounds (bool value)
 Sets indication that text is searched within the page bounds. More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< Aspose::Pdf::Rectangleget_Rectangle () const
 Gets rectangle that bounds the searched text. More...
 
ASPOSE_PDF_SHARED_API void set_Rectangle (System::SharedPtr< Aspose::Pdf::Rectangle > value)
 Sets rectangle that bounds the searched text. More...
 
ASPOSE_PDF_SHARED_API bool get_UseFontEngineEncoding () const
 Gets indication that text will be searched using font engine encoding. true - means that font engine encoding will be used (try this if text search fails because of imperfect encoding in the document) false - means that document font encoding will be used (default value) More...
 
ASPOSE_PDF_SHARED_API void set_UseFontEngineEncoding (bool value)
 Sets indication that text will be searched using font engine encoding. true - means that font engine encoding will be used (try this if text search fails because of imperfect encoding in the document) false - means that document font encoding will be used (default value) More...
 
ASPOSE_PDF_SHARED_API bool get_IgnoreShadowText () const
 Gets indication that text fragments representing shadow of normal text will be ignored during search. true - means that shadow text will not be found (try this if text search returns duplicated fragments on the close positions) false - means that shadow text will be found as well as normal text (default value) More...
 
ASPOSE_PDF_SHARED_API void set_IgnoreShadowText (bool value)
 Sets indication that text fragments representing shadow of normal text will be ignored during search. true - means that shadow text will not be found (try this if text search returns duplicated fragments on the close positions) false - means that shadow text will be found as well as normal text (default value) More...
 
ASPOSE_PDF_SHARED_API bool get_LogTextExtractionErrors () const
 Gets indication that text extraction (decoding) errors will be logged in the text (fragment) absorber. true - means that text extraction (decoding) errors will be loged. It may decrease performance. false (default) - no error loging. More...
 
ASPOSE_PDF_SHARED_API void set_LogTextExtractionErrors (bool value)
 Sets indication that text extraction (decoding) errors will be logged in the text (fragment) absorber. true - means that text extraction (decoding) errors will be loged. It may decrease performance. false (default) - no error loging. More...
 
ASPOSE_PDF_SHARED_API bool get_IgnoreResourceFontErrors () const
 Gets indication that errors related to absence of font will be ignored by text (fragment) absorber. true - means that errors of absence of font will be ignored. Text segments that refer to incorrect resources will be skipped during processing. false (default) - absence of font error will terminate processing by throwing exception. More...
 
ASPOSE_PDF_SHARED_API void set_IgnoreResourceFontErrors (bool value)
 Sets indication that errors related to absence of font will be ignored by text (fragment) absorber. true - means that errors of absence of font will be ignored. Text segments that refer to incorrect resources will be skipped during processing. false (default) - absence of font error will terminate processing by throwing exception. More...
 
ASPOSE_PDF_SHARED_API bool get_SearchForTextRelatedGraphics () const
 Gets value that permits searching for text related graphics (underlining, background etc.) during text search. true - searching for text related graphics will be performed (default value). false - graphic elements that may present in source document will be ignored. Set this in case of performance issues or no need to handle underlining, background, or clipping. More...
 
ASPOSE_PDF_SHARED_API void set_SearchForTextRelatedGraphics (bool value)
 Sets value that permits searching for text related graphics (underlining, background etc.) during text search. true - searching for text related graphics will be performed (default value). false - graphic elements that may present in source document will be ignored. Set this in case of performance issues or no need to handle underlining, background, or clipping. More...
 
ASPOSE_PDF_SHARED_API int32_t get_StoredGraphicElementsMaxCount () const
 Gets value that limits searching for text related graphics (underlining, background etc.) on a page for the speciefied number of elements. The default is 250. Set lesser value in the case of performance problems, try larger value in the case some graphic elements wasn't found. More...
 
ASPOSE_PDF_SHARED_API void set_StoredGraphicElementsMaxCount (int32_t value)
 Sets value that limits searching for text related graphics (underlining, background etc.) on a page for the speciefied number of elements. The default is 250. Set lesser value in the case of performance problems, try larger value in the case some graphic elements wasn't found. More...
 
ASPOSE_PDF_SHARED_API bool get_SearchInAnnotations () const
 Gets value that permits searching for text in Annotations. true - text will be searched in Annotations. false - text in Annotations won't be parsed by TextFragmentAbsorber. More...
 
ASPOSE_PDF_SHARED_API void set_SearchInAnnotations (bool value)
 Sets value that permits searching for text in Annotations. true - text will be searched in Annotations. false - text in Annotations won't be parsed by TextFragmentAbsorber. More...
 
ASPOSE_PDF_SHARED_API TextSearchOptions (bool isRegularExpressionUsed)
 Initializes new instance of the TextSearchOptions object. Specifies regular expression usage mode. More...
 
ASPOSE_PDF_SHARED_API TextSearchOptions (System::SharedPtr< Aspose::Pdf::Rectangle > rectangle)
 Initializes new instance of the TextSearchOptions object. Specifies rectangle that delimits the searched text. More...
 
ASPOSE_PDF_SHARED_API TextSearchOptions (System::SharedPtr< Aspose::Pdf::Rectangle > rectangle, bool isRegularExpressionUsed)
 Initializes new instance of the TextSearchOptions object. Specifies rectangle that delimits the searched text and regular expression usage mode. More...
 
- Public Member Functions inherited from System::Object
ASPOSECPP_SHARED_API Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ASPOSECPP_SHARED_API ~Object ()
 Destroys object. Frees all internal data structures. More...
 
ASPOSECPP_SHARED_API Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared reference counter. More...
 
ASPOSECPP_SHARED_API void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
ASPOSECPP_SHARED_API void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual ASPOSECPP_SHARED_API bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual ASPOSECPP_SHARED_API int32_t GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual ASPOSECPP_SHARED_API String ToString () const
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ASPOSECPP_SHARED_API ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual ASPOSECPP_SHARED_API const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual ASPOSECPP_SHARED_API bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual ASPOSECPP_SHARED_API void SetTemplateWeakPtr (uint32_t argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
virtual ASPOSECPP_SHARED_API bool FastCast (const Details::FastRttiBase &helper, void **out_ptr) const
 For internal purposes only. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool Equals (double const &objA, double const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 Specialization of Object::ReferenceEquals for case of string and nullptr. More...
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 Specialization of Object::ReferenceEquals for case of strings. More...
 

Protected Member Functions

bool get_SearchForClippingPaths () const
 Gets value that permits searching for text related clipping paths (invisible text boxes) during text search. false - text clipping path elements will be kept intact (default value). true - searching for text clipping path will be performed. It may decrease performance of text search and edit. It also may change graphical elements that look like text related. More...
 
void set_SearchForClippingPaths (bool value)
 Sets value that permits searching for text related clipping paths (invisible text boxes) during text search. false - text clipping path elements will be kept intact (default value). true - searching for text clipping path will be performed. It may decrease performance of text search and edit. It also may change graphical elements that look like text related. More...
 
int32_t get_ClippingPathsProcessing () const
 
void set_ClippingPathsProcessing (int32_t value)
 
bool get_IsPerformance () const
 Gets indication that fast mode will be used during search. More...
 
void set_IsPerformance (bool value)
 Sets indication that fast mode will be used during search. More...
 

Static Protected Attributes

static const int32_t StoredGraphicElementsDefault
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Implements C# typeof(System.Object) construct. More...
 

Detailed Description

Represents text search options

Constructor & Destructor Documentation

◆ TextSearchOptions() [1/3]

ASPOSE_PDF_SHARED_API Aspose::Pdf::Text::TextSearchOptions::TextSearchOptions ( bool  isRegularExpressionUsed)

Initializes new instance of the TextSearchOptions object. Specifies regular expression usage mode.

Parameters
isRegularExpressionUsedValue that indicates that regularexpression is used.

◆ TextSearchOptions() [2/3]

ASPOSE_PDF_SHARED_API Aspose::Pdf::Text::TextSearchOptions::TextSearchOptions ( System::SharedPtr< Aspose::Pdf::Rectangle rectangle)

Initializes new instance of the TextSearchOptions object. Specifies rectangle that delimits the searched text.

Parameters
rectangleRectangle that includes the extracted text.

◆ TextSearchOptions() [3/3]

ASPOSE_PDF_SHARED_API Aspose::Pdf::Text::TextSearchOptions::TextSearchOptions ( System::SharedPtr< Aspose::Pdf::Rectangle rectangle,
bool  isRegularExpressionUsed 
)

Initializes new instance of the TextSearchOptions object. Specifies rectangle that delimits the searched text and regular expression usage mode.

Parameters
rectangleRectangle that includes the extracted text.
isRegularExpressionUsedValue that indicates that regularexpression is used.

Member Function Documentation

◆ get_ClippingPathsProcessing()

int32_t Aspose::Pdf::Text::TextSearchOptions::get_ClippingPathsProcessing ( ) const
protected

◆ get_IgnoreResourceFontErrors()

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Text::TextSearchOptions::get_IgnoreResourceFontErrors ( ) const

Gets indication that errors related to absence of font will be ignored by text (fragment) absorber. true - means that errors of absence of font will be ignored. Text segments that refer to incorrect resources will be skipped during processing. false (default) - absence of font error will terminate processing by throwing exception.

◆ get_IgnoreShadowText()

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Text::TextSearchOptions::get_IgnoreShadowText ( ) const

Gets indication that text fragments representing shadow of normal text will be ignored during search. true - means that shadow text will not be found (try this if text search returns duplicated fragments on the close positions) false - means that shadow text will be found as well as normal text (default value)

◆ get_IsPerformance()

bool Aspose::Pdf::Text::TextSearchOptions::get_IsPerformance ( ) const
protected

Gets indication that fast mode will be used during search.

◆ get_IsRegularExpressionUsed()

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Text::TextSearchOptions::get_IsRegularExpressionUsed ( ) const

Gets indication that regular expression is used.

◆ get_LimitToPageBounds()

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Text::TextSearchOptions::get_LimitToPageBounds ( ) const

Gets indication that text is searched within the page bounds.

◆ get_LogTextExtractionErrors()

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Text::TextSearchOptions::get_LogTextExtractionErrors ( ) const

Gets indication that text extraction (decoding) errors will be logged in the text (fragment) absorber. true - means that text extraction (decoding) errors will be loged. It may decrease performance. false (default) - no error loging.

◆ get_Rectangle()

ASPOSE_PDF_SHARED_API System::SharedPtr<Aspose::Pdf::Rectangle> Aspose::Pdf::Text::TextSearchOptions::get_Rectangle ( ) const

Gets rectangle that bounds the searched text.

The property may be used in case it is required to delimit text extraction or text replace region.

◆ get_SearchForClippingPaths()

bool Aspose::Pdf::Text::TextSearchOptions::get_SearchForClippingPaths ( ) const
protected

Gets value that permits searching for text related clipping paths (invisible text boxes) during text search. false - text clipping path elements will be kept intact (default value). true - searching for text clipping path will be performed. It may decrease performance of text search and edit. It also may change graphical elements that look like text related.

◆ get_SearchForTextRelatedGraphics()

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Text::TextSearchOptions::get_SearchForTextRelatedGraphics ( ) const

Gets value that permits searching for text related graphics (underlining, background etc.) during text search. true - searching for text related graphics will be performed (default value). false - graphic elements that may present in source document will be ignored. Set this in case of performance issues or no need to handle underlining, background, or clipping.

◆ get_SearchInAnnotations()

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Text::TextSearchOptions::get_SearchInAnnotations ( ) const

Gets value that permits searching for text in Annotations. true - text will be searched in Annotations. false - text in Annotations won't be parsed by TextFragmentAbsorber.

◆ get_StoredGraphicElementsMaxCount()

ASPOSE_PDF_SHARED_API int32_t Aspose::Pdf::Text::TextSearchOptions::get_StoredGraphicElementsMaxCount ( ) const

Gets value that limits searching for text related graphics (underlining, background etc.) on a page for the speciefied number of elements. The default is 250. Set lesser value in the case of performance problems, try larger value in the case some graphic elements wasn't found.

◆ get_UseFontEngineEncoding()

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Text::TextSearchOptions::get_UseFontEngineEncoding ( ) const

Gets indication that text will be searched using font engine encoding. true - means that font engine encoding will be used (try this if text search fails because of imperfect encoding in the document) false - means that document font encoding will be used (default value)

◆ set_ClippingPathsProcessing()

void Aspose::Pdf::Text::TextSearchOptions::set_ClippingPathsProcessing ( int32_t  value)
protected

◆ set_IgnoreResourceFontErrors()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Text::TextSearchOptions::set_IgnoreResourceFontErrors ( bool  value)

Sets indication that errors related to absence of font will be ignored by text (fragment) absorber. true - means that errors of absence of font will be ignored. Text segments that refer to incorrect resources will be skipped during processing. false (default) - absence of font error will terminate processing by throwing exception.

◆ set_IgnoreShadowText()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Text::TextSearchOptions::set_IgnoreShadowText ( bool  value)

Sets indication that text fragments representing shadow of normal text will be ignored during search. true - means that shadow text will not be found (try this if text search returns duplicated fragments on the close positions) false - means that shadow text will be found as well as normal text (default value)

◆ set_IsPerformance()

void Aspose::Pdf::Text::TextSearchOptions::set_IsPerformance ( bool  value)
protected

Sets indication that fast mode will be used during search.

◆ set_IsRegularExpressionUsed()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Text::TextSearchOptions::set_IsRegularExpressionUsed ( bool  value)

Sets indication that regular expression is used.

◆ set_LimitToPageBounds()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Text::TextSearchOptions::set_LimitToPageBounds ( bool  value)

Sets indication that text is searched within the page bounds.

◆ set_LogTextExtractionErrors()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Text::TextSearchOptions::set_LogTextExtractionErrors ( bool  value)

Sets indication that text extraction (decoding) errors will be logged in the text (fragment) absorber. true - means that text extraction (decoding) errors will be loged. It may decrease performance. false (default) - no error loging.

◆ set_Rectangle()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Text::TextSearchOptions::set_Rectangle ( System::SharedPtr< Aspose::Pdf::Rectangle value)

Sets rectangle that bounds the searched text.

The property may be used in case it is required to delimit text extraction or text replace region.

◆ set_SearchForClippingPaths()

void Aspose::Pdf::Text::TextSearchOptions::set_SearchForClippingPaths ( bool  value)
protected

Sets value that permits searching for text related clipping paths (invisible text boxes) during text search. false - text clipping path elements will be kept intact (default value). true - searching for text clipping path will be performed. It may decrease performance of text search and edit. It also may change graphical elements that look like text related.

◆ set_SearchForTextRelatedGraphics()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Text::TextSearchOptions::set_SearchForTextRelatedGraphics ( bool  value)

Sets value that permits searching for text related graphics (underlining, background etc.) during text search. true - searching for text related graphics will be performed (default value). false - graphic elements that may present in source document will be ignored. Set this in case of performance issues or no need to handle underlining, background, or clipping.

◆ set_SearchInAnnotations()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Text::TextSearchOptions::set_SearchInAnnotations ( bool  value)

Sets value that permits searching for text in Annotations. true - text will be searched in Annotations. false - text in Annotations won't be parsed by TextFragmentAbsorber.

◆ set_StoredGraphicElementsMaxCount()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Text::TextSearchOptions::set_StoredGraphicElementsMaxCount ( int32_t  value)

Sets value that limits searching for text related graphics (underlining, background etc.) on a page for the speciefied number of elements. The default is 250. Set lesser value in the case of performance problems, try larger value in the case some graphic elements wasn't found.

◆ set_UseFontEngineEncoding()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Text::TextSearchOptions::set_UseFontEngineEncoding ( bool  value)

Sets indication that text will be searched using font engine encoding. true - means that font engine encoding will be used (try this if text search fails because of imperfect encoding in the document) false - means that document font encoding will be used (default value)

Member Data Documentation

◆ StoredGraphicElementsDefault

const int32_t Aspose::Pdf::Text::TextSearchOptions::StoredGraphicElementsDefault
staticprotected