[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.TextMap.ITextMap

ITextMap Interface

Represents the text map of a page or of a portion of a page. Provides methods for text searching, hit testing etc.

The pixel values used by the text map's methods and properties are determined by the X and Y resolution passed to the GetTextMap(float, float, bool) method to create the text map.

Namespace: GrapeCity.Documents.Pdf.TextMap
Assembly: DS.Documents.Pdf.dll
Syntax
public interface ITextMap : IReadOnlyList<ITextLine>, IReadOnlyCollection<ITextLine>, IEnumerable<ITextLine>, IEnumerable
Public Interface ITextMap
    Inherits IReadOnlyList(Of ITextLine), IReadOnlyCollection(Of ITextLine), IEnumerable(Of ITextLine), IEnumerable

Properties

Name Description
Invalid

Indicates whether this ITextMap is valid and can be used.

The ITextMap becomes invalid after editing operations like DeleteText(TextMapFragment, DeleteTextMode), ReplaceText(TextMapFragment, string, Font, float?) etc.

Page

Gets the Page object producing this ITextMap.

Paragraphs

Gets the list of text paragraphs.

Methods

Name Description
DeleteText(TextMapFragment, DeleteTextMode)

Deletes a specified text fragment.

FindText(FindTextParams, FindTextCallback)

Performs a text search within this text map. The callback is called for each found instance.

GetCoords(TextLineFragment)

Gets the coordinates of a TextLineFragment on the page.

GetFragment(MapPos, MapPos, out TextMapFragment, out string)

Gets a TextMapFragment that represents the text within a specified range (from startPos to endPos).

GetFragment(out TextMapFragment, out string)

Gets a TextMapFragment that represents the text of the whole page.

GetFragmentFromPos(MapPos, out TextMapFragment, out string)

Gets a TextMapFragment that represents the text from pos to the end of the page.

GetFragmentToPos(MapPos, out TextMapFragment, out string)

Gets a TextMapFragment that represents the text from the start of the page to pos.

GetPoints(TextLineFragment)

Gets the array of points defining a polygon with coordinates of a TextLineFragment on the page.

GetText()

Gets the whole text represented by this map.

GetText(TextLineFragment)

Gets the text of a TextLineFragment.

GetWord(MapPos, out int, out int, out Quadrilateral)

Gets the info about a word at a specified position in a line.

HitTest(float, float)

Performs hit testing on the map.

This method accepts a pixel location relative to the top left corner of the page, and provides info about the text in that location.

The pixel resolution is the resolution specified when building this text map (see GetTextMap(float, float, bool) and other GetTextMap() overloads).

ReplaceText(TextMapFragment, string, Font, float?)

Replaces a specified text fragment with another text.

Extension Methods