This addon allows to preview attachments supported by http://viewerjs.org.

Currently, that's most Libreoffice files and PDFs.

.. image:: /attachment_preview/static/description/screenshot-split.png
   :alt: Screenshot of split form view
   :width: 100%
