PDF Previews are not generated

Hey everyone. I am running nextcloud 15.0.5.3 with NextcloudPi v1.11.2 on a RaspberryPi 3 Model B+. I did a fresh setup of the whole system an hour ago.

The Preview for the files present in my nextcloud is working. Except for PDFs.

I added the following lines to my config.php file in …/nextcloud/config/

'enable_previews' => true,
'enabledPreviewProviders' => array (
   'OC\Preview\PNG',
   'OC\Preview\JPEG',
   'OC\Preview\GIF',
   'OC\Preview\BMP',
   'OC\Preview\XBitmap',
   'OC\Preview\MP3',
   'OC\Preview\TXT',
   'OC\Preview\MarkDown',
   'OC\Preview\PDF'
),

However, the preview for .pdf files is not generated. When I remove one of the array lines (e.g. The JPEG line) the preview for the given file type is no longer shown. Thus. I assume that the files and the lines are read correctly. I am relatively new to setting up my nextcloud server and right now I am lost with the pdf file preview generation.

Maybe see my answer here :slight_smile: .

Thanks a lot, I searched previously but apparently missed that topic.
Your suggestion fixed the issue.

In addition to the changes to the config.php file i used
sudo apt-get install ghostscript
to install ghostscript. Afterwards .pdf files did show a preview thumbnail

PDFpreview

Thanks a lot!

bump - same problem here on Nextcloud 16.0.1 on Ubuntu 18.04 LTS server (not snap). Have updated config.php and installed ghostscript and imagemagick. Thanks in advance

I note that the doc says this is not supported, but the demo has it…

Add a policy to Imagick does the Job.