Hi there I am new to the forum and found some awesome examples already. Certainly the script that my question revolves around to. I am trying to convert all images in a folder to a pdf. The script I found only works when the folder selected but I want to specify the folder (to be replaced by a variable later because this be work on multiple folders in the end). I always get the error like this one
Here is a screenshot of my attempt so far
Doesn't work for me. I don't get any errors but also no results. If I change the folder in the beginning the tester (one level above) I get one PDF of one image. That's it. Is it possible that the Script works differently in Catalina, I'm still working on Mojave. Thanks for the quick response.
Did you try my macro, or modify the one you were originally using? Your original macro failed to include the convert script action inside the For Each loop that iterates over files, so it also only converted one file for me until I fixed that.
The weird behavior:
Working on 800+ images in a folder, the macro randomly renames 20+ pages from the images and then convert all images into a single PDF file. The result is that these 20+ pages are out of sequence. I have to reorder the pages.
I don't understand why the renaming actions are included in the macro. (Edit: removing the renaming actions seems to work well.)
@gglick, your macro works, but it converts each image into an individual PDF, not all images into a single PDF.
It looks like they want to build the PDF with the images in creation date order, rather than the default file-names-in-ASCII-sort order. That's what's causing all the extra steps -- if you just want to order by file name then you don't need to do much more than grab the path to the parent folder and use that in the Shell Script action.
Thanks for the info. I don't understand the shell script, I think I just copied it from a source in the forums that tried something similar. I never got it to work, probably because of the missing slash. If I remember correctly my goal was to convert a bunch of folders with 4-7 images into one pdf so I could mark them. Greatly appreciated feed back thanks
Note that convert isn't a stock macOS Unix tool, it's part of https://imagemagick.org, which is a huge, powerful, and complex command line tool for manipulating images in all sorts of ways. You won't be able to use the macro that references that script unless you install ImageMagick. And doing so can be complicated, depending on your level of comfort in Terminal—the easiest way is through Homebrew or MacPorts.
Files will be added in the same order as your Finder window sort -- in the above case, by date with newest first -- and the file will be named for the first image in the selection.