首页 > 解决方案 > 无法在服务器 linux 上打开 Word 文档

问题描述

使用 EvoWordToPDF 运行演示将 docx 转换为 pdf 时遇到错误:

INFO  2021-11-16 09:15:42,760 [97   ] MyProject.DanhMuc.Demo.DemoAppService    
- Path file doc: /qldt/wwwroot/Upload/Demo/PhieuThamDinhMau.docx
INFO  2021-11-16 09:15:42,760 [97   ] MyProject.DanhMuc.Demo.DemoAppService    
- Path file pdf: /qldt/wwwroot/Upload/Demo/PhieuThamDinhMau.pdf
ERROR 2021-11-16 09:15:42,830 [97   ] MyProject.DanhMuc.Demo.DemoAppService    - EvoWordToPdf.WordConvertException: Could not open the Word document
   at EvoWordToPdf.WordToPdfConverter.ᜀ(Stream A_0, String A_1, Int32 A_2, Int32 A_3)
   at EvoWordToPdf.WordToPdfConverter.ᜀ(Stream A_0, Stream A_1, String A_2, Int32 A_3, Int32 A_4)
   at EvoWordToPdf.WordToPdfConverter.ᜁ(Stream A_0, String A_1, Int32 A_2, Int32 A_3)
   at EvoWordToPdf.WordToPdfConverter.ConvertWordFile(String wordFilePath, String password, Int32 startPageIndex, Int32 endPageIndex)
   at EvoWordToPdf.WordToPdfConverter.ConvertWordFile(String wordFilePath)
   at MyProject.DanhMuc.Demo.DemoAppService.WordToPDF(String fileName) in /builds/qldt/qldt-web/aspnet-core/src/MyProject.Application/DanhMuc/Demo/DemoAppService.cs:line 410

在本地,它运行完美。我不明白为什么?帮我!

标签: evopdf

解决方案


推荐阅读