项目

一般

简介

插件 » Redmine Preview Office文档预览插件

Redmine Preview Office

发布于: https://github.com/HugoHasenbein/redmine_preview_office
兼容于: Redmine 4.2.*, 4.1.*, 4.0.*, 3.4.*

最新版本: 1.0.3_2 更新日期: 2023-12-17 16:26

评论

添加评论

huang chimes4 个月 之前添加

redmine5.0.0 能用吗? 我下载了一个,5.0下 thin 两个服务无法启动。下一步如何操作?

guo hongxing4 个月 之前添加

@huang chimes 你好,可以参考这里 https://redmineplugins.cn/issues/515

huang chimes4 个月 之前添加

@guo hongxing 后台提示如下报错
[Tue Nov 07 14:47:10.707992 2023] [proxy:error] [pid 29780:tid 1356] (OS 10061) Ŀ ܾ ޷ ӡ : AH00957: http: attempt to connect to 127.0.0.1:3002 (127.0.0.1) failed
[Tue Nov 07 14:47:10.707992 2023] [proxy:error] [pid 29780:tid 1356] AH00959: ap_proxy_connect_backend disabling worker for (127.0.0.1) for 60s
[Tue Nov 07 14:47:10.707992 2023] [proxy_http:error] [pid 29780:tid 1356] [client 127.0.0.1:60582] AH01114: HTTP: failed to make connection to backend: 127.0.0.1, referer: http://127.0.0.1:890/redmine/

guo hongxing4 个月 之前添加

@huang chimes 这个日志只能看到thin没有起来,手动启thin能看到具体的错误信息,参考11楼方法 https://redmineplugins.cn/issues/515#note-11

由 匿名用户 在 4 个月 之前添加

@guo hongxing windows版 redmine 5 有安装指导吗? 我现在只是用了后面两步,前面的是 linux的不知道如何下一步。目前 thin 启动了访问就都停了。

由 匿名用户 在 7 个月 之前添加

安装好后,预览docx是空白的,日志是这样
dconf-CRITICAL **: 08:47:50.959: unable to create directory '/run/user/1000/dconf’: Permission denied. dconf will not work properly.
LibreOffice 7.5.5.2 50(Build:2)

redmineplugins.cn Admin7 个月 之前添加

看样子是LibreOffice工作异常,后台生成pdf预览文件失败了

han dj9 个月 之前添加

我这边安装成功,但是打开文档什么都没有。

redmineplugins.cn Admin9 个月 之前添加

@han dj

Permission denied @ dir_s_mkdir - /opt/dms222/apps/redmine/htdocs/tmp/cache/D38

无权限写tmp文件夹,修改下文件夹权限。举例,如果使用redmine用户运行:

mkdir -p tmp tmp/pdf public/plugin_assets
sudo chown -R redmine:redmine files log tmp public/plugin_assets
sudo chmod -R 755 files log tmp public/plugin_assets

guo hongxing9 个月 之前添加

@han dj 看似临时文件生成失败了,试试 https://redmineplugins.cn/issues/342

han dj9 个月 之前添加

成功了,但是我的系统配置打不开了
App 11845 output: Completed 500 Internal Server Error in 24ms (ActiveRecord: 3.5ms)
App 11845 output:
App 11845 output: ActionView::Template::Error (Permission denied @ dir_s_mkdir - /opt/dms222/apps/redmine/htdocs/tmp/cache/D38):
App 11845 output: 3: <div class=“box tabular settings">
App 11845 output: 4: <p><%= setting_select :ui_theme, Redmine::Themes.themes.collect {|t| [t.name, t.id]}, :blank ⇒ :label_default, :label ⇒ :label_theme %></p>
App 11845 output: 5:
App 11845 output: 6: <p><%= setting_select :default_language, lang_options_for_select(false) %></p>
App 11845 output: 7:
App 11845 output: 8: <p><%= setting_check_box :force_default_language_for_anonymous %></p>
App 11845 output: 9:
App 11845 output:
App 11845 output: lib/redmine/i18n.rb:130:in `languages_options’
App 11845 output: app/helpers/application_helper.rb:1449:in `lang_options_for_select’
App 11845 output: app/views/settings/_display.html.erb:6:in `block in app_views_settings_display_html_erb__4384599370501214527_69891041366540’
App 11845 output: app/views/settings/_display.html.erb:1:in `_app_views_settings__display_html_erb__4384599370501214527_69891041366540’
App 11845 output: app/views/common/_tabs.html.erb:21:in `block in app_views_common_tabs_html_erb___3660323226046048318_69891040766920’
App 11845 output: app/views/common/_tabs.html.erb:20:in `each’
App 11845 output: app/views/common/_tabs.html.erb:20:in `_app_views_common__tabs_html_erb___3660323226046048318_69891040766920’
App 11845 output: app/helpers/application_helper.rb:481:in `render_tabs’
App 11845 output: app/views/settings/edit.html.erb:5:in `_app_views_settings_edit_html_erb__2098074311829626936_69891040734560’
App 11845 output: app/controllers/settings_controller.rb:33:in `index’
App 11845 output: lib/redmine/sudo_mode.rb:61:in `sudo_mode’
可以帮忙看看咋回事麽?大神们

han dj9 个月 之前添加

App 22840 output: Rendering plugins/redmine_preview_office/app/views/attachments/office.html.erb within layouts/base
App 22840 output: Rendered layouts/_file.html.erb (4.5ms)
App 22840 output: Rendered plugins/redmine_preview_office/app/views/attachments/office.html.erb within layouts/base (4.7ms)
App 22840 output: Rendered plugins/redmine_ueditor/app/views/redmine_ueditor/_additional_assets.html.erb (0.6ms)
App 22840 output: Rendered plugins/progressive_projects_list/app/views/application/_progressive_sidebar.html.erb (0.0ms)
App 22840 output: Rendered plugins/progressive_projects_list/app/views/application/_progressive_recent_projects.html.erb (1.1ms)
App 22840 output: Completed 200 OK in 39ms (Views: 27.2ms | ActiveRecord: 5.7ms)
App 22840 output: Started GET "/dms/attachments/preview_office/5” for 1.71.189.228 at 2023-07-06 12:18:47 +0800
App 22840 output: Processing by AttachmentsController#preview_office as HTML
App 22840 output: Parameters: {“id"⇒“5”}
App 22840 output: Current user: hdjun (id=1)
App 22840 output: /usr/lib64/libreoffice/program/soffice.bin: /opt/dms222/common/lib/libuuid.so.1: no version information available (required by /lib64/libblkid.so.1)
App 22840 output:
App 22840 output: (process:23374): dconf-CRITICAL **: 12:18:47.434: unable to create directory '/run/user/0/dconf’: Permission denied. dconf will not work properly.
App 22840 output: Error: source file could not be loaded
App 22840 output:
App 22840 output: mv:
App 22840 output: cannot stat ‘230706113910_14b1dcf8788581917e79f30673f801a6.pdf’: No such file or directory
App 22840 output: Creating preview with libreoffice failed (pid 23356 exit 1):
App 22840 output: Command: cd /tmp/d20230706-22840-umgc0e; 'soffice’ -env:UserInstallation=file:///tmp/ --convert-to pdf '/opt/dms222/apps/redmine/htdocs/files/2023/07/230706113910_14b1dcf8788581917e79f30673f801a6.docx’; mv '230706113910_14b1dcf8788581917e79f30673f801a6.pdf’ '/opt/dms222/apps/redmine/htdocs/tmp/thumbnails/5_1cbd2f417370f9eeb93d4922c04b565b444c7daaa3aacc2110bab221f9d694c4.pdf’
App 22840 output: Completed 404 Not Found in 323ms (ActiveRecord: 1.5ms)

jason jin9 个月 之前添加

Preview插件和light box2 冲突?那使用什么来代替light2呢?

guo hongxing9 个月 之前添加

@jason jin 你好,我这边测试是正常的。redmine_preview_office和redmine_lightbox2不存在兼容性问题。以下是我的测试环境:

Environment:
  Redmine version                4.2.0.stable
  Ruby version                   2.6.6-p146 (2020-03-31) [x86_64-linux]
  Rails version                  5.2.5
  Environment                    production
  Database adapter               Mysql2
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp
SCM:
  Subversion                     1.9.3
  Git                            2.7.4
  Filesystem                     
Redmine plugins:
  redmine_ckeditor               1.2.3_3
  redmine_lightbox2              0.5.1
  redmine_preview_office         1.0.3_2

redmineplugins.cn Admin9 个月 之前添加

@jason jin 是light box2不能用了吗? 什么现象?

li bin11 个月 之前添加

为什么LibreOffice组件安装好了,但是redmine信息那里“可使用LibreOffice”是红色叹号不可用呢

guo hongxing11 个月 之前添加

像是redmine找不到已安装的LibreOffice组件

由 匿名用户 在 11 个月 之前添加

这种情况应该怎么办啊

guo hongxing11 个月 之前添加

@li bin 如果是linux环境,使用 which soffice 命令,看能否有/usr/bin/soffice输出,确保soffice命令在redmine的环境下可调用;如果是windows环境,soffice应该位于C:\Program Files\LibreOffice\program>下,在cmd窗口输入path查看可执行路径是否包含“C:\Program Files\LibreOffice\program”, 如果缺少,请在windows的环境变量配置中默认加上“C:\Program Files\LibreOffice\program”。

li bin11 个月 之前添加

@guo hongxing [Fri Apr 28 14:15:20.075145 2023] [proxy:error] [pid 4592:tid 968] [client ::1:50352] AH00898: Error reading from remote server returned by /redmine/settings/plugin/redmine_preview_office, referer: http://localhost/redmine/admin/plugins 报错日志

li bin11 个月 之前添加

windown7环境下,用Redmine Preview Office 1.0.3插件可以正常安装,但是不调用soffice,管理-信息里面也不显示LibreOffice。用Redmine Preview Office 1.0.3_2版本就会崩溃

redmineplugins.cn Admin11 个月 之前添加

崩溃后看下redmine日志,贴下最新的错误日志。

li bin11 个月 之前添加

点击管理-信息就崩溃。如果点击文档预览,有一次成功了。但是之后再点击预览就是白屏,然后过一会就
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request

Reason: Error reading from remote server

bitnami安装,apache2\logs路径下错误日志您看下

[Fri Apr 28 16:21:37.687146 2023] [proxy:error] [pid 2860:tid 972] [client ::1:50562] AH00898: Error reading from remote server returned by /redmine/my/page, referer: http://localhost/redmine/admin
[Fri Apr 28 16:22:00.795607 2023] [proxy_http:error] [pid 2860:tid 964] (OS 10060)由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 : [client ::1:50565] AH01102: error reading status line from remote server 127.0.0.1:3001, referer: http://localhost/redmine/admin
[Fri Apr 28 16:22:00.795607 2023] [proxy:error] [pid 2860:tid 964] [client ::1:50565] AH00898: Error reading from remote server returned by /redmine/admin/info, referer: http://localhost/redmine/admin
[Fri Apr 28 16:22:13.851477 2023] [proxy_http:error] [pid 2860:tid 960] (OS 10060)由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 : [client ::1:50568] AH01102: error reading status line from remote server 127.0.0.1:3002, referer: http://localhost/redmine/admin
[Fri Apr 28 16:22:13.851477 2023] [proxy:error] [pid 2860:tid 960] [client ::1:50568] AH00898: Error reading from remote server returned by /redmine/admin/info, referer: http://localhost/redmine/admin
[Fri Apr 28 16:23:03.374664 2023] [proxy_http:error] [pid 2860:tid 964] (OS 10060)由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 : [client ::1:50572] AH01102: error reading status line from remote server 127.0.0.1:3001, referer: http://localhost/redmine/admin
[Fri Apr 28 16:23:03.374664 2023] [proxy:error] [pid 2860:tid 964] [client ::1:50572] AH00898: Error reading from remote server returned by /redmine/admin/info, referer: http://localhost/redmine/admin

redmineplugins.cn Admin11 个月 之前添加

似乎没有抓全。是windows bitnami 安装方式吗? 试试通过手动启动thin方法:bundle exec thin start ,再触发报错看能否抓到redmine应用报错

li bin11 个月 之前添加

只要在path里添加上执行路径“C:\Program Files\LibreOffice\program”,信息就打不开,删掉后就正常,您见过这种情况吗

guo hongxing11 个月 之前添加

停掉redmine,使用use_redmine.bat开cmd控制台窗口,执行bundle exec thin start 启动redmine,然后点击管理里面的信息,再看崩溃时cmd控制台报什么错误

li bin11 个月 之前添加

插件装好后能用,因为是bitnami安装,可使用 ImageMagick 转换图片格式 (可选)、ImageMagick PDF 支持 (可选) 这两个是感叹号不可用,没安装这个插件之前是不影响使用的,插件安装后怀疑是在这出了问题

guo hongxing11 个月 之前添加

@li xuguang bin Bitnami windows版redmine 4.2+以上版本的安装包里去掉了ImageMagick库(该库用于附件图片预览),所以看到是红色不可用。doc、xls等文件预览是LibreOffice在通过转换成pdf实现的,与ImageMagick无关。

li bin11 个月 之前添加

@xingo 执行bundle exec thin start时报错Could not locate Gemfile or .bundle/ directory。正常的bitnami安装Gemfile文件是在Bitnami\redmine-4.2.4-0\apps\redmine\htdocs这个路径下。

guo hongxing11 个月 之前添加

@li bin 手边没有windows版的redmine 4.2.4,用windows bitnami 5 测试效果如下:

C:\Bitnami\5\apps\redmine\htdocs>set RAILS_ENV=production

C:\Bitnami\5\apps\redmine\htdocs> bundle exec thin start -p 8080
2023-05-06 12:57:39 +0800 Using rack adapter
2023-05-06 12:58:05 +0800 Thin web server (v1.8.0 codename Possessed Pickle)
2023-05-06 12:58:05 +0800 Maximum connections set to 1024
2023-05-06 12:58:05 +0800 Listening on 0.0.0.0:8080, CTRL+C to stop

注意:要用 use_redmine.bat 文件进入cmd控制台操作,否则可能出现环境变量的问题。

li bin11 个月 之前添加

不行我把4.2.4bitnami安装包邮箱发您,您用一样的环境测一下

li bin11 个月 之前添加

执行bundle exec thin start后点击管理-信息,网页报错后控制台也监听不到报错信息
E:\Bitnami\redmine-4.2.4-0\apps\redmine\htdocs>bundle exec thin start
2023-05-06 13:42:17 +0800 Using rack adapter
2023-05-06 13:42:27 +0800 Thin web server (v1.8.0 codename Possessed Pickle)
2023-05-06 13:42:27 +0800 Maximum connections set to 1024
2023-05-06 13:42:27 +0800 Listening on 0.0.0.0:3000, CTRL+C to stop

guo hongxing11 个月 之前添加

> 2023-05-06 13:42:27 +0800 Listening on 0.0.0.0:3000, CTRL+C to stop
> 

@li bin 你用使用thin的监听端口(3000)来测试“点击管理-信息"操作,在浏览器中输入http://redmine服务器地址:3000

由 匿名用户 在 11 个月 之前添加

@guo hongxing 不行啊大佬,监听端口apache web server就启动不了

guo hongxing11 个月 之前添加

@li bin 与apache无关,再举个例子:

# 控制台窗口手动操作,单独开启tcp 8888端口
E:\Bitnami\redmine-4.2.4-0\apps\redmine\htdocs>bundle exec thin start -p 8888

在浏览器中访问 http://redmine服务器地址:8888 ,然后手动测试“点击管理→信息”操作,看上述控制台窗口会报什么错误?

li bin11 个月 之前添加

先停掉redmine服务,然后打开use_redmine.bat,cd到redmine-4.2.4-0\apps\redmine\htdocs路径下,执行bundle exec thin start,启动redmine服务时apache web server这个服务启动不来

guo hongxing11 个月 之前添加

@li bin 这里说的测试和排错过程与apache没有任何关系,也无需启动bitnami的redmine服务。通过上述的bundle exec thin start -p 8888 就可以临时启动一个redmine应用,通过浏览器输入http://redmine服务器地址:8888 也可以访问你临时启用的redmine应用了,目的是方便测试故障,如果“点击管理-信息"操作出错,在bundle exec thin start -p 8888控制台里就可以直接看到redmine应用所输出的具体错误了。

redmineplugins.cn Admin11 个月 之前添加

@guo hongxing @li bin 新建问题比评论更方便贴图和上传日志

li bin11 个月 之前添加

浏览器提示
Routing Error
No route matches [GET] "/redmine”
Rails.root: D:/Bitnami/redmine-4.0.4-3/apps/redmine/htdocs

Application Trace | Framework Trace | Full Trace
Routes
Routes match in priority from top to bottom

guo hongxing10 个月 之前添加

转移至 https://redmineplugins.cn/issues/515

guo hongxing11 个月 之前添加

@li bin 和你的bitnami配置有关,你应该用的都是默认配置。按如下方法修改再测试下:

  • 先备份一份 .../htdoc/config/additional_environment.rb
  • 编辑additional_environment.rb文件,修改如下:
    config.action_controller.relative_url_root = ''
    
  • set RAILS_ENV=production
  • 测试完毕后,恢复之前备份的additional_environment.rb

另外,这里不方便上传文件和贴图,类似问题建议提到 https://redmineplugins.cn/projects/redmineplugins/issues/new

li bin11 个月 之前添加

@redmineplugins.cn Admin Windows7 下bitnami安装,插件显示正常,path查看可执行路径包含“C:\Program Files\LibreOffice\program”。并且可以预览Excel和doc文件,但就是点击管理里面的信息就崩溃。日志如下
[Thu May 04 11:24:24.749032 2023] [proxy_http:error] [pid 2892:tid 968] (OS 10060)由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 : [client ::1:49714] AH01102: error reading status line from remote server 127.0.0.1:3001, referer: http://localhost/redmine/admin
[Thu May 04 11:24:24.749032 2023] [proxy:error] [pid 2892:tid 968] [client ::1:49714] AH00898: Error reading from remote server returned by /redmine/admin/info, referer: http://localhost/redmine/admin
[Thu May 04 11:24:26.625264 2023] [proxy_http:error] [pid 2892:tid 972] (OS 10060)由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 : [client ::1:49716] AH01102: error reading status line from remote server 127.0.0.1:3002, referer: http://localhost/redmine/admin
[Thu May 04 11:24:26.625264 2023] [proxy:error] [pid 2892:tid 972] [client ::1:49716] AH00898: Error reading from remote server returned by /redmine/admin/info, referer: http://localhost/redmine/admin
[Thu May 04 11:24:55.250125 2023] [proxy_http:error] [pid 2892:tid 964] (OS 10060)由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 : [client ::1:49717] AH01102: error reading status line from remote server 127.0.0.1:3001, referer: http://localhost/redmine/admin
[Thu May 04 11:24:55.250125 2023] [proxy:error] [pid 2892:tid 964] [client ::1:49717] AH00898: Error reading from remote server returned by /redmine/admin/info, referer: http://localhost/redmine/admin
[Thu May 04 11:24:56.441939 2023] [proxy_http:error] [pid 2892:tid 960] (OS 10060)由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 : [client ::1:49719] AH01102: error reading status line from remote server 127.0.0.1:3002, referer: http://localhost/redmine/admin
[Thu May 04 11:24:56.441939 2023] [proxy:error] [pid 2892:tid 960] [client ::1:49719] AH00898: Error reading from remote server returned by /redmine/admin/info, referer: http://localhost/redmine/admin
[Thu May 04 11:25:13.682056 2023] [proxy_http:error] [pid 2892:tid 956] (OS 10060)由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 : [client ::1:49721] AH01102: error reading status line from remote server 127.0.0.1:3001, referer: http://localhost/redmine/admin
[Thu May 04 11:25:13.682056 2023] [proxy:error] [pid 2892:tid 956] [client ::1:49721] AH00898: Error reading from remote server returned by /redmine/admin/info, referer: http://localhost/redmine/admin
[Thu May 04 11:26:06.912325 2023] [proxy_http:error] [pid 2892:tid 952] (OS 10060)由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 : [client ::1:49726] AH01102: error reading status line from remote server 127.0.0.1:3002, referer: http://localhost/redmine/admin
[Thu May 04 11:26:06.912325 2023] [proxy:error] [pid 2892:tid 952] [client ::1:49726] AH00898: Error reading from remote server returned by /redmine/admin/info, referer: http://localhost/redmine/admin
[Thu May 04 11:26:07.770327 2023] [proxy_http:error] [pid 2892:tid 960] (OS 10060)由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 : [client ::1:49729] AH01102: error reading status line from remote server 127.0.0.1:3001, referer: http://localhost/redmine/admin
[Thu May 04 11:26:07.770327 2023] [proxy:error] [pid 2892:tid 960] [client ::1:49729] AH00898: Error reading from remote server returned by /redmine/admin/info, referer: http://localhost/redmine/admin
[Thu May 04 11:26:35.791175 2023] [proxy_http:error] [pid 2892:tid 964] (OS 10060)由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 : [client ::1:49731] AH01102: error reading status line from remote server 127.0.0.1:3002, referer: http://localhost/redmine/admin
[Thu May 04 11:26:35.791175 2023] [proxy:error] [pid 2892:tid 964] [client ::1:49731] AH00898: Error reading from remote server returned by /redmine/admin/info, referer: http://localhost/redmine/admin

li bin11 个月 之前添加

按照您说的,在系统里面添加环境变量后,打开redmine点击配置里面的信息,系统就会崩溃, #330 和这个问题一样,这个问题能解决吗?

由 匿名用户 在 超过一年 之前添加

redmine_more_previews 试了下,好像还不支持5.0

guo hongxing超过一年 之前添加

兼容redmine5+的,建议关注原作者的 redmine_more_previews 插件

忍者 火影超过一年 之前添加

这个有打算支持5.0吗?

redmineplugins.cn Admin将近 2 年 之前添加

@忍者 火影 不确定你的redmine版本。redmine_more_previews插件目前也不支持redmine5. 如果在redmine4.*上安装也导致redmine无法启动,可以尝试如下方法先恢复系统:
  • 临时卸载:直接删除redmine_more_previews插件整个文件夹,重新启动redmine应该可以解决
  • 彻底删除:RAILS_ENV=production bundle exec rake redmine:plugins:migrate NAME=redmine_more_previews VERSION=0

忍者 火影将近 2 年 之前添加

大神,这个redmine_more_previews安装后,redmine服务起不来了,怎么办

redmineplugins.cn Admin将近 2 年 之前添加

目前不支持redmine5.但你可以试试 redmine_more_previews .目前redmine5刚发布不久,大多数插件还没有来得急适配。

忍者 火影将近 2 年 之前添加

请问5.0版本支持吗

guo hongxing超过 2 年 之前添加

下载界面出现的支付宝二维码,扫描二维码获得积分

peng hechy超过 2 年 之前添加

好东西,话说积分怎么获取?

guo hongxing超过 2 年 之前添加

如果时docker方式,要看你挂载的位置,例如/var/log/redmine/ 参考 https://redmineplugins.cn/issues/168#note-10

moto jl超过 2 年 之前添加

才接触redmine,不知道应该看哪个日志

redmineplugins.cn Admin超过 2 年 之前添加

@moto jl 之前的错误最好能贴上redmine的报错日志才能找到根本原因

moto jl超过 2 年 之前添加

换了一个版本的插件,结果还是一片空白,换edge浏览器居然能正常显示了,哎

moto jl超过 2 年 之前添加

请问怎么判断soffice文件访问路径可达呢?

guo hongxing超过 2 年 之前添加

@moto jl docker安装方式要确保temp/tmp文件夹可写以及soffice文件访问路径可达,具体问题只能从redmine的日志里的报错内容判断

moto jl超过 2 年 之前添加

我也遇到一样的问题,docker装的,插件放进去后重启docker,然后启不来了,删除插件就能正常启动

Chen Snowman超过 2 年 之前添加

@chen ming 需要查看redmine的日志才能判定具体问题

chen ming超过 2 年 之前添加

用docker装的redmine,装完这插件后起不来是什么情况?

Chen Snowman超过 2 年 之前添加

你好, @Huang James

安裝完redmine顯示502 bad gateway

是安装redmine还是安装Preview Office插件? 或者贴日志到 https://redmineplugins.cn/projects/redmineplugins/issues/new

Huang James超过 2 年 之前添加

安裝完redmine顯示502 bad gateway

redmineplugins.cn Admin超过 2 年 之前添加

@chen chun 给你发了一个补丁文件,你再试试看

chen chun超过 2 年 之前添加

环境变量设置好了,能识别命令了。
C:\Program Files\LibreOffice\program
手动输入如下命令也能生成PDF。
soffice --convert-to pdf D:\Bitnami\redmine-4.1.1-8\apps\redmine\htdocs\files\2021\07\210727185044_aaa.docx --outdir D:\Bitnami\redmine-4.1.1-8\apps\redmine\htdocs\files\2021\07

预览的时候提示bootstrap.ini文件损坏,这应该不是真正原因。
控制台现在报找不到文件。没有具体指明哪个文件。
日志如下:
[2021-07-28 09:59:54 +0800] [ERROR] – Creating preview with libreoffice failed (pid 41460 exit 1):
Command: cd C:/Users/chenchun/AppData/Local/Temp/d20210728-35044-1cug5o8 & “soffice” env:UserInstallation=file:///tmp/ --convert-to pdf “D:/Bitnami/redmine-4.1.1-8/apps/redmine/htdocs/files/2021/07/210727185044_aaa.docx” & move “210727185044_aaa.pdf” “D:/Bitnami/redmine-4.1.1-8/apps/redmine/htdocs/tmp/thumbnails/1300_7e242d00e712558b034b948bd83e7358c111374d5b5ada3c859fedfc1de23e85.pdf”
[2021-07-28 09:59:54 +0800] [INFO] -
Completed 404 Not Found in 7027ms (ActiveRecord: 41.6ms)
好像和#25类似,但是说补丁不适用windows。

redmineplugins.cn Admin超过 2 年 之前添加

@chen chun 先确定手动执行soffice转换是否可行,或者手动执行时报什么错误。

cd C:/Users/chenchun/AppData/Local/Temp/d20210727-32616-tlb6ji & “soffice” env:UserInstallation=file:///tmp/ --convert-to pdf “D:/Bitnami/redmine-4.1.1-8/apps/redmine/htdocs/files/2021/07/210727185044_aaa.docx” & move “210727185044_aaa.pdf” 

另外,环境变量的设置方法:

chen chun超过 2 年 之前添加

window环境,下载了1.0.3_2这个版本。但是还是不能表示,起的调试环境。
控制台报的错是:不能识别soffice命令,要加什么环境变量吗?已经装了libreoffice。
日志如下;
[2021-07-27 20:23:34 +0800] [ERROR] – Creating preview with libreoffice failed (pid 34400 exit 1):
Command: cd C:/Users/chenchun/AppData/Local/Temp/d20210727-32616-tlb6ji & “soffice” env:UserInstallation=file:///tmp/ --convert-to pdf “D:/Bitnami/redmine-4.1.1-8/apps/redmine/htdocs/files/2021/07/210727185044_aaa.docx” & move “210727185044_aaa.pdf” “D:/Bitnami/redmine-4.1.1-8/apps/redmine/htdocs/tmp/thumbnails/1300_7e242d00e712558b034b948bd83e7358c111374d5b5ada3c859fedfc1de23e85.pdf”
[2021-07-27 20:23:34 +0800] [INFO] -
Completed 404 Not Found in 71ms (ActiveRecord: 34.9ms)

马 海军超过 2 年 之前添加

报告问题:
使用nginx作为代理服务器,Apache运行Passenger的情况下,预览界面会出现127.0.0.1 拒绝了我们的连接请求。

redmineplugins.cn Admin将近 3 年 之前添加

@Zh yowfung 重新修订下,更新到下载区了

Zh yowfung将近 3 年 之前添加

关于不能预览的问题,应该是出在插件的这行代码里的:

文件:{redmine}/plugins/redmine_preview_office/lib/redmine_preview_office/patches/application_helper_patch.rb

第39行弄出来的 URL 是没问题的,是 192.168.1.145。
:href ⇒ preview_office_path(attachment)

而第60行弄出来的确是 127.0.0.1。
:src ⇒ preview_office_url(attachment)

选用 with <object><embed>-tag 是一定不能预览(显示空白界面),选用 with <iframe>-tag 是可以显示预览的(但是网址变成了 127.0.0.1,手动改了后就可以预览了,但是刷新页面后就无效了)。

希望插件作者能够根据以上反馈的信息升级插件,谢谢!

Zh yowfung将近 3 年 之前添加

上面的问题,附上日志:

Started GET "/attachments/thumbnail/583” for 172.21.0.1 at 2021-05-15 12:53:18 +0800
Processing by AttachmentsController#thumbnail as HTML
Parameters: {“id"⇒“583”}
Current user: zhanghuifeng (id=144)
Creating thumbnail failed (pid 4080 exit 1):
Command: 'convert’ '/usr/local/redmine/files/2021/05/210514161350_30a5608004a5f94958e6b1a25f9c3256.pdf0' -thumbnail '100x100>' 'png:/usr/local/redmine/tmp/thumbnails/2d2a7895e1a69620f32c412a5d79987f5ac7b8971aa51d1e4194bcca9cdcf046_352014_100.thumb’
Completed 404 Not Found in 96ms (ActiveRecord: 55.0ms)
Started GET "/attachments/584” for 172.21.0.1 at 2021-05-15 12:53:25 +0800
Processing by AttachmentsController#show as HTML
Parameters: {“id"⇒“584”}
Current user: zhanghuifeng (id=144)
Rendering plugins/redmine_preview_office/app/views/attachments/office.html.erb within layouts/base
Rendered layouts/_file.html.erb (23.5ms)
Rendered plugins/redmine_preview_office/app/views/attachments/office.html.erb within layouts/base (31.3ms)
Rendered plugins/clipboard_image_paste/app/views/clipboard_image_paste/_headers.html.erb (0.5ms)
Rendered plugins/redmine_favorite_projects/app/views/favorite_projects/_additional_assets.html.erb (0.3ms)
Rendered plugins/clipboard_image_paste/app/views/clipboard_image_paste/_add_form.html.erb (1.2ms)
Rendered plugins/redmine_favorite_projects/app/views/favorite_projects/_select2_transformation_rules.html.erb (0.1ms)
Completed 200 OK in 156ms (Views: 61.1ms | ActiveRecord: 76.9ms)

Zh yowfung将近 3 年 之前添加

插件可以正常安装,在非本地机器上访问 redmine 系统时打开的预览画面是一片空白,中间显示“127.0.0.1 已拒绝连接”。浏览器按 F12,切到 “Network”一栏,看到它请求的是这个地址“Request URL: http://127.0.0.1:3000/attachments/preview_office/584”,HTTP 响应代码584。问题应该很清晰了,这个插件里面应该是访问了 127.0.0.1 这个地址,但由于我的 redmine 网站是搭建在 192.168.1.145 这台服务器上,在其他电脑上不应该访问 127.0.0.1 而应该是访问 192.168.1.145。

redmineplugins.cn Admin将近 3 年 之前添加

cao rocky将近 3 年 之前添加

bitnami/redmine debian 10

Redmine 4.2.0.stable v
默认的管理员帐号已改变 v
附件路径可写 v
插件的附件路径可写 (./public/plugin_assets) v
MiniMagick 可用(可选的) v
可使用 ImageMagick 转换图片格式 (可选) v
ImageMagick PDF 支持 (可选) v
Libre Office available X 红
Pandoc available v

***********************************************log。tmp目录没有文件夹
Processing by AttachmentsController#more_preview as HTML
Parameters: {“drive_entry"⇒“true”, “id"⇒“10”}
Current user: user (id=1)
Creating preview with Libre failed (pid 2732 exit 1):
Command: cd '/tmp/d20210424-1817-1b627b8’; soffice --headless --convert-to html --outdir '/tmp/d20210424-1817-1b627b8’ -env:UserInstallation=file:///tmp/d20210424-1817-1a7i6rh/user_installation '/opt/bitnami/apps/redmine/htdocs/files/2021/04/210423065312_bab8f361e2340d0bd8a2a522234ea302.xlsx’; mv './210423065312_bab8f361e2340d0bd8a2a522234ea302.html’ '/tmp/d20210424-1817-1b627b8/index.html’
An error occured while generating preview for /opt/bitnami/apps/redmine/htdocs/files/2021/04/210423065312_bab8f361e2340d0bd8a2a522234ea302.xlsx
Exception was: ConverterShellError

***********************************
手动运行命令成功,在tmp目录可以找到。
soffice --headless --convert-to html --outdir '/tmp/d20210424-1817-1b627b8’ -env:UserInstallation=file:///tmp/d20210424-1817-1a7i6rh/user_installation '/opt/bitnami/apps/redmine/htdocs/files/2021/04/210423065312_bab8f361e2340d0bd8a2a522234ea302.xlsx’

xu renfeng将近 3 年 之前添加

报错查看log如下:
Installing ruby-filemagic 0.7.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /usr/local/bundle/gems/ruby-filemagic-0.7.2/ext/filemagic
/usr/local/bin/ruby -I /usr/local/lib/ruby/2.6.0 -r
./siteconf20210406-24-1yg2ifl.rb extconf.rb
checking for -lgnurx... * extconf.rb failed *
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/$(RUBY_BASE_NAME)
--with-magic-dir
--without-magic-dir
--with-magic-include
--without-magic-include=${magic-dir}/include
--with-magic-lib
--without-magic-lib=${magic-dir}/lib
--with-gnurx-dir
--without-gnurx-dir
--with-gnurx-include
--without-gnurx-include=${gnurx-dir}/include
--with-gnurx-lib
--without-gnurx-lib=${gnurx-dir}/lib
--with-gnurxlib
--without-gnurxlib
/usr/local/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to
generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/local/lib/ruby/2.6.0/mkmf.rb:552:in `try_link0'
from /usr/local/lib/ruby/2.6.0/mkmf.rb:570:in `try_link'
from /usr/local/lib/ruby/2.6.0/mkmf.rb:789:in `try_func'
from /usr/local/lib/ruby/2.6.0/mkmf.rb:1016:in `block in have_library'
from /usr/local/lib/ruby/2.6.0/mkmf.rb:959:in `block in checking_for'
from /usr/local/lib/ruby/2.6.0/mkmf.rb:361:in `block (2 levels) in postpone'
from /usr/local/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /usr/local/lib/ruby/2.6.0/mkmf.rb:361:in `block in postpone'
from /usr/local/lib/ruby/2.6.0/mkmf.rb:331:in `open'
from /usr/local/lib/ruby/2.6.0/mkmf.rb:357:in `postpone'
from /usr/local/lib/ruby/2.6.0/mkmf.rb:958:in `checking_for'
from /usr/local/lib/ruby/2.6.0/mkmf.rb:1011:in `have_library'
from extconf.rb:21:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can
be found here:

/usr/local/bundle/extensions/x86_64-linux/2.6.0/ruby-filemagic-0.7.2/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /usr/local/bundle/gems/ruby-filemagic-0.7.2
for inspection.
Results logged to
/usr/local/bundle/extensions/x86_64-linux/2.6.0/ruby-filemagic-0.7.2/gem_make.out

An error occurred while installing ruby-filemagic (0.7.2), and Bundler
cannot continue.
Make sure that `gem install ruby-filemagic -v '0.7.2' --source
'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
ruby-filemagic

仔细核对了我的报错log和“https://redmineplugins.cn/issues/21”中的报错信息,我发现好像是ruby-filemagic的路径不对,如我的报错信息中提到的“/usr/local/bundle/gems/ruby-filemagic-0.7.2”实际上并没有这个路径,ruby-filemagic-0.7.2安装在“/var/lib/gems/2.3.0/gems/ruby-filemagic-0.7.2”中,但是我还是不知道这个要怎么解决。

xu renfeng将近 3 年 之前添加

@guo hongxing 没有用,还是报一样的错,
Installing ruby-filemagic 0.7.2 with native extensions
Gem::Ext::BulidError:ERROR: Failed to build gem native extension

guo hongxing将近 3 年 之前添加

xu renfeng将近 3 年 之前添加

仔细核对了一遍,发现不能正常显示应该是因为没有安装redmine_preview_pdf这个插件导致的,但是我在安装这个插件时又出现了如下错误。 sweat
Installing ruby-filemagic 0.7.2 with native extensions
Gem::Ext::BulidError:ERROR: Failed to build gem native extension

redmineplugins.cn Admin将近 3 年 之前添加

@xu renfeng 用我新上传的补丁再试试看,见补丁

redmineplugins.cn Admin将近 3 年 之前添加

@xu renfeng 使用同样的版本又在4.1.1.stable.19939上测试正常 #165

xu renfeng将近 3 年 之前添加

试过了,还是没有用,报错信息也和之前一样

redmineplugins.cn Admin将近 3 年 之前添加

xu renfeng将近 3 年 之前添加

查看log如下:

...
mv: cannot stat '210401082014_8c6ed9537f77f2c22989af8891097dcb.pdf’: No such file or directory
E, [2021-04-01T08:29:32.487992 #1] ERROR – : Creating preview with libreoffice failed (pid 104 exit 1):
Command: cd /tmp/d20210401-1-1env0tp; 'soffice’ --convert-to pdf '/usr/src/redmine/files/2021/04/210401082014_8c6ed9537f77f2c22989af8891097dcb.docx’; mv '210401082014_8c6ed9537f77f2c22989af8891097dcb.pdf’ '/usr/src/redmine/tmp/thumbnails/2_f5fa3b1b7dd6beabc62cecf14c3822414355b1c4b341566635cb83daf45e9cf9.pdf’
I, [2021-04-01T08:29:32.491595 #1] INFO – : Completed 404 Not Found in 20ms (ActiveRecord: 4.9ms)
192.168.2.5 - - [01/Apr/2021:08:29:32 UTC] “HEAD /attachments/preview_office/2 HTTP/1.1” 404 0
- → /attachments/preview_office/2

xu renfeng将近 3 年 之前添加

插件安装正常,没有报错,文档也能正常打开,不报错,但是文档打开后没有显示内容。

“信息”页面下没有正常显示安装步骤中提到的两个组件,只显示了一个,并且右侧显示不是绿色的对勾,而是红色的感叹号
Libre Office available (needed for plugin 'Redmine Preview Office’)

redmineplugins.cn Admin超过 3 年 之前添加

@苏盼 试试这个方法 https://redmineplugins.cn/issues/16

huang Gavin3 个月 之前添加

@redmineplugins.cn Admin 这个问题解决了吗?

苏 盼超过 3 年 之前添加

LibreOffice_6.4.7_Linux_x86-64_rpm_langpack_zh-CN.tar.gz
LibreOffice_6.4.7_Linux_x86-64_rpm.tar.gz
安装完LibOffice后,能打开编辑中文,但是该插件还是乱码?

liu wayne超过 3 年 之前添加

需要安装:
apt-get install unoconv
apt-get install ttf-wqy-microhei

liu wayne超过 3 年 之前添加

插件有问题,redmine docker方式安装,按照安装方式,成功安装
chrome浏览器看docx文件是空白。

redmineplugins.cn Admin超过 3 年 之前添加

@z16536 如果是linux系统,按照 https://www.redmineplugins.cn/issues/25#note-7 outman的方法去解决。

zl6536 zl6536超过 3 年 之前添加

IE11報錯HTTP 4.0
chrome空白什麼都不顯示

redmineplugins.cn Admin超过 3 年 之前添加

看下问题跟踪 里有没有你的遇到的问题,或者把你的错误日志贴出来

由 匿名用户 在 超过 3 年 之前添加

我这边安装好插件以后出现不能预览。初步想到可能是插件冲突,当删除其他插件以后,还是不能预览,出现不能打开pdf文档的提示

ou ye将近 4 年 之前添加

谷歌浏览器导致,最新版本(83.0.4103.97 )不支持, 75.0.3770.142版本支持
火狐浏览器可以。

redmineplugins.cn Admin将近 4 年 之前添加

还是需要日志,否则没法定位问题

ou ye将近 4 年 之前添加

开发机器未配置apache2,服务器配置了apache2。预览的时候,均发现本机(127.0.0.1)没有问题。换到其他机器就不行了。
未配置apache2的,按照之前评论 尝试使用:rails s -e production -p 8080 -b 0.0.0.0
也未生效,请问该如何配置?

惑惑 小将近 4 年 之前添加

export DISPLAY=:0.0
[18:16:22][root@mail ~]# 'soffice’ --convert-to pdf '/usr/local/redmine-4.0.5/files/2020/05/200527085921_95ef2d0f7566ff6a4378c95b5f104a3a.docx’
[18:16:27]convert /usr/local/redmine-4.0.5/files/2020/05/200527085921_95ef2d0f7566ff6a4378c95b5f104a3a.docx → /root/200527085921_95ef2d0f7566ff6a4378c95b5f104a3a.pdf using writer_pdf_Export

惑惑 小将近 4 年 之前添加

[root@mail local]# 'soffice’ --convert-to pdf '/usr/local/redmine-4.0.5/files/2020/05/200527085921_95ef2d0f7566ff6a4378c95b5f104a3a.docx’
Failed to open display
/usr/lib64/libreoffice/program/soffice.bin X11 error: Can’t open display:
Set DISPLAY environment variable, use -display option
or check permissions of your X-Server
(See “man X” resp. “man xhost” for details)

惑惑 小将近 4 年 之前添加

Completed 200 OK in 272ms (Views: 119.0ms | ActiveRecord: 57.3ms)
Started GET "/attachments/139” for 172.1.243.25 at 2020-06-03 16:50:20 +0800
Processing by AttachmentsController#show as HTML
Parameters: {“id"⇒“139”}
Current user: admin (id=1)
Rendering plugins/redmine_preview_office/app/views/attachments/office.html.erb within layouts/base
Rendered layouts/_file.html.erb (12.8ms)
Rendered plugins/redmine_preview_office/app/views/attachments/office.html.erb within layouts/base (14.8ms)
Completed 200 OK in 54ms (Views: 27.9ms | ActiveRecord: 16.6ms)
Started GET "/attachments/preview_office/139” for 172.1.243.25 at 2020-06-03 16:50:20 +0800
Processing by AttachmentsController#preview_office as */*
Parameters: {“id"⇒“139”}
Current user: admin (id=1)
Creating preview with libreoffice failed (pid 8765 exit 1):
Command: cd /tmp/d20200603-8740-jpmq1q; 'soffice’ -env:UserInstallation=file:///tmp/ --convert-to pdf '/usr/local/redmine-4.0.5/files/2020/05/2
00527085921_95ef2d0f7566ff6a4378c95b5f104a3a.docx’; mv '200527085921_95ef2d0f7566ff6a4378c95b5f104a3a.pdf’ '/usr/local/redmine-4.0.5/tmp/thumbna
ils/139_eb24b1edc78cd07415f91b6e9ee96761a092862a8cc3fc037f103970c839c2af.pdf’
cmd is → cd /tmp/d20200603-8740-jpmq1q; 'soffice’ -env:UserInstallation=file:///tmp/ --convert-to pdf '/usr/local/redmine-4.0.5/files/2020/05/
200527085921_95ef2d0f7566ff6a4378c95b5f104a3a.docx’; mv '200527085921_95ef2d0f7566ff6a4378c95b5f104a3a.pdf’ '/usr/local/redmine-4.0.5/tmp/thumbn
ails/139_eb24b1edc78cd07415f91b6e9ee96761a092862a8cc3fc037f103970c839c2af.pdf’
tmpdir is → /tmp/d20200603-8740-jpmq1q
Completed 404 Not Found in 329ms (ActiveRecord: 2.6ms)

已经在/usr/local/redmine-4.0.5/plugins/redmine_preview_office/lib/redmine_preview_office/patches中替换了thumbnail_patch.rb

默认的管理员帐号已改变
附件路径可写
插件的附件路径可写 (./public/plugin_assets)
RMagick 可用(可选的)
可使用 ImageMagick 转换图片格式 (可选)
Libre Office available (needed for plugin 'Redmine Preview Office’)
Ghostscript available (needed for plugin 'Redmine Preview PDF’)

Environment:
Redmine version 4.0.5.stable
Ruby version 2.5.7-p206 (2019-10-01) [x86_64-linux]
Rails version 5.2.3
Environment production
Database adapter Mysql2
Mailer queue ActiveJob::QueueAdapters::AsyncAdapter
Mailer delivery smtp
SCM:
Filesystem
Redmine plugins:
redmine_preview_office 1.0.3
redmine_preview_pdf 1.0.4

redmineplugins.cn Admin将近 4 年 之前添加

不支持windows,如果用这个插件,建议迁到linux下

zh zh将近 4 年 之前添加

win server 2012,打开预览是白色的没有生效
日志
Current user: admin (id=1)
Rendered layouts/_file.html.erb (0.0ms)
Rendered plugins/redmine_preview_office/app/views/attachments/office.html.erb within layouts/base (31.3ms)
Rendered plugins/quick_view/app/views/hooks/_quick_view_base_head.html.erb (0.0ms)
Rendered plugins/redmine_code_review/app/views/code_review/_html_header.html.erb (0.0ms)
Rendered plugins/quick_view/app/views/hooks/_quick_view_base_bottom_tooltip.html.erb (0.0ms)
Rendered plugins/quick_view/app/views/hooks/_quick_view_base_bottom.html.erb (0.0ms)
Rendered plugins/quick_view/app/views/hooks/_quick_view_base_bottom_worktime_ext.html.erb (0.0ms)
Rendered plugins/redmine_code_review/app/views/code_review/_body_bottom.html.erb (0.0ms)
Completed 200 OK in 188ms (Views: 50.1ms | ActiveRecord: 125.3ms)
Started GET "/redmine/attachments/preview_office/3454” for 127.0.0.1 at 2020-04-28 11:44:23 +0800
Processing by AttachmentsController#preview_office as HTML
Parameters: {“id"⇒“3454”}
Current user: admin (id=1)
Couldn’t find template for digesting: attachments/preview_office
Completed 304 Not Modified in 47ms (ActiveRecord: 15.7ms)

redmineplugins.cn Admin将近 4 年 之前添加

你的404问题看这里 centos7 redmine 4.0.4 生成不了pdf #25

bai fuwa将近 4 年 之前添加

添加了插件,apache提供服务,预览时提示404。直接用调试命令,没有问题,是apache需要修改配置吗?

redmineplugins.cn Admin将近 4 年 之前添加

请用问题跟踪里的补丁文件替换掉插件pathces目录下的对应文件,重启动redmine在试试看

redmineplugins.cn Admin将近 4 年 之前添加

嗯,你用的应该是bitnami的集成安装包. 是权限的问题,

由 匿名用户 在 将近 4 年 之前添加

centos7 redmine 4.0.4 生成不了pdf,日志:

Completed 200 OK in 203ms (Views: 168.3ms | ActiveRecord: 14.7ms)
Started GET "/redmine/attachments/preview_office/26” for 192.168.1.101 at 2020-03-27 19:24:57 +0800
Processing by AttachmentsController#preview_office as HTML
Parameters: {“id"⇒“26”}
Current user: david (id=6)
Creating preview with libreoffice failed (pid 11367 exit 1):
Command: cd /tmp/d20200327-11310-1grlqs5; 'soffice’ --convert-to pdf '/opt/redmine.org.cn/apps/redmine/htdocs/files/2020/03/200327180819_test333.xlsx’; mv '200327180819_test333.pdf’ '/opt/redmine.org.cn/apps/redmine/htdocs/tmp/thumbnails/26_0d412b4d2031731b2d3fec5be178f4a7ad0bb4c5a1c2e94b4251fde9d2bb2135.pdf’
Completed 404 Not Found in 530ms (ActiveRecord: 4.3ms)

/tmp/d20200327-11310-1grlqs5 不存在,
手动运行命令:'soffice’ --convert-to pdf '/opt/redmine.org.cn/apps/redmine/htdocs/files/2020/03/200327180819_test333.xlsx’ 能生成pdf

由 匿名用户 在 将近 4 年 之前添加

注意!Redmine Knowledgebase 插件会破坏Redmine Preview Office的pdf文件预览功能

redmineplugins.cn Admin将近 4 年 之前添加

导致不能预览的原因有很多,最好能在预览不成功的同时抓下最新的日志,把对应的错误日志贴上来方便故障定位

由 匿名用户 在 大约 4 年 之前添加

Redmine 4.0.4.stable
安装完成后不能显示预览
以下在安装后的信息
--------------------------------------
默认的管理员帐号已改变
附件路径可写
插件的附件路径可写 (./public/plugin_assets)
RMagick 可用(可选的)
可使用 ImageMagick 转换图片格式 (可选)
Libre Office available (needed for plugin 'Redmine Preview Office’)

Environment:
Redmine version 4.0.4.stable
Ruby version 2.5.5-p157 (2019-03-15) [x86_64-linux]
Rails version 5.2.3
Environment production
Database adapter Mysql2
Mailer queue ActiveJob::QueueAdapters::AsyncAdapter
Mailer delivery smtp
SCM:
Git 2.19.1
Filesystem
Redmine plugins:
easy_gantt 1.12
redmine_preview_office 1.0.3
redmine_wktime 3.9

redmineplugins.cn Admin大约 4 年 之前添加

注册用户后留言,方便联系 bowtie

由 匿名用户 在 大约 4 年 之前添加

看你的Redmine的安装方式啦,确认绑定到任意地址。例如 rails s -e production -p 8080 -b 0.0.0.0

由 匿名用户 在 大约 4 年 之前添加

没有配置apache2。预览的时候,发现本机(127.0.0.1)没有问题。换到其他机器就不行了,看到下面访问的地址还是127.0.0.1。

redmineplugins.cn Admin大约 4 年 之前添加

尝试安装下下面的依赖呢?

sudo yum install libXrender libXext libSM libICE libGLU fontconfig cups-libs cairo mesa-libGL

由 匿名用户 在 大约 4 年 之前添加

先到Redmine的设置界面: 管理 → 信息 ,查看 Libreoffice 是否有效

由 匿名用户 在 大约 4 年 之前添加

ceontos 7 redmine 4.05 no work