cancel
Showing results for 
Search instead for 
Did you mean: 

Blue prism PDF Toolkit VBO - Need information

ParnabSinha_Cho
Level 5
I saw that Blue prism launched PDF Toolkit VBO in Digital Exchange. We are planning to use the same to deal with invoices. To proceed do we need ADOBE READER PRO installed as well or Adobe Document Services account will be enough for the same?

------------------------------
Parnab Sinha Choudhury
RPA Developer / Business Analyst
------------------------------
Parnab Sinha Choudhury RPA Developer / Business Analyst
16 REPLIES 16

Hi Geoff,

Thank you for your response.

Yes, I'm using the latest version of the asset (To be sure I tested after re-importing the new bprelease as well).
28211.png

And the latest stable version of AdobePDFServicesSDK is 2.2.1 which I am trying to use28212.png28213.png

And I can see a similar global code.
28214.png


------------------------------
If I was of assistance, please vote for it to be the "Best Answer".

Thanks & Regards,
Tejaskumar Darji
Sr. Consultant-Technical Lead
------------------------------

Tejas,

Sorry for the delay in responding. I now have it all working on 6.10.4. It took me some time because the machine I have this version of BP running on, is my own laptop. Now, I have System.Buffers version 4.0.3.0. The Adobe PDF Services dll expects version 4.0.2.0 hence we have the redirect in code. Can you check the initialisation page, I am sure it is there but there should be code like this in the code stage.

Version version = new Version(4,0,3,0);
string publicKeyToken = "cc7b13ffcd2ddd51";
RedirectAssembly("System.Buffers", version, publicKeyToken);​


This is the code that calls the routine I mentioned earlier. Now, in your Blue Prism Automate folder, can you check the version of System.Buffers? I am guessing you are on Windows 11 as that now seems to show only the file version and not the actual assembly version. You may need to acquire a tool to check the actual assembly version and for this I use a tool called .NET Dependency Walker by WorkShell. It is a paid product, but there is a trial period.

I am hoping that with this information, you will be able to resolve your issues, please come back to me if you need further assistance.




------------------------------
Geoff Hirst
Senior DX Engineer - Digital Exchange - EMEA
SS&C Blue Prism
------------------------------
Geoff Hirst Senior DX Engineer - Digital Exchange - EMEA SS&C Blue Prism

Hello @Geoff Hirst & @devneetmohanty07

IT IS WORKING NOW!

Actually, we were running it from the action/sub-page itself for the sake of testing purposes.

And when you mentioned in your final comment that there is code at the Initialise stage to manage the DLL version discrepancy, it sparked a thought because we were running directly from Action, therefore this code was never executed.

As a result, when we ran from the process layer, it began to work for us.

I'm using WIN10 and System.Buffer supplied by default from Blue Prism is V4.6.28619.1 and that is what I kept and it worked!


​​

------------------------------
If I was of assistance, please vote for it to be the "Best Answer".

Thanks & Regards,
Tejaskumar Darji
Sr. Consultant-Technical Lead
------------------------------

@Tejaskumar_Darji or @GeoffHirst or @devneetmohanty07 ,Hi All,

After doing all those steps mentioned in the above threat I am facing the below error and unable to use the PDF Toolkit, I actually dont know what i am missing. details are below please help me to resolve the issue. Do we need a licensed adobe acrobat reader version installed in the workstation to utilize this vbo?

Error Message:
Exception encountered while executing operation: Adobe.PDFServicesSDK.exception.SDKException: Error while reading the config file C:\PDF\\pdftools-api-credentials.json ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\PDF\pdftools-api-credentials.json'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
at System.IO.File.ReadAllText(String path)
at Adobe.PDFServicesSDK.core.util.JsonUtil.GetTokenFromFile(String configFilePath)
--- End of inner exception stack trace ---
at Adobe.PDFServicesSDK.core.util.JsonUtil.GetTokenFromFile(String configFilePath)
at Adobe.PDFServicesSDK.auth.ServiceAccountCredentials.Builder.FromFile(String credentialsFilePath)
at Blue_Prism___PDF_Toolkit.CombinePDF(String CredentialsFilePath, String Filepath1, String Filepath2, String OutputFilepath, String& ErrorMessage)

Global Code:

private static PageRanges CreateSinglePageRange(int pageNumber)
{
// Specify pages for deletion.
PageRanges pageRange = new PageRanges();
// Add page 1.
pageRange.AddSinglePage(pageNumber);


return pageRange;
}

private static PageRanges CreatePageRange(int fromPage, int toPage)
{
// Specify pages for deletion.
PageRanges pageRange = new PageRanges();
// Add pages from and to.
pageRange.AddRange(fromPage, toPage);

return pageRange;
}

public static void RedirectAssembly(string shortName, Version targetVersion, string publicKeyToken) {
ResolveEventHandler handler = null;

handler = (sender, args) => {
// Use latest strong name & version when trying to load SDK assemblies
var requestedAssembly = new AssemblyName(args.Name);
if (requestedAssembly.Name != shortName)
return null;

requestedAssembly.Version = targetVersion;
requestedAssembly.SetPublicKeyToken(new AssemblyName("x, PublicKeyToken=" + publicKeyToken).GetPublicKeyToken());
requestedAssembly.CultureInfo = CultureInfo.InvariantCulture;

AppDomain.CurrentDomain.AssemblyResolve -= handler;

return Assembly.Load(requestedAssembly);
};
AppDomain.CurrentDomain.AssemblyResolve += handler;
}

Initialize page code:

Version version = new Version(4,0,3,0);
string publicKeyToken = "cc7b13ffcd2ddd51";
RedirectAssembly("System.Buffers", version, publicKeyToken);

Blue Prism Version:  7.1.0.62280

28230.png
Tried all the ways as much as I can do but getting the same error and in my workstation visual studio 2017 is installed .
Is there anything needs to be installed or managed in settings to make this run on PDF combine please let me know.

Note: recently we upgraded the BP version to new one till that   SabanciDx - Daily PDF Actions but after upgrade its not working so we planning to move on to this standard pdf handler from Blue prism hope i will get a permanent solution.



------------------------------
Gopinath Venkatesan
------------------------------

HI Gopinath,

Thank you for being a SSC Blue Prism Customer and for your interest in the PDF Toolkit VBO.

If you look at the first line of your error, the toolkit is unable to locate the pdftool-api-credentials.json file. You can generate this file from the Adobe Developer website. It is currently looking for it in a folder called "C:\PDF".

I think if you can resolve this issue, you will be able to progress.

Please come back to me if you have further issues.

Thank you for using Blue Prism.

regards

------------------------------
Geoff Hirst
Senior DX Engineer - Digital Exchange - EMEA
SS&C Blue Prism
------------------------------
Geoff Hirst Senior DX Engineer - Digital Exchange - EMEA SS&C Blue Prism

Hi @GeoffHirst ,

I signed up in Adobe developers portal and trying to find the dll or package related to C:PDF but i couldn't find anything there.

could you please share me a link if you have i can directly access to download the needed components? if i dont have access and keep searching wont help i think so that requesting your support on link.

Thanks in Advance.
Regards,
Gopinath.V​

------------------------------
Gopinath Venkatesan
------------------------------

Hi Goprinath,

The link you need is https://developer.adobe.com/console/home now I suggest you follow the API documentation as it explains what you need to do to build your own unique set of api credentials. This page should help you on your way. https://developer.adobe.com/document-services/apis/pdf-services/

regards

------------------------------
Geoff Hirst
Senior DX Engineer - Digital Exchange - EMEA
SS&C Blue Prism
------------------------------
Geoff Hirst Senior DX Engineer - Digital Exchange - EMEA SS&C Blue Prism