Overview
Overview
You can control PDF documents using the features provided by the PDF library.
The features provided by the PDF library are as follows:
Extracting text strings in a PDF document: ExtractTextFromPdf
Extracting images from a PDF document: ExtractImageFromPdf
Converting a PDF document into images: ExportPdfToImage
Searching for text strings in a PDF document: SearchTextFromPdf
Searching for and returning the page numbers in a PDF document: GetPdfPageCount
Merging PDF documents: MergePdf
Separate PDF documents into multiple files: SplitPdf
Use Designer or File Explorer to refer to the samples of the PDF library.
• On Designer: Menu > Help > Sample > Sample > PDF
• On File Explorer: C:\Users\user\AppData\Roaming\Brity RPA Designer\samples\PDF
Common Properties
Common Properties
MORE OPTIONS
Properties | Type | Required | Unit | Auto-setting | Description |
---|---|---|---|---|---|
On Error | Combination box | N | - | N | Specify an action to carry out when an error occurs at the time of execution. - If not specified: Output errors and exit the task. - --Ignore--: Ignore the error. - --Retry--: Try the activity one more time. - --Goto--: Try the scenario for the specified time if the activity fails. - _Event: Select an event created within the project. If a handler is specified: Call the specified handler. |
DESCRIPTION
Properties | Type | Required | Unit | Auto-setting | Description |
---|---|---|---|---|---|
DESCRIPTION | Text | N | - | N | Enter the description for the activity card. The description entered in the DESCRIPTION field is used as the description of the activity. A representative value will be displayed in the absence of the DESCRIPTION input. |
ExportPdfToImage
ExportPdfToImage
Overview
This activity card saves the specified PDF document as image files.
Application procedures
In the PDF File field, enter the path and name of the target PDF file to save as an image files.
In the Target Directory field, enter the path and name to save the converted image files.
In the Password field, enter the password of the PDF document.
In the Range field, enter the page range of the PDF document to save as image files.
Set the Image Format property to select the format of the saved image files.
Card properties
Common | Properties | Type | Required | Unit | Auto-setting | Description |
---|---|---|---|---|---|---|
N | PDF File | String | Y | - | Y | Enter the path and file name of the target PDF file. |
N | Target Directory | String | Y | - | Y | Enter the path and name to save the converted image files. |
N | Password | String | N | - | N | Enter the password of the PDF document. |
N | Range | String | Y | - | Y | Enter the page range of the PDF document. |
N | Image Format | Image | Y | - | Y | Select the format of the saved image files. |
Example of utilization
Convert from page 2 through the last page of the specified PDF file into “.png” image files.
Used properties
PDF File = 'D:\\pdf-example-password_test.pdf'
Target Directory = 'D:\\Images'
Password = 'test'
Range = '2-end'
Image Format = Png
Related/Similar activities
ExtractImageFromPdfSearchTextFromPdfExtractTextFromPdfGetPdfPageCount
ExtractImageFromPdf
ExtractImageFromPdf
Overview
This activity card extracts images from a specified PDF document and returns them as a list.
Application procedures
In the [Output] Images field, enter the variable to store the extracted list of image objects.
In the PDF File field, enter the path and name of the target PDF file to extract the list of image objects.
In the Password field, enter the password of the PDF document.
In the Range field, enter the page range of the PDF document to extract the list of image objects.
Card output properties
Property | Type | Additional comments | Description | Example |
---|---|---|---|---|
Images | One-dimensional array | Bitmap | Returns an array of images (Bitmap) extracted from the specified PDF File . | 0: Page1 Image 1: Page2 Image |
Card input properties
Common | Properties | Type | Required | Unit | Auto-setting | Description |
---|---|---|---|---|---|---|
N | PDF File | String | Y | - | Y | Enter the path and file name of the target PDF file. |
N | Range | String | Y | - | Y | Enter the page range of the PDF document. |
Example of utilization
Extract the images on pages 11 through 20 of the specified PDF file and return the list of the image objects.
Used variables
RESULT: Variable to store the list of image objects
Used properties
PDF File = 'D:\\Documents\\HMM.pdf'
Password = ''
Range = '11-20'
Related/Similar activities
ExportPdfToImageSearchTextFromPdfExtractTextFromPdfGetPdfPageCount
SearchTextFromPdf
SearchTextFromPdf
Overview
This activity card returns the page number of a specified PDF document where the specified text string is located.
Application procedures
In the [Output] Page Info field, enter the variable to store the searched page.
In the PDF File field, enter the path and name of the target PDF file to search for the text string.
In the Match Option field, select the option required.
In the Password field, enter the password of the PDF document.
In the Range field, enter the page range of the PDF document to search for the text string.
In the Text For Search field, enter the text string to search for.
Card output properties
Property | Type | Additional comments | Description | Example |
---|---|---|---|---|
Images | One-dimensional array | Int | Returns the page number to which a specific string ( Text For Search ) belongs in the specified PDF File . | 0: 1 1: 4 2: 5 |
Card input properties
Common | Properties | Type | Required | Unit | Auto-setting | Description |
---|---|---|---|---|---|---|
N | PDF File | String | Y | - | Y | Enter the path and file name of the target PDF file. |
N | Match Option | Toggle button | N | - | Y | Select the Match Option: - Match Case - None - MatchWholeWord |
N | Range | String | Y | - | Y | Enter the page range of the PDF document. |
N | Text For Search | String | Y | - | Y | Enter a string to search. |
Example of utilization
Within the range of pages 2 through 10 of the specified PDF file, return the page numbers that include the searched text string as a list.
Used variables
RESULT: Variable to store the list of searched page numbers
Used properties
PDF File = 'D:\\Documents\\HMM.pdf'
Password = ''
Match Option = None
Range = '2-10'
Text For Search = 'HMM'
Related/Similar activities
ExportPdfToImageExtractImageFromPdfExtractTextFromPdfGetPdfPageCount
ExtractTextFromPdf
ExtractTextFromPdf
Overview
This activity card extracts text strings from a specified PDF document and returns them.
Application procedures
In the [Output] Text field, enter the variable to store the extracted text string.
In the PDF File field, enter the path and name of the target PDF file to extract the text string.
In the Password field, enter the password of the PDF document.
In the Range field, enter the page range of the PDF document to search for the text string.
Card output properties
Property | Type | Additional comments | Description | Example |
---|---|---|---|---|
Text | One-dimensional array | String | Returns a string extracted from the specified PDF File. | 0: 'Page1 Contents' 1: 'Page2 Contents' |
Card input properties
Common | Properties | Type | Required | Unit | Auto-setting | Description |
---|---|---|---|---|---|---|
N | PDF File | String | Y | - | Y | Enter the path and file name of the target PDF file. |
N | Range | String | Y | - | Y | Enter the page range of the PDF document. |
Example of utilization
Extract all text strings on all pages of the specified PDF file and return them.
Used variables
RESULT: Variable to store the extracted text string.
Used properties
PDF File = 'D:\\Documents\\HMM.pdf'
Password = ''
Range = 'All'
Related/Similar activities
ExportPdfToImageExtractImageFromPdfSearchTextFromPdfGetPdfPageCount
GetPdfPageCount
GetPdfPageCount
Overview
This activity card returns the total number of pages in a specified PDF document.
Application procedures
In the [Output] Page Numbers field, enter the variable to store the total number of pages in the PDF document.
In the PDF File field, enter the path and name of the target PDF file to search for.
In the Password field, enter the password of the PDF document.
Card output properties
Property | Type | Additional comments | Description | Example |
---|---|---|---|---|
Page Numbers | Int | - | Returns the total number of pages in the specified PDF File | 3 |
Card input properties
Common | Properties | Type | Required | Unit | Auto-setting | Description |
---|---|---|---|---|---|---|
N | PDF File | String | Y | - | Y | Enter the path and file name of the target PDF file. |
Example of utilization
Return the total number of pages in a specified PDF document.
Used variables
None
Used properties
PDF File = 'D:\\Documents\\HMM.pdf'
Password = ''
Related/Similar activities
ExportPdfToImageExtractImageFromPdfSearchTextFromPdfExtractTextFromPdf
MergePdf
MergePdf
Overview
All PDF documents in the specified folder are merged and saved as a PDF document with the specified name.
Application procedures
1. Enter the directory path where the PDF to be merged exists in the Source Directory.
The merging method follows the three rules below.
1-1. You can order pages into subdirectories within a directory.
Use the PDF by inserting it inside the folder with the page order as the folder name as shown below.
1-2. If there is no subfolder, pages are allocated in order of name.
1-3. When subfolders and PDFs are mixed, the folders are processed first, and the remaining PDFs are assigned pages by name.
2. Enter the file path of the resulting merged PDF in the Merged Pdf Path.
3. Enter whether to overwrite when there is already a merged PDF in Overwrite.
Card properties
Common | Properties | Type | Required | Unit | Auto-setting | Description |
---|---|---|---|---|---|---|
N | Source Directory | String | Y | - | N | Enter the directory path where the PDF to be merged resides. |
N | Merged Pdf Path | String | Y | - | N | Enter the file path of the resulting merged PDF. |
N | Overwrite | Toggle button | Y | - | Y | Enter whether to overwrite the merged PDF if it already exists. |
Example
All PDF documents in the specified folder are merged and saved as a PDF document with the specified name.
Used variables
None
Used properties
Source Directory = 'D:\\merge'
Merged Pdf Path = 'D:\\merged.pdf'
Overwrite = true
Related/Similar activities
SplitPdf
SplitPdf
Overview
This activity card divides the specified PDF document into multiple files.
Application procedures
Enter the path and filename of the PDF file to be separated into the PDF File.
Enter the path to save the separated files in the Target Directory.
Please select whether to divide the PDF document evenly in Equal Division.
Enter the number of pages to save per file (if Equal Division is active) or the page range (if Equal Division is disabled) in the Page Count Or Ranges.
Enter whether to overwrite when there is already a separate PDF in Overwrite.
Card properties
Common | Properties | Type | Required | Unit | Auto-setting | Description |
---|---|---|---|---|---|---|
N | PDF File | Text | Y | - | N | Enter the path and filename of the PDF file to be separated. |
N | Target Directory | Text | Y | - | N | Enter the path to store the separated files. |
N | Equal Division | Toggle button | Y | - | Y | Select whether to split the PDF document equally. |
N | Page Count Or Ranges | Text | Y | - | N | Enter the number of pages to save per file (if Equal Division is active) or page range (if Equal Division is disabled). |
N | Overwrite | Toggle button | Y | - | Y | Enter whether to overwrite the separated PDF document when it already exists. |
Example of utilization
Split the specified PDF document into multiple files.
Used variables
None
Used properties
PDF File = 'D:\\Documents\\HMM.pdf'
Target Directory = 'D:\\pdfTest'
Equal Division= true
Page Count Or Ranges = 2
Overwrite = true
Related/Similar activities