本仓库工作基于 GoFileView 和 kkFileView 工作基础之上,并遵循相关开源协议。
感谢 GoFileView ( https://github.com/leeli73/goFileView.git ) 和 kkFileView( https://gitee.com/kekingcn/file-online-preview.git )
仅支持Linux系统,url暂时不支持中文。 已测试Ubuntu、CentOS
Word转码为PDF,对PDF的在线预览
本地路径指定,省去下载步骤
定制LibreOffice分发版,去掉对系统LibreOffice的依赖
安装Libreoffice
确保Libreoffice在path目录下
下载源码
设置 GOPATH 为当前的目录
启动静态文件服务器
go run webs.go
启动预览服务
go run main.go
在浏览器里输入
http://localhost:8088/perview/onlinePreview?url=http://localhost:9090/123.docx