I'm using PDFTK to remove the password protection of PDF files and is working fine.
The problem is when the PDF password mismatch the one I've setup in the code.
The file simply disappear from switch
Can I set an error folder or some error notification for these cases?
This is my code:
Using PDFTK to remove password from PDFs
Re: Using PDFTK to remove password from PDFs
You are not at the latest version in Switch.
There is some new features now, among them you can set an exit code as Private Data.
If you use the Fail if exit code is "in range" you can catch the failed job in the Problems job folder and send it from there to some place in the flow. With the Private data exit code you can then sort the PDF.
To find in which range it gives the error code from PDFTK run it in Terminal with the wrong password and see what codes you get, use that code then in Switch range.
There is some new features now, among them you can set an exit code as Private Data.
If you use the Fail if exit code is "in range" you can catch the failed job in the Problems job folder and send it from there to some place in the flow. With the Private data exit code you can then sort the PDF.
To find in which range it gives the error code from PDFTK run it in Terminal with the wrong password and see what codes you get, use that code then in Switch range.
Re: Using PDFTK to remove password from PDFs
If you use "Run Command", then you can use the error out connection to sort out failed jobs.
https://www.enfocus.com/en/appstore/product/run-command
You will also need to have switch 2021 spring to run it.
https://www.enfocus.com/en/appstore/product/run-command
You will also need to have switch 2021 spring to run it.