Represents segment of Pdf text. More...

#include "TextSegment.h"

Inherits System::Object.

Public Member Functions

ASPOSE_PDF_SHARED_API int32_t get_StartCharIndex () const
 Gets starting character index of current segment in the show text operator (Tj, TJ) segment. More...
 
ASPOSE_PDF_SHARED_API int32_t get_EndCharIndex () const
 Gets ending character index of current segment in the show text operator (Tj, TJ) segment. More...
 
ASPOSE_PDF_SHARED_API System::String get_Text () const
 Gets System::String text object that the TextSegment object represents. More...
 
ASPOSE_PDF_SHARED_API void set_Text (System::String value)
 Sets System::String text object that the TextSegment object represents. More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< Aspose::Pdf::Text::TextStateget_TextState () const
 Gets text state for the text that TextSegment object represents. More...
 
ASPOSE_PDF_SHARED_API void set_TextState (System::SharedPtr< Aspose::Pdf::Text::TextState > value)
 Sets text state for the text that TextSegment object represents. More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< Aspose::Pdf::Text::Positionget_Position () const
 Gets text position for text, represented with TextSegment object. More...
 
ASPOSE_PDF_SHARED_API void set_Position (System::SharedPtr< Aspose::Pdf::Text::Position > value)
 Gets text position for text, represented with TextSegment object. More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< Aspose::Pdf::Rectangleget_Rectangle ()
 Gets rectangle of the TextSegment More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< Aspose::Pdf::Text::Positionget_BaselinePosition () const
 Gets text position for text, represented with TextSegment object. The YIndent of the Position structure represents baseline coordinate of the text segment. More...
 
ASPOSE_PDF_SHARED_API void set_BaselinePosition (System::SharedPtr< Aspose::Pdf::Text::Position > value)
 Gets text position for text, represented with TextSegment object. The YIndent of the Position structure represents baseline coordinate of the text segment. More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< Aspose::Pdf::Text::TextEditOptionsget_TextEditOptions () const
 Gets text edit options. The options define special behavior when requested symbol cannot be written with font. More...
 
ASPOSE_PDF_SHARED_API void set_TextEditOptions (System::SharedPtr< Aspose::Pdf::Text::TextEditOptions > value)
 Sets text edit options. The options define special behavior when requested symbol cannot be written with font. More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< CharInfoCollectionget_Characters ()
 Gets collection of CharInfo objects that represent information on characters in the text segment. More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< Aspose::Pdf::Hyperlinkget_Hyperlink () const
 Gets the segment hyperlink(for pdf generator). More...
 
ASPOSE_PDF_SHARED_API void set_Hyperlink (System::SharedPtr< Aspose::Pdf::Hyperlink > value)
 Sets the segment hyperlink(for pdf generator). More...
 
ASPOSE_PDF_SHARED_API TextSegment ()
 Creates TextSegment object. More...
 
ASPOSE_PDF_SHARED_API TextSegment (System::String text)
 Creates TextSegment object. 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...
 

Static Public Member Functions

static ASPOSE_PDF_SHARED_API System::String MyHtmlEncode (System::String value)
 Encodes string as html. 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...
 

Protected Member Functions

Aspose::Pdf::Text::TextState::AttachState get_AttachedState () const
 the state is attached to real physical text segment More...
 
System::String get_McName () const
 
void set_McName (System::String value)
 
int32_t get_McId () const
 
void set_McId (int32_t value)
 
System::SharedPtr< Aspose::Pdf::Engine::CommonData::Text::Segmenting::PhysicalTextSegment > get_PhysicalSegment () const
 
System::String get_Id () const
 Gets a segment id. More...
 
void set_Id (System::String value)
 Sets a segment id. More...
 
Aspose::Pdf::Engine::CommonData::Text::Segmenting::Settings::NoCharacterAction get_PhysicalNoCharacterAction () const
 
double get_Height ()
 
System::SharedPtr< Aspose::Pdf::Engine::Data::ITrailerable > get_Trailerable () const
 
System::SharedPtr< Aspose::Pdf::Engine::CommonData::Text::Segmenting::PhysicalTextSegment > get_SegmentAfter () const
 Gets PhysicalTextSegment object that was created after current segment during isolation. May be null if isolation wasn't performed or created no segment after. More...
 
void set_SegmentAfter (System::SharedPtr< Aspose::Pdf::Engine::CommonData::Text::Segmenting::PhysicalTextSegment > value)
 Gets PhysicalTextSegment object that was created after current segment during isolation. May be null if isolation wasn't performed or created no segment after. More...
 
void Attach (System::SharedPtr< Aspose::Pdf::Engine::CommonData::Text::Segmenting::PhysicalTextSegment > physicalSegment)
 Attached the object to physical segment More...
 
void Detach ()
 Detached the object from physical segment More...
 
void IsolatePhysicalSegment ()
 In case TextSegment is a part of physical segment, we have to isolate the working part in it's own physical segment to simplify segments operations More...
 
System::SharedPtr< TextSegmentSplit (int32_t index)
 Splits current TextSegment on two segments by specified position in text. More...
 
void DeletePhysicalSegment ()
 Deletes physical segment More...
 
 TextSegment (System::SharedPtr< Aspose::Pdf::Engine::CommonData::Text::Segmenting::PhysicalTextSegment > physicalSegment, int32_t startCharIndex, int32_t endCharIndex, System::SharedPtr< Aspose::Pdf::Text::TextEditOptions > textEditOptions)
 
 MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION (TextSegment, CODEPORTING_ARGS(System::SharedPtr< Aspose::Pdf::Engine::CommonData::Text::Segmenting::PhysicalTextSegment > physicalSegment, int32_t startCharIndex, int32_t endCharIndex, System::SharedPtr< Aspose::Pdf::Text::TextEditOptions > textEditOptions))
 
void OnSegmentIsolated (System::SharedPtr< OnSegmentChangedEventArgs > e)
 Activates SegmentChanged event Call it from outside to be sure references to text of initial segment will be updated after direct call of PhysicalTextSegment.Isolate() More...
 
 TextSegment (System::SharedPtr< Aspose::Pdf::Engine::CommonData::Text::Segmenting::PhysicalTextSegment > physicalSegment, int32_t startCharIndex, int32_t endCharIndex)
 
 MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION (TextSegment, CODEPORTING_ARGS(System::SharedPtr< Aspose::Pdf::Engine::CommonData::Text::Segmenting::PhysicalTextSegment > physicalSegment, int32_t startCharIndex, int32_t endCharIndex))
 
void SetEncodedTextProperties (System::SharedPtr< Font > font, System::String text, System::ArrayPtr< int32_t > indices)
 Sets font and indices inside the font More...
 
double MeasureSegment ()
 Returns the segment width More...
 
System::SharedPtr< CharInfoGetCharInfo (int32_t charIndex)
 Returns the character info by character index. Index is started from 1 and must be a position within the Text string. More...
 
void SetText (System::String value)
 It makes dirrect setting of text for internal procedures. Don't use it if you aren't sure, use public Text property instead. More...
 
void ProcessHyperlink (System::SharedPtr< Page > page)
 
void Serialize (System::SharedPtr< System::Xml::XmlTextWriter > writer)
 
void Deserialize (System::SharedPtr< System::Xml::XmlReader > reader)
 
virtual ASPOSE_PDF_SHARED_API ~TextSegment ()
 

Protected Attributes

System::EventHandler OnPositionChanged
 
System::EventHandler OnTextChanged
 
System::EventHandler< System::SharedPtr< OnSegmentChangedEventArgs > > SegmentChanged
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 

Detailed Description

Represents segment of Pdf text.

In a few words, TextSegment objects are children of TextFragment object.

In details:

Text of pdf document in Aspose::Pdf is represented by two basic objects: TextFragment and TextSegment

The differences between them is mostly context-dependent.

Let's consider following scenario. User searches text "hello world" to operate with it, change it's properties, look etc.

Document doc = new Document(docFile);
TextFragmentAbsorber absorber = new TextFragmentAbsorber("hello world");
doc.Pages[1].Accept(absorber);

Phisycally pdf text's representation is very complex. The text "hello world" may consist of several phisycally independent text segments.

The Aspose.Pdf text model basically establishes that TextFragment object provides single logic operation set over physical TextSegment objects set that represent user's query.

In text search scenario, TextFragment is logical "hello world" text representation, and TextSegment object collection represents all physical segments that construct "hello world" text object.

So, TextFragment is close to logical text representation. And TextSegment is close to physical text representation.

Obviously each TextSegment object may have it's own font, coloring, positioning properties.

TextFragment provides simple way to change text with it's properties: set font, set font size, set font color etc. Meanwhile TextSegment objects are accessible and users are able to operate with TextSegment objects independently.

Constructor & Destructor Documentation

◆ TextSegment() [1/4]

ASPOSE_PDF_SHARED_API Aspose::Pdf::Text::TextSegment::TextSegment ( )

Creates TextSegment object.

◆ TextSegment() [2/4]

ASPOSE_PDF_SHARED_API Aspose::Pdf::Text::TextSegment::TextSegment ( System::String  text)

Creates TextSegment object.

Parameters
textText segment's text.

◆ TextSegment() [3/4]

Aspose::Pdf::Text::TextSegment::TextSegment ( System::SharedPtr< Aspose::Pdf::Engine::CommonData::Text::Segmenting::PhysicalTextSegment >  physicalSegment,
int32_t  startCharIndex,
int32_t  endCharIndex,
System::SharedPtr< Aspose::Pdf::Text::TextEditOptions textEditOptions 
)
protected

◆ TextSegment() [4/4]

Aspose::Pdf::Text::TextSegment::TextSegment ( System::SharedPtr< Aspose::Pdf::Engine::CommonData::Text::Segmenting::PhysicalTextSegment >  physicalSegment,
int32_t  startCharIndex,
int32_t  endCharIndex 
)
protected

◆ ~TextSegment()

virtual ASPOSE_PDF_SHARED_API Aspose::Pdf::Text::TextSegment::~TextSegment ( )
protectedvirtual

Member Function Documentation

◆ Attach()

void Aspose::Pdf::Text::TextSegment::Attach ( System::SharedPtr< Aspose::Pdf::Engine::CommonData::Text::Segmenting::PhysicalTextSegment >  physicalSegment)
protected

Attached the object to physical segment

Parameters
physicalSegment

◆ DeletePhysicalSegment()

void Aspose::Pdf::Text::TextSegment::DeletePhysicalSegment ( )
protected

Deletes physical segment

◆ Deserialize()

void Aspose::Pdf::Text::TextSegment::Deserialize ( System::SharedPtr< System::Xml::XmlReader reader)
protected

◆ Detach()

void Aspose::Pdf::Text::TextSegment::Detach ( )
protected

Detached the object from physical segment

◆ get_AttachedState()

Aspose::Pdf::Text::TextState::AttachState Aspose::Pdf::Text::TextSegment::get_AttachedState ( ) const
protected

the state is attached to real physical text segment

◆ get_BaselinePosition()

ASPOSE_PDF_SHARED_API System::SharedPtr<Aspose::Pdf::Text::Position> Aspose::Pdf::Text::TextSegment::get_BaselinePosition ( ) const

Gets text position for text, represented with TextSegment object. The YIndent of the Position structure represents baseline coordinate of the text segment.

◆ get_Characters()

ASPOSE_PDF_SHARED_API System::SharedPtr<CharInfoCollection> Aspose::Pdf::Text::TextSegment::get_Characters ( )

Gets collection of CharInfo objects that represent information on characters in the text segment.

◆ get_EndCharIndex()

ASPOSE_PDF_SHARED_API int32_t Aspose::Pdf::Text::TextSegment::get_EndCharIndex ( ) const

Gets ending character index of current segment in the show text operator (Tj, TJ) segment.

◆ get_Height()

double Aspose::Pdf::Text::TextSegment::get_Height ( )
protected

◆ get_Hyperlink()

ASPOSE_PDF_SHARED_API System::SharedPtr<Aspose::Pdf::Hyperlink> Aspose::Pdf::Text::TextSegment::get_Hyperlink ( ) const

Gets the segment hyperlink(for pdf generator).

◆ get_Id()

System::String Aspose::Pdf::Text::TextSegment::get_Id ( ) const
protected

Gets a segment id.

◆ get_McId()

int32_t Aspose::Pdf::Text::TextSegment::get_McId ( ) const
protected

◆ get_McName()

System::String Aspose::Pdf::Text::TextSegment::get_McName ( ) const
protected

◆ get_PhysicalNoCharacterAction()

Aspose::Pdf::Engine::CommonData::Text::Segmenting::Settings::NoCharacterAction Aspose::Pdf::Text::TextSegment::get_PhysicalNoCharacterAction ( ) const
protected

◆ get_PhysicalSegment()

System::SharedPtr<Aspose::Pdf::Engine::CommonData::Text::Segmenting::PhysicalTextSegment> Aspose::Pdf::Text::TextSegment::get_PhysicalSegment ( ) const
protected

◆ get_Position()

ASPOSE_PDF_SHARED_API System::SharedPtr<Aspose::Pdf::Text::Position> Aspose::Pdf::Text::TextSegment::get_Position ( ) const

Gets text position for text, represented with TextSegment object.

◆ get_Rectangle()

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

Gets rectangle of the TextSegment

◆ get_SegmentAfter()

System::SharedPtr<Aspose::Pdf::Engine::CommonData::Text::Segmenting::PhysicalTextSegment> Aspose::Pdf::Text::TextSegment::get_SegmentAfter ( ) const
protected

Gets PhysicalTextSegment object that was created after current segment during isolation. May be null if isolation wasn't performed or created no segment after.

◆ get_StartCharIndex()

ASPOSE_PDF_SHARED_API int32_t Aspose::Pdf::Text::TextSegment::get_StartCharIndex ( ) const

Gets starting character index of current segment in the show text operator (Tj, TJ) segment.

◆ get_Text()

ASPOSE_PDF_SHARED_API System::String Aspose::Pdf::Text::TextSegment::get_Text ( ) const

Gets System::String text object that the TextSegment object represents.

◆ get_TextEditOptions()

ASPOSE_PDF_SHARED_API System::SharedPtr<Aspose::Pdf::Text::TextEditOptions> Aspose::Pdf::Text::TextSegment::get_TextEditOptions ( ) const

Gets text edit options. The options define special behavior when requested symbol cannot be written with font.

◆ get_TextState()

ASPOSE_PDF_SHARED_API System::SharedPtr<Aspose::Pdf::Text::TextState> Aspose::Pdf::Text::TextSegment::get_TextState ( ) const

Gets text state for the text that TextSegment object represents.

Provides a way to change following properties of the text: Font FontSize FontStyle ForegroundColor BackgroundColor

◆ get_Trailerable()

System::SharedPtr<Aspose::Pdf::Engine::Data::ITrailerable> Aspose::Pdf::Text::TextSegment::get_Trailerable ( ) const
protected

◆ GetCharInfo()

System::SharedPtr<CharInfo> Aspose::Pdf::Text::TextSegment::GetCharInfo ( int32_t  charIndex)
protected

Returns the character info by character index. Index is started from 1 and must be a position within the Text string.

◆ IsolatePhysicalSegment()

void Aspose::Pdf::Text::TextSegment::IsolatePhysicalSegment ( )
protected

In case TextSegment is a part of physical segment, we have to isolate the working part in it's own physical segment to simplify segments operations

◆ MeasureSegment()

double Aspose::Pdf::Text::TextSegment::MeasureSegment ( )
protected

Returns the segment width

Returns

◆ MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION() [1/2]

Aspose::Pdf::Text::TextSegment::MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION ( TextSegment  ,
CODEPORTING_ARGS(System::SharedPtr< Aspose::Pdf::Engine::CommonData::Text::Segmenting::PhysicalTextSegment > physicalSegment, int32_t startCharIndex, int32_t endCharIndex, System::SharedPtr< Aspose::Pdf::Text::TextEditOptions > textEditOptions)   
)
protected

◆ MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION() [2/2]

Aspose::Pdf::Text::TextSegment::MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION ( TextSegment  ,
CODEPORTING_ARGS(System::SharedPtr< Aspose::Pdf::Engine::CommonData::Text::Segmenting::PhysicalTextSegment > physicalSegment, int32_t startCharIndex, int32_t endCharIndex)   
)
protected

◆ MyHtmlEncode()

static ASPOSE_PDF_SHARED_API System::String Aspose::Pdf::Text::TextSegment::MyHtmlEncode ( System::String  value)
static

Encodes string as html.

Parameters
valueString value to encode.
Returns
Html encoded string.

◆ OnSegmentIsolated()

void Aspose::Pdf::Text::TextSegment::OnSegmentIsolated ( System::SharedPtr< OnSegmentChangedEventArgs e)
protected

Activates SegmentChanged event Call it from outside to be sure references to text of initial segment will be updated after direct call of PhysicalTextSegment.Isolate()

Parameters
eevent args

◆ ProcessHyperlink()

void Aspose::Pdf::Text::TextSegment::ProcessHyperlink ( System::SharedPtr< Page page)
protected

◆ Serialize()

void Aspose::Pdf::Text::TextSegment::Serialize ( System::SharedPtr< System::Xml::XmlTextWriter writer)
protected

◆ set_BaselinePosition()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Text::TextSegment::set_BaselinePosition ( System::SharedPtr< Aspose::Pdf::Text::Position value)

Gets text position for text, represented with TextSegment object. The YIndent of the Position structure represents baseline coordinate of the text segment.

◆ set_Hyperlink()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Text::TextSegment::set_Hyperlink ( System::SharedPtr< Aspose::Pdf::Hyperlink value)

Sets the segment hyperlink(for pdf generator).

◆ set_Id()

void Aspose::Pdf::Text::TextSegment::set_Id ( System::String  value)
protected

Sets a segment id.

◆ set_McId()

void Aspose::Pdf::Text::TextSegment::set_McId ( int32_t  value)
protected

◆ set_McName()

void Aspose::Pdf::Text::TextSegment::set_McName ( System::String  value)
protected

◆ set_Position()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Text::TextSegment::set_Position ( System::SharedPtr< Aspose::Pdf::Text::Position value)

Gets text position for text, represented with TextSegment object.

◆ set_SegmentAfter()

void Aspose::Pdf::Text::TextSegment::set_SegmentAfter ( System::SharedPtr< Aspose::Pdf::Engine::CommonData::Text::Segmenting::PhysicalTextSegment >  value)
protected

Gets PhysicalTextSegment object that was created after current segment during isolation. May be null if isolation wasn't performed or created no segment after.

◆ set_Text()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Text::TextSegment::set_Text ( System::String  value)

Sets System::String text object that the TextSegment object represents.

◆ set_TextEditOptions()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Text::TextSegment::set_TextEditOptions ( System::SharedPtr< Aspose::Pdf::Text::TextEditOptions value)

Sets text edit options. The options define special behavior when requested symbol cannot be written with font.

◆ set_TextState()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Text::TextSegment::set_TextState ( System::SharedPtr< Aspose::Pdf::Text::TextState value)

Sets text state for the text that TextSegment object represents.

Provides a way to change following properties of the text: Font FontSize FontStyle ForegroundColor BackgroundColor

◆ SetEncodedTextProperties()

void Aspose::Pdf::Text::TextSegment::SetEncodedTextProperties ( System::SharedPtr< Font font,
System::String  text,
System::ArrayPtr< int32_t >  indices 
)
protected

Sets font and indices inside the font

Parameters
fontFont of the fragment.
textText value.
indicesGlyph indices inside the font.

◆ SetText()

void Aspose::Pdf::Text::TextSegment::SetText ( System::String  value)
protected

It makes dirrect setting of text for internal procedures. Don't use it if you aren't sure, use public Text property instead.

Parameters
valueString to set as the segment text.

◆ Split()

System::SharedPtr<TextSegment> Aspose::Pdf::Text::TextSegment::Split ( int32_t  index)
protected

Splits current TextSegment on two segments by specified position in text.

Parameters
indexPosition in text from which new TextSegment will start.
Returns
New TextSegment containing text of parent segment starting from specified position. Parent segment will be truncated.

Member Data Documentation

◆ OnPositionChanged

System::EventHandler Aspose::Pdf::Text::TextSegment::OnPositionChanged
protected

◆ OnTextChanged

System::EventHandler Aspose::Pdf::Text::TextSegment::OnTextChanged
protected

◆ SegmentChanged

System::EventHandler<System::SharedPtr<OnSegmentChangedEventArgs> > Aspose::Pdf::Text::TextSegment::SegmentChanged
protected