![]() ' if searching text from the right to the left If rightToLeft Thenįor index As Integer = start - 1 To Step -1 TextSearchResult Dim startDigitIndex As Integer = -1 ''' Public Overrides Function Find(sourceString As String, startIndex As Integer, length As Integer, rightToLeft As Boolean) As. TextSearchResult object that ''' contains information about searched text if text is found otherwise, null. ''' Indicates that text should be searched from right to left. ''' The number of characters, in the sourceString, to analyze. ''' The zero-based index, in the sourceString, from which text must be searched. ![]() ''' ''' Source string (string of PDF page) where text must be searched. TextSearchEngine ''' ''' Searches the first text matching in the string of PDF page. StartIndex = Įnd If Loop While textRegion IsNot Nothing Return textRegions.ToArray()Įnd Function ''' ''' Class for searching the digits in text of PDF page. If textRegion IsNot Nothing Then ' add result TextRegion = (digitsSearchEngine, startIndex, False) TextRegion = Nothing Dim startIndex As Integer = 0 TextRegion)()ĭim digitsSearchEngine As New DigitsSearchEngine()ĭim textRegion As. TextRegion()ĭim textRegions As New ( Of. Public Function AdvancedDigitsSearchOnPdfPage(page As. ''' An array of text regions on PDF page where text was found. ''' ''' PDF page where digits should be searched. ( "Searching the digits in text of PDF document is finished.")Įnd Sub ''' ''' Searches digits on PDF page. ( String.Format( "- Text=", textRegions(j).TextContent, textRegions(j).Rectangle)) If textRegions IsNot Nothing Then For j As Integer = 0 To textRegions.Length - 1 TextRegion() = SimpleDigitsSearchOnPdfPage(document.Pages(i), New ( "\d ")) ( "Searching the digits in text of PDF document is started.")įor i As Integer = 0 To - 1ĭim textRegions As. Public Sub SearchDigitsInTextOfPdfDocument(document As. ''' ''' PDF document where digits should be searched. ![]() ''' ''' Outputs the information about digits in content of PDF document. if found text is not empty if (textRegion != null) TextRegion = (textSearchEngine, ref startIndex, false) / An array of text regions on PDF page where text was found. / Regular expression which defines the searching text. / /// PDF page where text should be searched. ( "Searching the digits in text of PDF document is started.") įor ( int i = 0 i /// Searches a text, defined with regular expression, on PDF page. public void SearchDigitsInTextOfPdfDocument(. / /// PDF document where digits should be searched. / /// Outputs the information about digits in content of PDF document.
0 Comments
Leave a Reply. |