Skip to main content

Automator service does not work from Finder [Resolved]

I have an Automator service that accepts multiple pdf files, converts them to pngs while converting a white background to transparent, and then uses a Quartz filter to invert the color of the png file.

To test the workflow, I added the Get Selected Finder Items action to pass the pdfs to the service. Everything works exactly as expected in this case.

Service works when adding selected files in the workflow

However, when I remove this action, and then use the service from the Finder services, it does not work. All of the variables point to the correct files, but the bash script does not write any files, which can thus not be passed to the Quartz action.

Service does not work from Finder

Any ideas as to how to fix this?

[EDIT] I have added the warnings. I think this goes wrong because when running the workflow from Automator I cannot provide input the second way.

[EDIT 2] @boris42 pointed out that I did not add the requirement for the transparent background to my question, so I added it now.

Log for second method

Question Credit: Corollary
Question Reference
Asked May 14, 2018
Posted Under: Apple
2 Answers

Here is a simple Automator Finder Service that will do what I understand you're trying to do. It will render PDF pages with 200 dpi as PNG images then invert colours in them.

Automator PDF service

You will notice that I left the Show this action when workflow runs turned on so you can specify the folder you want the PNG files to be in.

Here is a test 3-page PDF file and the output this service generates:

test PDF

PNG files output:

PNG file output

credit: boris42
Answered May 14, 2018
Your Answer