You are on page 1of 17

Adobe PDF Services VBO

User Guide

Document Revision 1.5


Adobe PDF Services VBO - User Guide
Trademarks and copyright

Trademarks and copyright


The descriptions and screenshots contained in this document are licensed under the Creative Commons Attribution-ShareAlike
(CC-BY-SA) 3.0 license https://creativecommons.org/licenses/by-sa/3.0/.
© Blue Prism Limited, 2001 – 2022
®“Blue Prism”, the “Blue Prism” logo and Prism device are either trademarks or registered trademarks of Blue Prism Limited an d
its affiliates. All Rights Reserved
All trademarks are hereby acknowledged and are used to the benefit of their respective owners.
Blue Prism is not responsible for the content of external websites referenced by this document.
Blue Prism Limited, 2 Cinnamon Park, Crab Lane, Warrington, WA2 0XP, United Kingdom
Registered in England: Reg. No. 4260035. Tel: +44 870 879 3000. Web: www.blueprism.com

Commercial in Confidence Page ii


Adobe PDF Services VBO - User Guide
Contents

Contents
Trademarks and copyright .................................................................................................................... 2
Introduction .......................................................................................................................................... 2
Prerequisites ........................................................................................................................................ 3
Configuration ........................................................................................................................................ 6
Using the Asset..................................................................................................................................... 7
Create PDF ....................................................................................................................................... 7
Combine ........................................................................................................................................... 7
Compress ......................................................................................................................................... 8
Delete Single Page ............................................................................................................................ 8
Delete Page Range............................................................................................................................ 9
PDF To Word .................................................................................................................................... 9
Insert PDF Pages............................................................................................................................. 10
Linearize ......................................................................................................................................... 10
OcrPDF........................................................................................................................................... 11
ProtectPDF ..................................................................................................................................... 11
RemovePasswordFromPDF ............................................................................................................. 12
Replace PDF Pages ......................................................................................................................... 12
Rotate PDF Pages ........................................................................................................................... 13
Split PDF By Number of Pages ........................................................................................................ 13
Split PDF by Number of Files ........................................................................................................... 14
Support .............................................................................................................................................. 15

Commercial in Confidence Page iii


Adobe PDF Services VBO - User Guide
Introduction

Introduction
Portable Document Format or PDF has become ubiquitous. This asset will allow production and
manipulation of PDF files from inside of a Blue Prism integration. The benefits here are we are working
directly with Adobe PDF Services.

The ability to create, insert and replace pages in a PDF is a superb ability to add to your integrations.

Commercial in Confidence Page 2 of 15


Adobe PDF Services VBO - User Guide
Prerequisites

Prerequisites
The asset was created with Blue Prism V6.9 and later with V6.10.4. It should perform fine with versions
down to 6.5 but it has not been tested with those versions. With regards version 6.10.x there are some
changes to the internal architecture of Blue Prism that resulted in some changes to this asset.

You will need an Adobe Document Services account this can be setup here. You will also need to
acquire the Adobe.PDFServicesSDK dll which can be found on Nuget, this file needs to be copied to
your Blue Prism folder as shown in the image below.

The developer account will provide you with 1000 calls to test and build your integration, after this a paid
account will be required.

Update: Since autumn 2021, Adobe made some changes to the dll and as such there are several
dependencies that their dll requires. After much testing we have discovered that those files need to be in
the Blue Prism Limited application folder. You will need local administration permission to accomplish
this.

The files required are shown below.

Commercial in Confidence Page 3 of 15


Adobe PDF Services VBO - User Guide
Prerequisites

These files are provided by the NuGet package. Note that without these dependencies you will
experience strange errors that will relate to files in this list as being missing. It is recommended that you
only copy files that are missing. The reason being you may have other DLLs that have dependencies also
and they may be locked to specific versions. We have done some work in this example to mitigate that
issue. We recommend that you rename the file that is currently in your Blue Prism folder to a descriptive
name before you copy over any files.

For example, if you are using Blue Prism V6.10.x you will have a file called System.Buffers in your Blue
Prism folder. At the time of writing this file has an assembly version of 4.0.3.0. The version in the
AdobePDFServices dll uses the same version but there may be other components that use an earlier
version. This is what we have hoped to mitigate in this release. If you replace any dll files in the Blue
Prism folder, rename them as <dllname>.old, so in the above example System.Buffers.dll would become
System.Buffers.old. You will receive a warning about renaming a file may cause application problems,
this is fine as you will be replacing the System.Buffers.dll with another copy.

It may be that you will have to copy over other files if exceptions occur, make sure that this will not
cause issue with other automations that you have in place. If in any doubt, seek advice from your
automation centre of excellence.

There is an additional zip file, called PDF.zip, that contains a file structure made for the execution of the
example processes provided. This file requires extraction to the root of your C: drive, as this is where the
paths have been defined in the examples.

There is a folder for each action of the example, likewise there is an output directory in the output folder
for the results.

Commercial in Confidence Page 4 of 15


Adobe PDF Services VBO - User Guide
Prerequisites

The red looped items are the credentials and key that you get from Adobe, you must copy your own files
into this folder. It is where the example expects the files to be.

The yellow looped item is the output directory, this is where the results of each demo action will be
placed.

The blue looped item is a batch file that will reset the contents of the output directory. This allows you to
try them out, make changes and see the effects of your changes without having to delete lots of files
inside lots of folders. Note, it deletes the files, the folder structure will remain intact.

Commercial in Confidence Page 5 of 15


Adobe PDF Services VBO - User Guide
Configuration

Configuration
When you create your credentials for the Adobe PDF Tool SDK, there is an option to download the
samples and they are preconfigured with your credential details in a JSON file. Note that these are
Adobe’s samples and demonstrate the PDFServices, they are not related to the sample process that was
mentioned previously.

This method will provide you with a zip file, containing the Adobe SDK samples, these are the same as
what is available on Github. The difference here is they are pre-configured with your very own
credentials. This makes the task much easier and fewer files are required to be copied.

The file you need is called pdftools-api-credentials.json. This file is needed for each of the actions in this
asset. As such the asset is designed that you can copy the file to a location of your choice and then pass
in that file location. This allows you to place the file somewhere other than inside the Blue Prism folder.

Just one item to be aware of, depending on how you have constructed your filepaths, you may get an
exception stating that a part of the path couldn’t be found. In that case, check your filepaths for single ‘ \’
(backslash) this is the escape character and is used to place characters into strings that are otherwise
difficult to an example here might be ‘”’ quote marks, as they delimit a string. So, if your file path is for
example ‘C:\tmp\’, try it like this ‘C:\\tmp\\’.

Commercial in Confidence Page 6 of 15


Adobe PDF Services VBO - User Guide
Using the Asset

Using the Asset


There are 16 actions for this asset. Each one is explained below. All calls are non-destructive, as in they
will take an input file, perform the action, and produce a new output file.

Create PDF
Creates a PDF file from a supplied input file.

Input:
Name Description Data
Type
CredentialsFilePath The location of the credentials json file described above. Text
Filename The path to the document that is to be converted to PDF Text
OutputFilePath The destination filepath of the resulting PDF document. Text

Output:
Name Description Data
Type
ErrorMessage An error message from the resulting action. Empty message means all Text
OK.

Combine
This action will combine the files represented by Filepath1 and FilePath2 to create a new document at
the OutputFilePath.

Input:
Name Description Data
Type
Credentials FilePath The location of the credentials json file described above. Text
Filepath1 The base PDF file that is to be combined. Text
Filepath2 The PDF file being combined into file 1. Text
OutputFilepath The resulting PDF file. Text

Output:
Name Description Data
Type
ErrorMessage An error message from the resulting action. Empty message means all Text
OK.

Commercial in Confidence Page 7 of 15


Adobe PDF Services VBO - User Guide
Using the Asset

Compress
Reduces the size of a PDF file by compression

Input:
Name Description Data
Type
CredentialsFilePath The location of the credentials json file described above. Text
PDFFilePath The path to the document that is to be compressed. Text
OutputFilePath The destination filepath of the resulting PDF document. Text

Output:
Name Description Data
Type
ErrorMessage An error message from the resulting action. Empty message means all Text
OK.

Delete Single Page


This action will delete the single page represented by the PageNumberToDelete value.

Input:
Name Description Data
Type
Credentials FilePath The location of the credentials json file described above. Text
Filepath1 The base PDF file that is to be combined. Text
PageNumberToDelete The page to be removed. Number
OutputFilepath The resulting PDF file. Text

Output:
Name Description Data
Type
ErrorMessage An error message from the resulting action. Empty message means all Text
OK.

Commercial in Confidence Page 8 of 15


Adobe PDF Services VBO - User Guide
Using the Asset

Delete Page Range


This action will delete the page range represented by the DeletePageFrom and DeletePageTo values.

Input:
Name Description Data
Type
CredentialsFilePath The location of the credentials json file described above. Text
Filepath1 The base PDF file that is to be combined. Text
OutputFilepath The resulting PDF file. Text
DeletePageFrom The start of the page range to be deleted. Number
DeletePageTo The end of the page range to be deleted. Number

Output:
Name Description Data
Type
ErrorMessage An error message from the resulting action. Empty message means all Text
OK.

PDF To Word
Converts a PDF file to a Word Document (docx).

Input:
Name Description Data
Type
CredentialsFilePath The location of the credentials json file described above. Text
PDFFilePath The path to the PDF document that is to be converted. Text
DocxOutputPath The destination filepath of the resulting Word document. Text

Output:
Name Description Data
Type
ErrorMessage An error message from the resulting action. Empty message means all Text
OK.

Commercial in Confidence Page 9 of 15


Adobe PDF Services VBO - User Guide
Using the Asset

Insert PDF Pages


Converts a PDF file to an image (JPEG) file.

Input:
Name Description Data
Type
CredentialsFilePath The location of the credentials json file described above. Text
BaseInputFilePath The originating file that will have pages inserted. Text
OutputFilePath The path to the destination PDF document. Text
FileToInsert The File containing the pages to insert into the base file. Text
FirstInsertLocation The page number at which the insertion is to start. Number
FirstInsertPageRangeFrom The first page of the range of pages to insert. Number
FirstInsertPageRangeTo The last page of the range of pages to insert Number

Output:
Name Description Data
Type
ErrorMessage An error message from the resulting action. Empty message means all Text
OK.

Linearize
This action creates a linearized (web-optimized) PDF file. These types of files work better for incremental
access in network environments.

Input:
Name Description Data
Type
CredentialsFilePath The location of the credentials json file described above. Text
PDFFilePath The path to the PDF document that is to be processed. Text
OutputPath The destination filepath of the resulting PDF document. Text

Output:
Name Description Data
Type
ErrorMessage An error message from the resulting action. Empty message means all Text
OK.

Commercial in Confidence Page 10 of 15


Adobe PDF Services VBO - User Guide
Using the Asset

OcrPDF
This action performs an OCR operation on a PDF file and produces a new searchable PDF.

Input:
Name Description Data
Type
CredentialsFilePath The location of the credentials json file described above. Text
PDFFilePath The path to the PDF document that is to be processed. Text
OutputPath The destination filepath of the resulting PDF document. Text

Output:
Name Description Data
Type
ErrorMessage An error message from the resulting action. Empty message means all Text
OK.

ProtectPDF
This action converts a PDF file into a password protected PDF file.

Input:
Name Description Data
Type
CredentialsFilePath The location of the credentials json file described above. Text
PDFFilePath The path to the PDF document that is to be protected. Text
OutputPath The destination filepath of the resulting PDF document. Text
Password The password with which to protect the output document.

Output:
Name Description Data
Type
ErrorMessage An error message from the resulting action. Empty message means all Text
OK.

Commercial in Confidence Page 11 of 15


Adobe PDF Services VBO - User Guide
Using the Asset

RemovePasswordFromPDF
This action removes the password from a protected PDF file.

Input:
Name Description Data
Type
CredentialsFilePath The location of the credentials json file described above. Text
PDFFilePath The path to the PDF document that is to be unprotected. Text
OutputPath The destination filepath of the resulting PDF document. Text
Password The password with which to remove from the originating document.

Output:
Name Description Data
Type
ErrorMessage An error message from the resulting action. Empty message means all Text
OK.

Replace PDF Pages


This action will replace specific pages in a single PDF file.

Input:
Name Description Data
Type
BaseInputFilePath The originating file that will have pages inserted. Text
OutputFilePath The path to the destination PDF document. Text
CredentialsFilePath The location of the credentials json file described above. Text
ReplacementSourceFilePath The File containing the pages to replace into the base file. Text
PageToReplace The page number at which the replacement is to start. Number
ReplacementPageRangeFrom The first page of the range of pages to replace. Number
ReplacementPageRangeTo The last page of the range of pages to replace Number

Output:
Name Description Data
Type
ErrorMessage An error message from the resulting action. Empty message means all Text
OK.

Commercial in Confidence Page 12 of 15


Adobe PDF Services VBO - User Guide
Using the Asset

Rotate PDF Pages


This action will rotate specific pages in a single PDF file.

Input:
Name Description Data
Type
PDFFilePath The originating PDF file that will have pages rotated. Text
OutputPath The path to the destination PDF document. Text
RotationAngle The rotation angle of either 90,180 or 270 degrees. Number
CredentialsFilePath The location of the credentials json file described above. Text
PageRangeFrom The first page of the range of pages to rotate. Number
PageRangeTo The last page of the range of pages to rotate. Number

Output:
Name Description Data
Type
ErrorMessage An error message from the resulting action. Empty message means all Text
OK.

Split PDF By Number of Pages


This action splits a PDF file into multiple PDF file based on the maximum number of pages each of the
output files can have.

Input:
Name Description Data
Type
PDFFilePath The originating file that will be split. Text
OutputFilePath The path to the destination PDF documents. Text
CredentialsFilePath The location of the credentials json file described above. Text
SplitByPages The number of pages in each file.. Number

Output:
Name Description Data
Type
ErrorMessage An error message from the resulting action. Empty message means all Text
OK.

Note: There is a limit of 20 files for this action.

Commercial in Confidence Page 13 of 15


Adobe PDF Services VBO - User Guide
Using the Asset

Split PDF by Number of Files


This action splits a PDF file into multiple PDF file based on the filecount value.

Input:
Name Description Data
Type
PDFFilePath The originating PDF file that will be split. Text
OutputFilePath The path to the destination PDF documents. Text
CredentialsFilePath The location of the credentials json file described above. Text
FileCount The number of PDF files to split the base file into. Number

Output:
Name Description Data
Type
ErrorMessage An error message from the resulting action. Empty message means all Text
OK.

The output file path needs to be just a filename with no extension otherwise the files created will have
your extension followed by _n.pdf. The n represents a sequential file number. It might serve purpose to
enter the filename of the original file, without the .pdf extension.

Commercial in Confidence Page 14 of 15


Adobe PDF Services VBO - User Guide
Support

Support
This asset is provided free-of-charge by Blue Prism. Blue Prism does not provide formal support of this
asset. Please direct any questions you have, related to this asset, to the Digital Exchange Community
page:
https://community.blueprism.com/communities/community-home?CommunityKey=1e516cfe-4d1f-4de9-
a9eb-58d15bf38c81
This asset has additional code to support 6.10.x and beyond.

Commercial in Confidence Page 15 of 15

You might also like