cancel
Showing results for 
Search instead for 
Did you mean: 

How to print PDF with a specific printer

lorenzwagner
Level 4

Hello, I have the following problem/question. How can I print a PDF (not opened but location known) via an action phase? I have a list of printers, whereby I have information about the printers in a collection stage. How can I implement this and what information about the printers do I need in order to be able to select them specifically?

28 REPLIES 28

Hi,

This is moving beyond simple printing. For this you would need to open the PDF and physically access its contents. This isn't likely to be something available for free, I know the Adobe PDF services offer this but you would need to subscribe to it. We do have assets that work with these Adobe services. However, in order to actually action this you would have a number of documents, possibly held in a collection that contains the paths to the documents that you wish to print. This collection would drive the loop which would contain a number of pdf pathnames and as such have decisions that would be met after examining each document. From there you would just select the required printer, based on the criteria you have defined in the condition. It would be a case of setting a text data item to the name of the printer you wanted to use. The complexity here is actually opening the document and finding your criteria from which you would select the printer. The actual printing is now quite simple.

I hope this explains, roughly, what would be needed.

regards

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

@GeoffHirst I see, well actually we already implemented that logik to identify the text in the pdf. Lets say we temporarily saved this number in a data-item. We now check with a caluclation stage wheter this number is equal to "123". assuming it is not, we then check if it is "456". We found that it is, and have a data-item "Is 456?" with a Yes Flag. How do i get yout process to use the second row in the newly created collection stage to use the seond printer? Using Col.Printer Name.Row(2) as the input for printing didnt work.

GeoffHirst
Staff
Staff

Hi @lorenzwagner ,

You might need to take a look at the Collection Manipulation asset. This has the ability to locate a specific value dependent on a row ID. I would say that this will be a kind of 'hard coding' because the row ID of a printer, may change if you add or remove printers from the system. Just bear this in mind.

I hope this helps you take your solution forward.

regards

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

@GeoffHirst - I am getting below error and blue prism is getting crashed while using this VBO “Function - PDF Printer” in Blue Prism v7.1.1 x64 bit. Actually I don’t see x64 folder for blue prism v7.1.1 under C:\program files\Blue prism Limited\Blue Prism Automate\ so I have placed pdfuim.dll in the base automate folder. Could you please help here.

Error: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

Hi @MohammedNissarK,

Thank you for being a SS&C Blue Prism customer, and for using Blue Prism. If you have no x64 folder in your Blue Prism folder, create one and add in the pdfium.dll file into it. 

If you are still experiencing issues after doing this, come back to me on here and we will see what else we can explore.

Thanks again for using Blue Prism and your interest in the PDF Printer asset.

regards

Geoff Hirst

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

Hi @GeoffHirst ,

Thank you for prompt response. 

I have already tried adding folder as x64 and placed pdfium.dll file. But still experiencing the same issue. Could you please suggest how to resolve this issue. 

GeoffHirst
Staff
Staff

Hi @MohammedNissarK ,

I am sorry you are still having issues with the asset. However, I think I have a solution for you. You state you are using Blue Prism 7.1.1, This will be 32-Bit as true 64-Bit was not available until V7.3. So, I need to amend the documentation for the asset to explain how to use this asset in 32-Bit scenarios, as it currently isn't clear. 

To assist you, please look at the following download.

https://www.nuget.org/packages/PdfiumViewer.Native.x86.v8-xfa/

Download this package as a nupkg and rename it with a .zip extension. Extract the contents and in the build folder you will find an x86 (32-bit folder) inside there is the 32-bit version of Pdfium.dll. I am sure this will resolve your problem. So, copy that file into the x86 folder inside your Blue Prism folder, if you do not have a x86 folder, please create one and copy the file into it.

From here you should be good to go. You might also consider removing the x64 folder you created as it will not have any use for the Blue Prism version you are using.

In the meantime, I will update the documentation for this asset to clarify this issue.

Thank you for bringing this to my attention, it is appreciated.

regards

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

MohammedNissarK
Level 4

@GeoffHirst Thank you so much for the quick support 😊 . Now I am able to print the PDF in BP version 7.1.1. Also verified same in BP 6.10 and its working.

Thank you,

Mohammed Nissar K

GeoffHirst
Staff
Staff

Hi @MohammedNissarK ,

I am so pleased we have managed to solve your issue, but sorry that you had the issue in the first place. As I said I would update the documentation for this scenario as it simply was not clear what was needed in the event of a 32-bit architecture. This is now done and the update documentation is now on the Digital Exchange. 

Thank you for your kind reply.

regards

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

lorenzwagner
Level 4

Dear @GeoffHirst . I am currently facing a weird problem. Your VBO works like a charm on my PC, but whenever I try to employ it on my working machine (or VM), BluePrism just crashes whenever I get to the printing stage. Sadly I am not left with any error message, it just crashes. I even disabled any firewall and I have no clue why it does not work. Do you have any idea why that could be, any Windows settings that could lead to this behavior?