Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
RESUELTAS

Need help with the Command tool

Hakimipous
Bola de fuego

Hello everyone

 

Last week I was asking how to put a password on a pdf output and it seems (thanks to @jrgo that the cpdf exe is the way to go).

 

I did try it on Windows via the Command pront and it works fine.

 

here is what the command looks like: 

 

"C:\Users\XXX\Desktop\New folder\cpdf.exe" -encrypt AES  "test"  "test" -i "C:\Users\XXX\Desktop\New folder\JohnSmithResume.pdf" -o "C:\Users\XXX\Desktop\New folder\out.pdf"

 

So basically it takes the file JohnSmithResume.pdf, create a duplicate called "out" with the password "test"

 

 

Now where I'm stuck is to make it run on Alteryx via the Command tool. I'm fairly new with this so there is still a lot to learn about, but after reading a bit I've created a workflow where I tried to based on other workflow I've seen, only it doesn't work as it should. My difficulty is that I'm using a formula tool prior to the command tool because I will need the argument to be dynamic. (have to create different password for different files)

 

I'm uploading here my workflow and file if anyone could give me some light on what I have to change. 

 

Thanks again! 

 

 

12 RESPUESTAS 12
sophabraham95
Meteoro

Hi @Hakimipous 

I tried your solution, but I could not get it to run and am stuck with the below error -

"Error: Run Command (5): The external program "C:\Users\XXXX\Downloads\ReadPDF\passBat.bat" returned an error code: 2"

I just need to encrypt one pdf file. 

cycyg
Meteoro

Hi @sophabraham95 and @Hakimipous ,

Did anybody managed to solve it? 

Would appreciate your help in this since I am working on a project that sends PDF files to our clients with respective encrypted passwords.


Samantha_Jayne
Alteryx
Alteryx

Hi all, I know this is often a topic of discussion, I have pulled on points together into one workflow which should be portable. I tested it on my machine in a different folder. Update passwords in formula tool, or adjust to meet your use case.

 

 

Samantha Clifton
Alteryx
#alteryxrocks
Etiquetas