Jump to content

Choose watermark and add to PDF

Recommended Posts



I'm trying to create a workflow that adds a watermark to a PDF. I'd like to choose the watermark from a list but I'm not sure how to achieve this. Should I use a filter, a script-filter, or something else?


Steps are as follows:

1. Select PDF-file in Finder, use file-action on the PDF
2. Alfred should display a list with watermark options. Ideally this is a dynamic list, based on the watermarks it finds in a folder. A 'hard coded list' would also work.
3. Run a Ruby-script that adds the selected watermark (step 2) to the PDF (step 1).


I'm able to do steps 1 and 3, but can't figure out which Action/Filter/Utility I should use for step 2.


I've made a simple Ruby-script that queries a folder of Watermark-files and outputs them as Alfred-list-items (json-format). But I don't know how to connect it to the workflow as a second step.


Any help would be greatly appreciated.


Bart Visser

Link to comment

Hi all,

I was able to find a solution. I've looked at the Alfred PDF Tools-workflow before, but somehow overlooked the Crop action which basically laid out the steps I needed:

1. Invoke File-action on PDF
2. Save path to PDF in a variable (input_pdf)
3. Use List-item to choose the Watermark (another PDF-file)
4. Run Ruby-script that reads the variable (input_pdf) from the environment and the Watermark-file as ARGV[0].

Maybe this helps someone else who tries to do a similar thing.


Bart Visser

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...