I didn't get when the pdf preview formatter is available at /admin/structure/file-types/manage/document/file-display and when it is hidden. I have had installed pdf to image module (https://www.drupal.org/project/pdf_to_imagefield) for test purposes as I was seeking for a suitable module to display pdf previes (as images at least). It did the job and I was happy. But then I found file entity and found out, it could display the pdf document using the browsers built-in pdf display (at least with firefox and chromium, if they were set up to display pdfs). I was so happy with file entity that I disabled and uninstalled pdf to image module afterwards. But when it came to use file entity, the formatter pdf preview was no longer available and all pdf previews were displayed as links only. It took me more than three ours to find out, that pdf to image was needed to do the desired job. Even the configuration page at at /admin/structure/file-types/manage/document/file-display was borrowed from pdf to image (on the field configuration of a field using pdf to image widget).

But you can't use pdf to image and file entity on the same field to e.g. display the teaser as an image field (provided by pdf to image) and in full view display the pdf itself, as pdf to image requires to use the pdf to image widget whereas file entity uses its own widget.

So my question is: what are the prerequisites to use the pdf preview formatter in file entity?

I also will ask a similar question in the pdf to image issue queue whether pdf to image intentionally provides additional functionality to file entity or "accidentally".

Comments

Pepe Roni created an issue.