New PDF Form Field: Text Field
(See Example
PDF
and Example
PDFill Project File
)
A Text PDF field is a box or space in which the user can enter text from the keyboard.
1. Create a Text Form Field:
Here are the steps to create a Text form field:
- Choose Menu Insert > Form Fields > Select Text Field Tools, or click the first button in the Forms Toolbar.
- Hold Left mouse button to create a form field of the required size
- The new form field properties dialog comes up to set options
- To copy multiple fields in one time, select the current text, click the Table Tools
- To adjust the height of the box using the Font Size, click the Height Adjust Tool
- You can create fields with the same name inside the same page or across different page
2. To access form field properties:
3. Set Field Properties:
Field Name The name to define the field. Two fields can have the same name and they will have the same value string. Tooltips Inside Adobe Reader, the user hovers the cursor over the field, without clicking it, and a small box appears with supplementary information regarding the field being hovered over. This is useful to help the user fill the form. Visibility Visible: Display and Printable.
Hidden: do not display or allow it to interact with the user and not can not print.
Visible but Don’t Print: don’t print this field even if it is displayed on the screen.
Hidden but Printable: even if it is not displayed, it will print on the page.Rotation The text direction inside the box: 0, 90, 180 or 270. Read Only If set, the user may not change the value of the field. Any associated widget annotations will not interact with the user; that is, they will not respond to mouse clicks or change their appearance in response to mouse motions. Required If set, the field must have a value at the time it is exported by a submit-form action (see “Submit-Form Actions” on page 662). Font Size If set 0, the font size will be adjusted automatically according so that all the text will be fitted into the box. Font Color The color of the text. Font Encode Click here to see the listed links to international graphical representations, and textual listings, of each of the Windows codepages that PDFill supports. Font Name Some font is empty for the selected Font Encode. You must play with several fonts to see if it works inside PDFill. Font Style Font Regular, Bold, Italic and Bold Italic. Font Embed Font Embedding allows the fonts used in the creation of a PDF form to travel with that PDF document, ensuring that a user sees PDF Form Fields exactly as the designer intended them to be seen. But, it requires bigger PDF file size. There are 3 options: Auto, NOT Embedded and Embedded. Note that If your special font is copyright-protected, the font embed will not work.
Fill Color The background color of the field, If set, it will be opaque. Border Width The line thickness of the border. Select a width greater than 0 to enable the Border color and style Border Color The color the border line. Border Style Solid: a solid rectangle surrounding the annotation.
Dashed: a dashed rectangle surrounding the annotation.
Beveled: a simulated embossed rectangle that appears to be raised above the surface of the page.
Inset: a simulated engraved rectangle that appears to be recessed below the surface of the page.
Underline: a single line along the bottom of the annotation rectangle.Position (Left, Right, Top, Bottom) The X and Y coordinate of the box to define the position of the field. Adjust Box Height using Font Size The height of the box will be adjusted according to the font size
Alignment Text Alignment inside the box: Left, Center and Right. Max Chars The maximum length of the field’s text, in characters. If 0, there is no limit. Default Value A reset-form action resets the entire interactive form fields to their default values. When the user submits the form, if this field is not filled, this value will be submitted; Multiple Line Text If set, the field can contain multiple lines of text; if clear, the field’s text is restricted to a single line. Password If set, the field is intended for entering a secure password that should not be echoed visibly to the screen. Characters typed from the keyboard should instead be echoed in some unreadable form, such as asterisks or bullet characters. To protect password confidentiality, viewer applications should never store the value of the text field in the PDF file if this flag is set. No Scroll Long Text If set, the field does not scroll (horizontally for single-line fields, vertically for multiple-line fields) to accommodate more text than fits within its annotation rectangle. Once the field is full, no further text is accepted. No Spell Check If set, text entered in the field is not spell-checked. File Selection If set, the text entered in the field represents the pathname of a file whose contents are to be submitted as the value of the field.
You can add multiple actions. See PDF Actions
- Open a Web Link
- Reset a Form
- Submit a Form
- Run a Javascript
- Named Action
- Go to Local Page
- Go to Another PDF
- Launch Application or Document
The following scripts and formats can be used for the format and keystroke triggers. Please see details:
Acrobat Forms API Reference: http://www.pdfill.com/download/FormsAPIReference.pdf
Acrobat JavaScript Scripting Guide: http://www.pdfill.com/download/Acro6JSGuide.pdf
Functions Variables Example Display Example Code AFNumber_Format(nDec, sepStyle, negStyle, currStyle, strCurrency, bCurrencyPrepend)
AFNumber_Keystroke(nDec, sepStyle, negStyle, currStyle, strCurrency, bCurrencyPrepend)– nDec is the number of places after the decimal point;
– sepStyle is an integer denoting whether to use a separator or not. If sepStyle=0, use commas. If sepStyle=1, do not separate.
– negStyle is the formatting used for negative numbers: 0 = MinusBlack, 1 = Red, 2 = ParensBlack, 3 = ParensRed
– currStyle is the currency style - not used
- strCurrency is the currency symbol
– bCurrencyPrepend$12,123.03 AFNumber_Format(2, 0, 3, 0, "\u0024", true);
AFNumber_Keystroke(2, 0, 3, 0, "\u0024", true);)AFPercent_Format(nDec, sepStyle)
AFPercent_Keystroke(nDec, sepStyle)– nDec is the number of places after the decimal point;
- sepStyle is an integer denoting whether to use a separator or not. If sepStyle=0, use commas. If sepStyle=1, do not separate.32.24% AFPercent_Format(2, 1);
AFPercent_Keystroke(2, 1);AFDate_Format(cFormat)
AFDate_KeystrokeEx(cFormat)– cFormat is one of: "m/d", "m/d/yy", "mm/dd/yy", "mm/yy", "d-mmm", "d-mmm-yy", "dd-mmm-yy", "yymm-dd", "mmm-yy", "mmmm-yy", "mmm d, yyyy", "mmmm d, yyyy", "m/d/yy h:MM tt", "m/d/yy HH:MM" 04/13/2010 AFDate_FormatEx("mm/dd/yyyy");
AFDate_KeystrokeEx("mm/dd/yyyy");AFTime_Format(ptf)
AFTime_Keystroke(ptf)– ptf is the time format: 0 = 24HR_MM [ 14:30 ], 1 = 12HR_MM [ 2:30 PM ], 2 = 24HR_MM_SS [ 14:30:15 ], 3 = 12HR_MM_SS [ 2:30:15 PM ] 14:30:15 AFTime_Format(2);
AFTime_Keystroke(2);AFSpecial_Format(psf)
AFSpecial_Keystroke(psf)– psf is the type of formatting to use:0 = zip code, 1 = zip + 4, 2 = phone, 3 = SSN 123-45-6789 AFSpecial_Format(3);
AFSpecial_Keystroke(3);Example: AFNumber_Format(2, 0, 0, 0, "", false); AFNumber_Keystroke(2, 0, 0, 0, "", false);
AFRange_Validate(bGreaterThan, nGreaterThan, bLessThan, nLessThan)
- bGreaterThan - logical value to indicate the use of the greater than comparison
- nGreaterThan - numeric value to be used in the greater than comparison
- bLessThan - logical value to indicate the use of the less than comparison
- nLessThan - numeric value to be used in the less than comparison
Example: AFRange_Validate(true, 0, true, 100);
AFSimple_Calculate(cFunction, cFields)
– cFunction is one of "AVG", "SUM", "PRD", "MIN", "MAX"
– cFields is the list of the fields to use in the calculation.
Example: AFSimple_Calculate("SUM", new Array ("test1", "test2"));
You can also use custom script like this:
var a = this.getField("Text1").value;
var b = this.getField("Text2").value;
this.getField("Text3").value = 10 * a - b/10;
4. Screenshot
PDFill
Copyright © 2002-2010 by
PlotSoft L.L.C.. All rights reserved.