THPDFPage.AddPushButton

THPDFPage

 

Μέθοδοι  AcroForm Support

Adds an AcroForm push button widget to the current page.

 

Delphi syntax:

procedure AddPushButton(const FieldName, Caption: AnsiString; Rectangle: TRect; Flags: THPDFFormFieldFlags = []);

 

Περιγραφή

Η μέθοδος δημιουργεί /Btn field με το Pushbutton flag και γράφει το caption μέσω των widget appearance characteristics. Χρησιμοποιήστε AddPushButtonWithAction όταν το button πρέπει να υποβάλει form, να κάνει reset το form, να εκτελέσει JavaScript, να ανοίξει URI, να ενεργοποιήσει named viewer command ή να κρύψει άλλο field

 

THPDFButtonAction values

   baNone — no /A action
   baSubmitURL/S /SubmitForm with /FS /URL filespec (PDF 1.2 §12.7.5.2). Param is the destination URL.
   baResetForm/S /ResetForm resets every form field (PDF 1.2 §12.7.5.3).
   baJavaScript/S /JavaScript /JS (Param) (PDF 1.3 §12.6.4.16).
   baURI/S /URI /URI (Param) (PDF 1.1 §12.6.4.7). Opens the URL in a browser.
   baNamed (HotPDF v2.119.18) — /S /Named /N <Param> (PDF 1.1 §12.6.4.11). Param is the spec name token: NextPage / PrevPage / FirstPage / LastPage (the four standard navigation commands all PDF readers honor). Acrobat extensions like Print and SaveAs are also accepted by compatible viewers.
   baHide (HotPDF v2.119.18) — /S /Hide /T (Param) /H true (PDF 1.2 §12.6.4.10). Param is the name of the form field or annotation to hide when the button is clicked.

 

Compliance

Το PDF/A (οποιοδήποτε level) απορρίπτει baJavaScript και baResetForm σύμφωνα με ISO 19005-1 §6.6.1 / ISO 19005-2 §6.5.1 / ISO 19005-3 §6.5.1. Το PDF/X (οποιοδήποτε level) απορρίπτει επιπλέον baSubmitURL. Τα baNamed και baHide επιτρέπονται από το spec τόσο σε PDF/A όσο και σε PDF/X

 

See also: AcroForm Support, LastAnnotation