AddLinkToJavaScript
JavaScript, Anmerkungen und Hotspot-Links
Beschreibung
Fügt der ausgewählten Seite ein klickbares Hotspot-Rechteck hinzu, das auf eine JavaScript-Aktion verlinkt
Verwenden Sie die Funktion SetAnnotBorderColor, um die Farbe des Hotspot-Rands zu ändern
Die Funktion wird in PDF/A- und PDF/X-1a-, PDF/X-3- oder PDF/X-4-Modi abgelehnt, aber PDF/X-6-Modi erlauben diese direkt aktivierte Link-Aktion; Dokument-, Seiten- und Formularfeld-JavaScript bleibt in PDF/X-6 verboten
Syntax
Delphi
Function TPDFlib.AddLinkToJavaScript(Left, Top, Width, Height: Double; Const JavaScript: WideString; Options: Integer): Integer;
ActiveX
Function PDFlib::AddLinkToJavaScript(Left As Double, Top As Double, Width As Double, Height As Double, JavaScript As String, Options As Long) As Long
DLL
int DLAddLinkToJavaScript(int InstanceID, double Left, double Top, double Width, double Height, const wchar_t* JavaScript, int Options);
int DLAddLinkToJavaScriptA(int InstanceID, double Left, double Top, double Width, double Height, const char* JavaScript, int Options);
Parameter
| Left | Die horizontale Koordinate der linken Kante des Hotspot-Rechtecks |
|---|---|
| Top | Die vertikale Koordinate der oberen Kante des Hotspot-Rechtecks |
| Width | Die Breite des Hotspot-Rechtecks |
| Height | Die Höhe des Hotspot-Rechtecks |
| JavaScript | Das auszuführende JavaScript |
| Options | Gibt das Erscheinungsbild des Links an: 0 = Kein Rahmen 1 = Rahmen zeichnen |
Rückgabewerte
Gibt 1 zurück, wenn der Link hinzugefügt wurde. Gibt 0 zurück in PDF/A-Dokumenten sowie in PDF/X-Versionen unter 4, wo JavaScript-Aktionen nicht zulässig sind.