PDF Image Preview¶
This function allows to show an image preview of a PDF file in attachments for tickets and knowledge base articles. This is helpful to display the content of a PDF without downloading the file.
Additionally the package offers the possibility for an image preview in dynamic fields of type attachment (for PDF files).
To use this feature, ImageMagick should be installed on the server that runs STORM.
Download and install ImageMagick. In the most recent versions of ImageMagick, the usage of PDF file is restricted. In order to allow the usage of PDF it is needed to update the ImageMagick configuration manually.
Search for the file
/usr/local/etc/ImageMagick-7/policy.xml(file path might vary depending on the ImageMagick version).
Check if the file contains a
Check if the entry contains at least
<policy domain="coder" rights="read" pattern="PDF" />
Go to the system configuration and search for the setting
Acivate the setting and enter the file path to the ImageMagick binary.
After installation of the package, the Attachments widget now displays an icon for the PDF files in the Preview column in addition to the regular ones for images audio and video files.
To see an image preview of the PDF:
- Open the ticket detail view or the knowledge base article detail view.
- Click on the preview icon for a PDF file at the widget Attachments.
The PDF is now displayed as an image in a small preview window. In case of, that the file is not really a PDF, the preview window displays nothing. In this case it is recommended not to download the PDF.
The displayed image of the PDF contains only the first page of the PDF.
Dynamic Fields of Type Attachments¶
If the OTRSDynamicFieldAttachment feature add-on is installed and a dynamic field has been added to a property card, the dynamic field contains an additional preview icon next to the download icon.
The PDF image preview feature can be used with this feature add-on whereever a dynamic field of type attachment is added to the system.