PDF Extract Attachments

Estimated reading: 3 minutes

The PDF Extract Attachments activity identifies, extracts, and saves embedded file attachments from a source PDF document to a specified local directory. You can configure the extraction by providing the source PDF path, the destination folder, and an optional password if the document is encrypted

Activity Canvas

PdfFilePath: Specify the full file path of the source PDF document from which attachments need to be extracted.  Accepts either a string variable or hardcoded text entered directly in the field.

OutputFolderPath: Specify the destination folder path where the extracted attachments will be saved. Accepts either a string variable or hardcoded text entered directly in the field.

Properties

Input

OutputFolderPath: Specifies the destination directory path where the extracted attachments will be saved. Accepts either a string variable or hardcoded text entered directly in the field.

Password: Specifies the password required to open the input PDF if it is password-protected. Accepts either a string variable or hardcoded text entered directly in the field.

PdfFilePath: Specifies the full path of the source PDF file from which attachments are to be extracted. Accepts either a string variable or hardcoded text entered directly in the field.

MISC

DisplayName: Specifies the display name of the activity in the workflow designer. The default value is PdfExtractAttachments.

SkipOnError: Specifies whether workflow execution continues when the activity encounters an error.
True: Continues workflow execution when an error occurs.
False: Stops workflow execution when an error occurs.
None: Uses the default value, False.

Version: Displays the version number of the PDF Automation package being used.

Output

ExtractedCount (Int32): Returns the total number of attachments extracted from the PDF document.

ExtractedFiles (List): Returns a list containing the full file paths of all successfully extracted attachments.

Result : Indicates whether the activity executed successfully.
True: The activity executed successfully.
False: The activity failed due to an unexpected error.

Example

To extract all embedded invoice files from a PDF and save them to a local folder for processing:

1. Add the PdfExtractAttachments activity to the workflow.
2. Enter the source PDF file path (for example, C:\Documents\MonthlyStatement.pdf) in the PdfFilePath property.
3. Enter the destination folder path (for example, C:\Documents\ExtractedInvoices) in the OutputFolderPath property.
4. Store the extracted file names or file paths in a List variable using the ExtractedFiles property.
5. Store the total number of extracted attachments in an Int32 variable using the ExtractedCount property.
6. Use a For Each activity to loop through the extracted files and perform the required actions on each attachment.

During execution, the activity extracts all embedded files from the PDF and saves them to the specified folder. The ExtractedCount property returns the number of files extracted, ExtractedFiles returns the list of extracted file paths, and Result is set to True when the extraction is successful.

Share this Doc

PDF Extract Attachments

Or copy link

CONTENTS
Robility Chatbot
Robility Assistant
Online