|
PDF - Set field(s) |
Declaration
<AMPDF ACTIVITY="set" SESSION="text" SOURCE="text" PASSWORD="encrypted text" PDFDOCUMENTFROM="text (options)" NEWPDF="text" OVERWRITE="YES/NO" CREATEEMPTY="YES/NO" SAVETYPE="text (options)" DESTINATION="text" FIELDNAMES="text" FIELDVALUES="text" />
Description
Enters text into one or more form fields in a PDF file.
Practical Usage
Allows interactions to be performed on selected fields of a PDF file.
Parameters
Resource
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Resource | --- | --- | --- | --- | Specifies the source of the PDF file. The available options are:
NOTE: This parameter does not contain markup and is only displayed in visual mode for task construction and configuration purposes. |
Session | Text | Yes, if Resource is set to Session | PDFSession1 | SESSION="mySession" | The existing session to associate with this activity. This parameter becomes active and is required if the Resource parameter is set to Session. |
Use | Text (options) | Yes, if Resource is set to File | Existing PDF |
|
Specifies
whether to add attachments to an existing or newly-created PDF file. This parameter becomes active and is required if the
Resource parameter is
set to File. The available options are:
|
Source PDF | Text | Yes, if Use is set to Existing PDF | (Empty) | SOURCE="C:\PDFFileName.pdf" | The PDF path and file name of where to enter text. This parameter becomes active and is required if the Use parameter is set to Existing PDF. |
Password (optional) | Text | No | (Empty) | PASSWORD="encrypted" | The password required to open the existing PDF file (if required). This parameter becomes active if the Use parameter is set to Existing PDF. |
On completion | Text (options) | Yes, if Use is set to Existing PDF | Save |
|
Specifies how changes to the PDF file are saved upon completion of this activity. This parameter becomes active and is required if the Use parameter is set
to Existing PDF. The available
options are:
|
Destination PDF | Text | Yes, if On completion is set to Save as | (Empty) | DESTINATION="C:\PDFFileName.pdf" | The path and file name where the modified existing PDF file is stored. This parameter becomes active and is required if the On completion parameter is set to Save as. |
New PDF | Text | Yes, if Use is set to New PDF | (Empty) | NEWPDF="C:\PDFFileName.pdf" | The path and file name where the newly-generated PDF file is stored. This parameter becomes active and is required if the Use parameter is set to New PDF. |
Overwrite if PDF already exists | Yes/No | No | No | OVERWRITE="YES" | If selected, a PDF file with the same filename in the destination folder is overwritten when this activity runs. If disabled (default), a PDF file with the same filename in the destination folder is not overwritten, however, a runtime error occurs as a result. |
Create empty PDF file | Yes/No | No | No | CREATEEMPTY="YES" | If selected, the activity creates an empty, single-page PDF file. This parameter becomes active if the Use parameter is set to New PDF. |
Field
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Field name | Text | Yes | (Empty) | FIELDNAMES="TELEPHONE,ALTERNATE TELEPHONE" | The name of the form fields
to populate. Click Add
to select a form field. Click the drop-down
list box under the Field name
column to populate it with the list of available fields that correspond
to the source PDF file, and then select the desired field name. Click Remove to remove the form field entry from this activity. NOTE: Use the Get
field(s) activity to retrieve information about one or more
form fields contained in a PDF file. |
Value | Text | Yes | (Empty) |
FIELDVALUES="310-555-1212,714-555-1234" |
The value that corresponds to the field name. Once the field name is selected under the Field name column, enter the desired value under the Value column. |
Example
NOTE:
- The sample AML code below can be copied and pasted directly into the Steps Panel of the Task Builder.
- Parameters containing user credentials, files, file paths, and/or other information specific to the task must be customized before the sample code can run successfully.
Description
This sample task populates specific fields with values in a PDF and then saves it using a different file name.
Copy
<AMPDF ACTIVITY="set" SOURCE="C:\temp\sourceForm.pdf" SAVETYPE="save_as" DESTINATION="C:\temp\savedForm.pdf" FIELDNAMES="TITLE,ADDRESS,CITY,COUNTRY" FIELDVALUES="Name,300 S. Street,Los Angeles,USA" />