Project

General

Profile

Plugins Directory » Redmine More Previews

Author: Stephan Wenzel
Website: https://github.com/HugoHasenbein/redmine_more_previews
Code repository: https://github.com/HugoHasenbein/redmine_more_previews
Registered on: 2020-11-13 (about 4 years ago)
Current version: 5.0.8
Compatible with: Redmine 5.0.x, 4.2.x, 4.1.x, 4.0.x, 3.4.x
User ratings:   (17)

Preview various file types in redmine's preview pane. Works for issue attachments, documents module, files module and repositories.

As of version 4.1.3 per project activation of plugin is supported

This plugin is designed to work with own plugins. That is plugins for plugins. To preview files this plugin converts the previewed file content to either

  • pdf
  • png, jpg or gif
  • html or inline html
  • text, or
  • xml

The appropriate conversion type(s) is/are up to the plugin developer. The available conversion option can be chosen on the plugin configuration page. The plugin was developed with thread safety in mind. With caching enabled, it should stand even higher loads.

Currently, there exist the following plugins:

This plugin requires LibreOffice to be installed on your system. LibreOffice must be reachable with "soffice" to the user, the redmine service is executed by.

Libre uses LibreOffice to do the conversion. Libre converts almost everything LibreOffice can convert:

.csv , .doc , .docm , .docx , .dotm , .dotx , .fodg , .fodp , .fods , .fodt , .odb , .odc , .odf , .odg , .odi , .odm , .odp , .ods , .odt , .otg , .oth , .otp , .ots , .ott , .oxt , .potm , .potx , .ppt , .pptm , .pptx , .rtf , .sda , .sdc , .sdd , .sdp , .sds , .sdw , .sgl , .smf , .stc , .std , .sti , .stw , .sxc , .sxd , .sxg , .sxi , .sxm , .sxw , .vor , .xls , .xlsm , .xlsx , .xltm , .xltx

to either pdf, html, inline, png, jpg or gif.

Please note, that not all conversions have been thoroughly tested yet. Please send files for a conversion test to me, if you are uncertain if your files get converted an can be viewed in a browser. Further, please note that the conversion accuracy strongly depends on the availability of installed fonts. Please consult the LibreOffice portals to see how to install fonts.

Currently, thoroughly tested are: .csv, .doc, .docx, .ppt, .pptx, .xls, .xlsx, .oddt, .rtf

This plugin requires no additional software to be installed on your system.

Cliff converts

.mime, .eml

to html.

You can view the .eml file almost like in a professional email viewer, see mail headers and download attachments. Cliff will sweep the .eml files from scripts, event attributes beginning with "on…", url() in css styles and external images. To do an unsafe preview, you can press a button do so and if you trust the .eml or .mime file

Mark uses Pandoc to do the conversion. Currently supported is:

.md, .textile, .html

Peek lets you preview pdf-Files in the browser. Peek uses imagemagick to do the conversion. Imagemagick uses Ghostscript as a delegate to handle pdf files. Pdf previews can be the full pdf or a png, jpg or gif of the first page. Please note, that the conversion resolution strongly depends on your ImageMagick's configuration in the delegates file. Please consult ImageMagick's configuration help to edit the delegates file.


Zippy lets you preview zip, tgz or tar-Files in the browser. Click on an entry to download one individual file from within the compressed file.

DO NOT USE NilText IN PRODUCTION

NilText lets you see, which data are available for a file conversion. NilText not suited for production use. You can peruse this plugin to learn about the plugin functionality. Please note, that this plugin may reveal a password of a repository. Like all other plugins, this plugin is deactivated by default.

Use

Go to Administration -> Plugins -> Redmine More Previews Configuration

Choose the following options

  • use embed-tag or iframe-tag
  • cache previews (speeds views, may bloat your rails root's tmp folder a bit)
  • activate sub plugins above
  • for each sub plugin activate the file extension for files you want to preview (if you choose two sub plugins converting the same file type, then a warning will be issued and the last activated sub plugin will do the conversion).

Have fun!

Localisations

  • English
  • German
  • Spanish
  • French
  • Japanese
  • Portugese (Brazil)
  • Portugese
  • Russian
  • Chinese

Native speakers: please help to improve localizations

Change-Log

*5.0.8
- fixed File.exists? to File.exist?
- fixed URI.esacape to URI.encode\_www\_form\_component for zippy
- fixed long standing issue with links in zippy's inline zip file content tables

*5.0.7
- yet another patch to please Zeitwerk

*5.0.6
- yet another patch to please Zeitwerk

*5.0.5
- yet another patch to please Zeitwerk

*5.0.4
- added more include statements to please Zeitwerk

*5.0.3
- removed legacy code to please Zeitwerk

*5.0.2
- altered sequence of file loading to please Zeitwerk

*5.0.1
- fixed some new locale files

*5.0.0
- running under Redmine 5

  • 4.1.3
    - added support for per project plugin activation
    - added better support for development mode
    - fixed repositories controller patch not finding project
    - minor bug fixes
  • 4.1.1
    - added pagination links to attachments preview page and entry (repository) preview page
    - fixed japanese localization
  • 4.0.1a
    - added method to prevent plugin from registering, if mimemagic is not installed. In this case. a permanent error message is displayed.
  • 4.0.0a
    - switched to patching existing redmine classes with 'prepend' instead of an alias chain, therefore loosing compatibility with redmine versions less than 4.0. Due to many redmine plugins now using the prepend method, introduced with Rails 5, the coexistence of 'prepend' and an alias chain methodology, whereby 'prepend' and the alias chain methodology is incompatible with each other, the coexistence cannot be further maintained.

  • 3.2.0
    - added new previewer "vince" to preview vcf virtual business cards
  • 3.1.2
    - minor code additions
  • 3.1.1
    - added fix to zippy's Gemfile
  • 3.1.0
    - improved rendering of conversions to images
    - added new converter Maggie, which converts images to one another
    - updated nil text comments
  • 3.0.3
    - fixed handling filenames with whitespace for converter 'mark'
  • 3.0.2
    - added converter named 'pass'
  • 3.0.1
    - fixed 'File' bug for converter 'mark'
  • 3.0.0b
    - rearranged code and files to better match zeitwerk
    - made compatible with development mode
    - beta quality
  • 2.0.11
    - amended autoload paths
  • 2.0.10
    - fixed broken api calls for attachment
  • 2.0.9
    - simplified hooks views for cliff
  • 2.0.8
    - fixed tmpfile scheme (internals)
  • 2.0.7
    - added support for non-ascii email headers in cliff
  • 2.0.6
    - added timezone support for mail dates in cliff
  • 2.0.5
    - fixed dependency on mimemagick after license change
  • 2.0.4
    - fixed mimemagick dependency after license change
  • 2.0.3
    - fixed windows glitch for File.read
  • 2.0.2
    - fixed virgin startup bug. On some events plugin crashes on first time use
    - removed UserInstallation parameter in libre for windows platforms
    - fixed missing assets bug
  • 2.0.1
    - fixed last minute issues
  • 2.0.0
    - Recoded and published, supports redmine 3+, redmine 4+
  • 1.0.0
    - Running on Redmine 3.4.6, never published

Replaces

This plugin replaces

  • redmine_preview_office,
  • redmine_preview_docx and
  • redmine_preview_pdf

Best with

This plugin ideally works together with

  • redmine_preview_inline
  • redmine_all_thumbnails

Installation notes

Install

download plugin and copy plugin folder redmine_more_previews go to Redmine's plugins folder

go to redmine root folder

bundle install

to install necessary gems. Install LibreOfiice (for Libre) and/or Pandoc for (for Mark)

restart server f.i.

sudo /etc/init.d/apache2 restart

Uninstall

go to plugins folder, delete plugin folder redmine_attachment_categories

rm -r redmine_more_previews

restart server f.i.

sudo /etc/init.d/apache2 restart

PLEASE rate this software. Developing is dependent on your feedback.

If things don't work: Check Administration -> Information. Is LibreOffice installed? (needed for Libre). Is Pandoc installed ? (needed for ##mark##). Else, drop me a line, I'll be glad to help. You Feedback helps improve the plugin.

Common issues so far

  • Libre, ##mark##
    • LibreOffice / Pandoc is not installed
    • LibreOffice / Pandoc is installed, but paths are not set for the redmine process user
    • Redmine Process User does not have the privilege to run LibreOffice / Pandoc
    • First time LibreOffice starts takes a little while
    • Conversion accuracy is dependent on the availability of fonts in LibreOffice
    • LibreOffice is doing very well - but possibly cannot convert every tiny aspect of MS Office files
    • Redmine Process does not have write permission Rails tmp folder
  • Peek
    • ImageMagick is installed, but Ghostscript is not (Peek doing conversion pdf to png)
    • ImageMagick Delegates configuration is configured for low pixel resolution

Changelog

5.0.8 (2023-04-10)

Compatible with Redmine 5.0.x, 4.2.x, 4.1.x, 4.0.x, 3.4.x.

4.1.3 (2022-05-26)

Compatible with Redmine 4.2.x, 4.1.x, 4.0.x, 3.4.x.

- added support for per project activation
- minor bug fixes

4.1.1 (2022-05-05)

Compatible with Redmine 4.2.x, 4.1.x, 4.0.x, 3.4.x.

3.2.0 (2022-05-03)

Compatible with Redmine 4.2.x, 4.1.x, 4.0.x, 3.4.x.

added new converter 'vince' to preview .vcf (vCard) files

3.1.1 (2022-04-15)

Compatible with Redmine 4.2.x, 4.1.x, 4.0.x, 3.4.x.

2.0.3 (2021-05-21)

Compatible with Redmine 4.2.x, 4.1.x, 4.0.x, 3.4.x.

- fixed windows glitch for File.read

2.0.2 (2021-05-12)

Compatible with Redmine 4.2.x, 4.1.x, 4.0.x, 3.4.x.

- fixed missing assets bug for html conversions in html mode
- fixed soffice UserInstallation issue for 'libre' plugin, running on Windows

2.0.1 (2020-11-16)

Compatible with Redmine 4.2.x, 4.1.x, 4.0.x, 3.4.x.

2.0.1 fixed last minute issues

logo.png (8.26 KB) logo.png Stephan Wenzel, 2020-11-13 16:20
logo.png (5.27 KB) logo.png Stephan Wenzel, 2020-11-13 16:23
logo.png (4.75 KB) logo.png Stephan Wenzel, 2020-11-13 16:24
logo.png (5.85 KB) logo.png Stephan Wenzel, 2020-11-13 16:25
logo.png (6.73 KB) logo.png Stephan Wenzel, 2020-11-13 16:25
logo.png (8.91 KB) logo.png Stephan Wenzel, 2020-11-13 16:25
Overview.png (383 KB) Overview.png Stephan Wenzel, 2020-11-13 17:29
Overview3.png (271 KB) Overview3.png Stephan Wenzel, 2020-11-13 18:33
Overview2.png (330 KB) Overview2.png Stephan Wenzel, 2020-11-13 18:38
Overview4.png (449 KB) Overview4.png Stephan Wenzel, 2020-11-13 19:01
Overview5.png (466 KB) Overview5.png Stephan Wenzel, 2020-11-13 19:05

User ratings

  by 一两梦 人间 6 months ago

  by Alexander Zhuravlev 7 months ago

  by Marian Liviriniu over 2 years ago

Unfortunately very-very buggy for my case: Redmine 4.2.1 on Win 10 / Win Server 2012. I really tried to make it work but only managed in the end to make it work on an unsatisfactory level.

  by joao paulo lima saraiva over 3 years ago

Muito bom esse plugin, deveria ser algo padrão no redmine.

  by Gilles Charles over 3 years ago

Very helpfull.
Some trouble to make it works on windows server (2019) but finally reached the goal.

  by Klaus Heerlein over 3 years ago

Thanks ! Exactly what I needed and works very nicely after I fixed the permissions for the \tmp directory.

  by Thomas Fengler over 3 years ago

When clicking the "configure"-button I get 404.

more_previews[at]hyper24.com

How can we get in contact to exchange more details in order get the plugin run?

  by Immanuel Wilhelmy over 3 years ago

Simple install, works great and boosts productivity and usability. Thanks for this great plugin!

  by Y Pamungkas almost 4 years ago

Works perfectly on 4.1.0-bitnami on google VM.
@Vlad Pol, have you try convert word to pdf?

  by wk s almost 4 years ago

work in V4.1.1
my step: https://github.com/HugoHasenbein/redmine_more_previews/issues/6#issuecomment-770175384

  by tonyq wang almost 4 years ago

I have installed this on ubuntu headless server for docx/xlsx.

The following install steps please reference:
https://github.com/HugoHasenbein/redmine_more_previews/issues/6

  by Phuong Vo almost 4 years ago

Works like a champ!

  by ashraf alzyoud almost 4 years ago

Nice plugin work perfect in redmine 4.1

  by Markus Bender almost 4 years ago

Das Plugin ist auf jeden sehr sinnvoll. Läuft diese auch unter Windows in einem Bitnami Stack?

  by Thai Dong almost 4 years ago

  by maixm masygreen almost 4 years ago

Great job!

  by Vlad Pol about 4 years ago

Hi! A very useful plugin, but it doesn't work properly. On Redmine 4.1.1 Word's documents imaging as blank.