|
PDF - Create session |
Declaration
<AMPDF ACTIVITY="create_session" SESSION="text" SOURCE="text" PASSWORD="text (encrypted)" PDFDOCUMENTFROM="text (options)" NEWPDF="text" OVERWRITE="YES/NO" CREATEEMPTY="YES/NO" />
Description
Creates a unique session which can be used to combine other PDF activities. A session is particularly useful as a means of organizing and encapsulating a collection of activities required to accomplish a particular operation.
Practical Usage
Commonly used to create a new session in which other activities can be linked to. Sessions typically represent a combination of steps that are used to complete a specific process. Creating sessions enables you to build and organize more customized tasks. Additionally, sessions can eliminate redundant entry of identical parameters that may be required by several activities.
Parameters
Session
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Create session from | Text (options) | Yes | Existing PDF |
|
Specifies the type of PDF file to create from the session. The available
options are:
|
Session | Text | Yes | PDFSession1 | SESSION="myPDFSession" | The
name of the session to create. This allows subsequent PDF activities
to be linked to this session. Numerous sessions can exist within
a single task allowing several PDF files to be open simultaneously.
The default session name is PDFSession1. NOTE:
To end a session, use the PDF
- End session activity. |
Text | Yes | (Empty) |
|
Specifies the path and file name of an existing PDF file, or where a newly-generated PDF file is stored, based on the option selected for Create session from:
|
|
Password (optional) | Text | No | (Empty) | PASSWORD="encrypted" | The password required to open the existing PDF file (if required). This parameter becomes active if the Create session from parameter is set to Existing PDF. |
Overwrite if PDF already exists | Yes/No | No | No | OVERWRITE="YES" | If selected, a PDF file with the same file name in the destination folder is overwritten when this activity runs. If disabled (default), a PDF file with the same file name in the destination folder is not overwritten, however, a runtime error occurs as a result. |
Example
- 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 creates a session from a new PDF file.
<AMPDF ACTIVITY="create_session" SESSION="myPDFSession" PDFDOCUMENTFROM="new_file" NEWPDF="C:\temp\newFile.pdf" />