Back to Devexpress

TdxPDFDocument.OnSearchProgress Event

vcl-dxpdfdocument-dot-tdxpdfdocument-7c796f49.md

latest2.1 KB
Original Source

TdxPDFDocument.OnSearchProgress Event

Enables you to track the progress of a time-consuming text search operation in the PDF document.

Declaration

delphi
property OnSearchProgress: TdxPDFDocumentTextSearchProgressEvent read; write;

Remarks

Handle the OnSearchProgress event to display a progress bar in your application (the TcxProgressBar control, for instance) during a text search operation. This event can occur multiple times per search operation, every time the FindText method finishes processing a document page.

Code Example: Track Document Search Progress

You can use the APercent parameter to obtain the percentage value that indicates the progress of the search operation:

delphi
TMyForm.SearchProgress(Sender: TdxPDFDocument; APageIndex: Integer; APercent: Integer);
begin
  cxProgressBar1.Position := APercent;
end;
cpp
void __fastcall TMyForm::SearchProgress(TdxPDFDocument *Sender, int APageIndex, int APercent)
{
  cxProgressBar1->Position = APercent;
}

Refer to the TdxPDFDocumentTextSearchProgressEvent procedural type description for detailed information on parameters accessible within an OnSearchProgress event handler.

Note

The TdxPDFViewer control handles the OnSearchProgress event for its Document. If you work with the PDF Viewer, handle the TdxPDFViewer control’s OnSearchProgress event.

See Also

TdxPDFDocument.FindText

TdxPDFDocument Class

TdxPDFDocument Members

dxPDFDocument Unit