property LinkOptions: TPdfViewLinkOptions;
LinkOptions, Pascal set of TPdfViewLinkOption türündedir. Her
bayrak, bir PDF link action türünün otomatik işlenmesini açıp kapatır:
PageNumber'ı hedefe yönlendirirShellExecute on the
URI.Varsayılan değer [loAutoGoto, loAutoOpenURI]'dir —
güvenli sayfa atlamaları ve URL açılışları otomatik kalır; program çalıştırma
ve dokümanlar arası atlamalar ise uygulamanın açıkça kabul etmesini gerektirir
Each link action also raises the corresponding
OnAnnotationLinkClick (annotated /Link annotations) or
OnWebLinkClick (web-link scanner hits) event BEFORE the
automatic handler runs. Mark the event's Handled
parameter as True to suppress the auto-action, or
redirect the link through a confirmation prompt / security policy /
audit log.
Active := True; LinkOptions is published.loAutoOpenURI'yi kapatmak, bir kiosk veya güvenilmeyen-doküman görüntüleyicisine gömme için güvenli seçimdir — herhangi bir şey yapmadan önce URL'yi denetleyen OnWebLinkClick ile eşleştirin
// Safe defaults: auto-follow only in-doc jumps and URIs
PdfView1.LinkOptions := [loAutoGoto, loAutoOpenURI];
// Vet URI clicks before opening
procedure TForm1.PdfView1WebLinkClick(Sender: TObject;
WebLinkIndex: Integer; const Url: WString;
var Handled: Boolean);
begin
if MessageDlg('Open ' + Url + '?',
mtConfirmation, [mbYes, mbNo], 0) <> mrYes then
Handled := True; // suppress auto-handling
end;