The method FindRelativeSegment gives me the wrong result.
If I use the FindRelativeSegment or any other method to get me a segment or line from a PDF, it will only get me the part till the dot. For example if the line is: "This is the line with number 12345.6789". The FindRelativeSegment with the param searchFor: "This is", will give me the result: "This is the line with number 12345". I want the complete line. Can anyone help?
Have you used the developer tools to highlight your segments? You need to set the thresholds for line, segment and word so that when highlighted they reflect what you want. You may need to increase the threshold for segments to span the dot.
Each pdf will be a little different. Start with highlighting the lines. If the dot is a little lower than the rest of the line, it might be read as a new line. Once the line threshold returns what you are expecting, you can move to segments ...
I have attached an example of the pdf I am trying to extract a number from. I am using "dil" as the search citeria in the findrelativesegment. It gives me back ": DIL 3174513" . The rest of the number is ignored. I want to have the part after the dot "20160006" as my result. Maybe you have an idea how the extract that number?