Creating PDF previews


In this tutorial we will introduce you to a way to simplify the handling of new tickets that have PDF files attached.

In many cases it is necessary to open a PDF attachment to classify a ticket and opening the attachment in a new window or a PDf reader application is time consuming.

In todo4teams you may use a single line of JavaScript to generate an image preview of the PDF and display it directly in the ticket's description; the original attachments are of course retained and are part of the newly created ticket.

An example of such a generated image preview of an attached file:

image-20241212101113-1.png

To achive this please open the mailbox's configuration and add this line of code to the 'Receive Script':

helper.insertPDFPreviews(2);

The parameter (2) sets the maximum number of pages to be inserted into the text - some PDF files might have hundreds of pages and to classify the content it's sufficient to see one or two pages !