ekoz / kbase-doc Goto Github PK
View Code? Open in Web Editor NEW文档在线预览编辑,文档水印 / Office files preview or edit online, doc/docx convert to html, watermark
License: Apache License 2.0
文档在线预览编辑,文档水印 / Office files preview or edit online, doc/docx convert to html, watermark
License: Apache License 2.0
java.lang.IllegalStateException: invalid officeHome: it doesn't contain soffice.bin
org.artofsolving.jodconverter.office.DefaultOfficeManagerConfiguration.buildOfficeManager(DefaultOfficeManagerConfiguration.java:167) ~[jodconverter-core-3.0-beta-4.jar:na]
我已经安装了LibreOffice软件,也能在电脑上找到,我是在win10上安装的,请问有解决方案吗?
在 ExcelProcessor 类中,会调用BinaryPartAbstractImage.createImagePart
方法,该方法内部有一段逻辑:
// Delete the tmp file
// As per http://stackoverflow.com/questions/991489/i-cant-delete-a-file-in-java
// the following 3 lines are necessary, at least on Win 7 x64
// Also reported on Win XP, but in my testing, the files were deleting OK anyway.
fos = null;
fis = null;
if (Docx4jProperties.getProperty("docx4j.openpackaging.parts.WordprocessingML.BinaryPartAbstractImage.TempFiles.ForceGC", true)) {
System.gc();
}
此处会强制 Full GC。
所以针对 excel 加水印,是不是换成其他方法会好一些。
有木有word转pdf的
word文本水印,添加不上,也不报错,
图片水印可以
我clone 过来的 pom.xml 和 你线上显示的是不一样的 这是为啥子呢? 能不能顺便说下要怎么跑起来呢 :D
Hello, nice work.
Is there and implemented math support?
加油!
目前还是没有很好的解决 -PPT的预览问题,
不过做出来提取文字已经蛮厉害了。
上传pdf文件时前端显示成功,但是后端报错。
2019-04-23 14:40:52.355 ERROR 16872 --- [nio-8080-exec-8] com.eastrobot.web.IndexController : failed conversion: pdf [1511384b] to html; org.artofsolving.jodconverter.office.OfficeException: unsupported conversion; input file: 1556001649210.pdf
html转xlsx、pptx转不了,正向可以转过去,反向转不回来了。
启动springboot 的时候出现, java.lang.IllegalStateException: invalid officeHome: it doesn't contain soffice.bin: C:\Program Files\LibreOffice_6.3_SDK\sdk
请问是我的libreoffice的版本问题吗?
您好,查看了您对于pdf文件嵌入的源码,请问是否有对应提取水印的方法?
如下,@ApiImplicitParam中参数的dataType需要修改为__file才能在swagger-ui中正常上传文件,否则就是一个普通输入框
/**
* 上传文件
* @author eko.zhan at 2017年8月9日 下午8:32:39
* @param uploadFile
* @param request
* @return
*/
@ApiOperation(value="上传文件", notes="")
@ApiImplicitParams({
@ApiImplicitParam(name="uploadFile", value="待上传的文件", required=true, dataType="__file")
})
@RequestMapping(value="uploadData", method=RequestMethod.POST)
public JSONObject uploadData(@RequestParam("uploadFile") MultipartFile uploadFile, HttpServletRequest request){
电脑是Mac M1 git拉取代码之后,直接启动的。但是我看application.properties配置中有jodconverter.local.office-home=D:/Programs/LibreOffice这一项配置 这个文件夹里面有什么特殊的东西?还是就是一个路径而已。
目前是直接启动报错,officeHome相关错误
`com.eastrobot.doc.watermark.WatermarkException: Docx4JException
Caused by: org.docx4j.openpackaging.exceptions.Docx4JException: This file seems to be a binary doc/ppt/xls, not an encrypted OLE2 file containing a doc/pptx/xlsx`
另外,问下同学。我看代码,发现生成水印的方式(图片水印/文字水印),最后都是以图片的形式作为水印加到文档里的是吗
当我使用这种方式加水印时:
InputStream in = new FileInputStream(inputUrl);
//获取word文档解析对象
XWPFDocument doucument = new XWPFDocument(in);
addWaterMark(doucument,"水印","#d8d8d8");
报错:
Exception in thread "main" java.lang.IndexOutOfBoundsException
at org.openxmlformats.schemas.wordprocessingml.x2006.main.impl.CTRImpl.getPictArray(Unknown Source)
at com.zhibei.utils.PoiUtil.addWaterMark(PoiUtil.java:339)
at com.zhibei.utils.PoiUtil.changeWord(PoiUtil.java:290)
at com.zhibei.utils.PoiUtil.main(PoiUtil.java:486)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.