Hi,
I want to copy the select text from pdf.
First I choose a Rectangle area and using its coordinates to init TextAbosrber.TextSearchOptions.Rectangle. and then I selected a page to accept this textAbsorber.
Finally, I found that the textAbsorber.Text has lots of break lines in the end. sometime it also will be displayed between each line.
here is sample code:
var absorber = new TextAbsorber(); absorber.TextSearchOptions.LimitToPageBounds = true; var ltPoint = CalculateSelectedAreaOnPage(SelectRectLeftTopPoint); var rbPoint = CalculateSelectedAreaOnPage(SelectRectRightBottomPoint); absorber.TextSearchOptions.Rectangle = (new Aspose.Pdf.Rectangle(ltPoint.X, ltPoint.Y, >rbPoint.X, rbPoint.Y)); CurPreviewPage.Accept(absorber); string extractedText = absorber.Text;
Please ingore the function CalculateSelectedAreaOnpage(), it just a function to convert point.
Please help me check the extract text result. thanks.