项目

一般

简介

插件目录 » Redmine Preview Office文档预览插件(Redmine 4.*修订版)

评论

添加评论

#1 Admin Redmine24 天 之前添加

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

#2 zl6536 zl653624 天 之前添加

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

#3 Admin Redmine2 个月 之前添加

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

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

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

#5 普 兰店4 个月 之前添加

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

#6 Admin Redmine4 个月 之前添加

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

#7 普 兰店4 个月 之前添加

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

#8 惑惑 小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

#9 惑惑 小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)

#10 惑惑 小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

#11 Admin Redmine5 个月 之前添加

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

#12 zh zh5 个月 之前添加

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)

#13 Admin Redmine5 个月 之前添加

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

#14 bai fuwa5 个月 之前添加

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

#15 Admin Redmine6 个月 之前添加

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

#16 Admin Redmine6 个月 之前添加

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

#17 由 匿名用户 在 6 个月 之前添加

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

#18 由 匿名用户 在 6 个月 之前添加

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

#19 Admin Redmine7 个月 之前添加

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

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

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

#21 Admin Redmine7 个月 之前添加

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

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

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

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

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

#24 Admin Redmine7 个月 之前添加

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

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

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

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

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

ceontos 7 redmine 4.05 no work

添加评论