AtoM PDF thumbnail not working

After migrating AtoM to a new server, PDF thumbnails stopped generating when uploading PDF files.

You can regenerate thumbnail for a resource with the command

php symfony digitalobject:regen-derivatives --slug="slug-here"

https://www.accesstomemory.org/en/docs/2.7/admin-manual/maintenance/cli-tools/#regenerating-derivatives

When I run, I get error

$ php symfony digitalobject:regen-derivatives --slug="dd-2"
                                                                             
  Continuing will regenerate the derivatives for ALL digital objects (and    
  descendants of, if an information object)                                  
  "dd-2"                                                                     
  This will PERMANENTLY DELETE existing derivatives you chose to regenerate  
                                                                             
  Continue? (y/N)                                                            
                                                                             
y
>> digital object Regenerating derivatives for img108.pdf... (51.75s)
sh: convert: command not found
>> digital object Please update the search index manually to reflect any changes
>> digital object Done!
$ 

The error “convert: command not found” is due to ImageMagick not installed on the server, fixed by installing ImageMagick with the command

yum install -y ImageMagick

Next, I get the error

which: no pdfinfo in (/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin)

Fixed by installing poppler-utils

yum install -y poppler-utils

PDF thumbnail got regenerated after installing the packages ImageMagick and poppler-utils.

$ php symfony digitalobject:regen-derivatives --slug="dd-2"
                                                                             
  Continuing will regenerate the derivatives for ALL digital objects (and    
  descendants of, if an information object)                                  
  "dd-2"                                                                     
  This will PERMANENTLY DELETE existing derivatives you chose to regenerate  
                                                                             
  Continue? (y/N)                                                            
                                                                             
y
>> digital object Regenerating derivatives for img108.pdf... (2.07s)
>> digital object Please update the search index manually to reflect any changes
>> digital object Done!
$ 
Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *