Project

General

Profile

redmine more previews & Bitnami Redmine 5.0.0 for Windows & LibreOffice converter problem - Error. Failed to load pdf document.

Added by Mike Furminsky over 1 year ago

Help me please. The plugin allows you to display pdf files without problems. But, it does not convert doc files to pdf and does not display. From the command line it is possible to convert. >soffice --headless --convert-to pdf d:\test.doc --outdir d:\redmine

Windows 10 x64
LibreOffice_6.0.7.3_Win_x64.msi
pandoc-3.1.2-windows-x86_64.msi
gs10011w64.exe
ImageMagick-7.1.1-11-Q16-HDRI-x64-dll.exe

Provided that a temporary folder has been created, all commands work normally in the cmd environment.

cd "C:/Users/Xalyf/AppData/Local/Temp/d20230607-6360-1ed3wfj" & soffice --headless --convert-to pdf --outdir "C:/Users/Xalyf/AppData/Local/Temp/d20230607-6360-1ed3wfj" "D:/redmine/apps/redmine/htdocs/files/2023/05/230511140318_c9d9f248e83827d81e47f4ccdf7150b6.doc" & move "./230511140318_c9d9f248e83827d81e47f4ccdf7150b6.pdf" "C:/Users/Xalyf/AppData/Local/Temp/d20230607-6360-1ed3wfj/index.pdf"

index.pdf file is generated and available.

Peeped, during the request to view the doc file, temporary folders are created as indicated in the log file. I assume the conversion works the same. Could it be that temporary folders are deleted before Redmine has time to access the index.pdf file?

________________________________________________ log file snippet
E, [2023-06-07T13:01:48.110649 #6360] ERROR -- : [8770521f-107e-435e-a74a-df1fec068565] Creating preview with Libre failed (pid 12296 exit 1):
Command: cd "C:/Users/Xalyf/AppData/Local/Temp/d20230607-6360-1ed3wfj" & soffice --headless --convert-to pdf --outdir "C:/Users/Xalyf/AppData/Local/Temp/d20230607-6360-1ed3wfj" "D:/redmine/apps/redmine/htdocs/files/2023/05/230511140318_c9d9f248e83827d81e47f4ccdf7150b6.doc" & move "./230511140318_c9d9f248e83827d81e47f4ccdf7150b6.pdf" "C:/Users/Xalyf/AppData/Local/Temp/d20230607-6360-1ed3wfj/index.pdf"
E, [2023-06-07T13:01:48.112147 #6360] ERROR -- : [8770521f-107e-435e-a74a-df1fec068565] An error occured while generating preview for D:/redmine/apps/redmine/htdocs/files/2023/05/230511140318_c9d9f248e83827d81e47f4ccdf7150b6.doc
E, [2023-06-07T13:01:48.112242 #6360] ERROR -- : [8770521f-107e-435e-a74a-df1fec068565] Exception was: RedmineMorePreviews::Exceptions::ConverterShellError
E, [2023-06-07T13:01:48.112460 #6360] ERROR -- : [8770521f-107e-435e-a74a-df1fec068565] D:/redmine/apps/redmine/htdocs/plugins/redmine_more_previews/lib/redmine_more_previews/conversion.rb:340:in command' D:/redmine/apps/redmine/htdocs/plugins/redmine_more_previews/converters/libre/lib/libre.rb:41:in block in convert'