I wrote a script that crops PDFs that contain images, and it can be found in post 3 of:
https://macscripter.net/viewtopic.php?pid=211623#p211623
The script generally works as I want, but it is very slow, and one line that appears problematic is in the cropImage handler:
set theData to theImage's TIFFRepresentation()
I looked at the TIFFRepresentation documentation and it contains the following:
So, the thought occurred to me that converting a PDF to a TIFF may simply take some time. However, I wondered if a forum member might look at that handler to see if anything is amiss. Thanks for the help.