PDF - Split
Declaration
<AMPDF ACTIVITY="split" SOURCE="text" PASSWORD="encrypted text" SPLITFOLDER="text" SPLIT="text (options)" PAGE="number" />
Description: Splits a PDF document in half, at a specific page, per individual page or into even/odd pages.
Practical Usage
Imagine a large report generated in PDF that needs to be divided into pieces so specific portions can be sent to clients or other departments. The Split activity is ideal for such a task and allows for better management of PDF documents. Developers can split a document at a specific page to save the valuable portion and discard the rest. Documents can be split into single pages allowing even more control during the editing process.
Resource Parameters
Property |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
Resource |
--- |
--- |
--- |
--- |
Indicates where the source PDF should originate from. This is a design mode parameter used only during task construction and configuration, thus, comprises no markup. The available options are:
|
Session |
Text |
Yes if Resource parameter is set to Session |
PDFSession1 |
SESSION="mySession" |
The name of an existing session to associate this activity with. This parameter is active only if the Resource parameter is set to Session. |
Source PDF |
Text |
Yes if Resource parameter is set to File |
(Empty) |
SOURCE="C:\temp\source.pdf" |
The path and file name of an existing PDF document in which to extract contents from. This parameter is active only if the Use previously created session parameter is disabled. |
Password (optional) |
Text |
Yes if Resource parameter is set to File |
(Empty) |
PASSWORD="encrypted" |
The password required to open the existing PDF document (if required). |
Output Parameters
Property |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
Destination folder |
Text |
Yes |
(Empty) |
SPLITFOLDER="c:\temp" |
The path to the destination folder in which to output the newly split PDF files. |
Type |
Text (options) |
No |
Split in half |
|
The type of split that should be performed. The available options are:
|
Page number |
Number |
Yes if Type parameter is set to Split at |
(Empty) |
PAGE="2" |
The page number that the split should occur on. This parameter is active only if the Type parameter is set to Split at. |
Description tab - A custom description can be provided on the Description tab to convey additional information or share special notes about a task step.
Error Causes tab - Specify how this step should behave upon the occurrence of an error. (Refer to Task Builder > Error Causes Tab for details.)
On Error tab - Specify what AWE should do if this step encounters an error as defined on the Error Causes tab. (Refer to Task Builder > On Error Tab for details.)
Example
The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder.
Example 1
Split existing PDF "C:\temp\myDocument.pdf" into even and odd pages. Store split files into folder "C:\temp".
<AMPDF ACTIVITY="split" SOURCE="C:\temp\myDocument.pdf" SPLITFOLDER="C:\temp" SPLIT="even_odd" />
Example 2
Split existing PDF "C:\temp\myDocument.pdf" at page "2". Store split files into folder "C:\temp".
<AMPDF ACTIVITY="split" SOURCE="C:\temp\myDocument.pdf" SPLITFOLDER="C:\temp" SPLIT="split_at" PAGE="2" />