Thumb Preview PDF as PNG in ticket history?

Instead of a text link in ticket history for attached PDFs to
"Download somefile.pdf," I would like to show these as thumbnail
images that preview the first page of the document, similar to how
regular attached images are shown in history.

Converting a PDF document into a PNG image seems easy with ImageMagick

convert -density 600x600 -resize 800x560 -quality 90 $file `echo

$file|cut -f1 -d’.’`.png

Does anyone know what code RT would need to make this change? I think
it might be another “elseif” at the end of
html/Tickets/Elements/ShowTransactionAttachments but don’t have a clue
how to invoke the conversion and output the result.

Allen