Wp media regenerate --yes not working for PDF files

What version of PHP is being used on the site?

I’m not able to generate a preview of a PDF file even in the wp-admin, but I think that’s because of this bug related to Imagick in Local’s PHP lightning services:

The confusing part to me is that the error you mention references ghostscript which I think Imagick uses if present, so that makes me think that at least some of Imagick is working for you on your machine.