Batch script: Photoshop CC convert PDF to Grayscale and Save

I need to convert 400 PDF’s to Grayscale and Re-Save.

The PDF files are on the network and they would be re -saved in place.

I was thinking a droplet might work?

Not sure how to go about this - I know its simple but My apple scripting is very rusty.

Maybe it would be easier to use adobe acrobat??

Thank you in advance R260

Maybe something like this?? would this work?? ( folder action script not a droplet)

on adding folder items to this_folder after receiving these_items
	repeat with theFile in these_items
		tell application "Adobe Photoshop CC 2018"
			open theFile
			set display dialogs to never
			set thisdoc to current document
			if (mode of thisdoc is not grayscale) then
				change mode thisdoc to grayscale
				save thisdoc
				close current document saving yes
			end if
		end tell
	end repeat
end adding folder items to

it converts the mode but doesn’t save the PDF without interaction. :frowning:

the workflow would be

  • the end user would drag the current PDF from the network onto the scriplet

  • the script would activate CC - which would perform the mode change (if necessary)

  • once CC finished it would save the PDF back to its original location on the network without interaction