问题:aspose.words 20.2 android via java 在oppo r17上将word渲染成图片时,部分文字会重叠
补充信息:在华为p30 pro上,同样的word文件问题不能重现。归档.zip (109.4 KB)
附件中:
- 输入文件.doc 是复现问题用的word文档
- 输出文件缩略图.jpeg 是把word文档每页处理成一张png图片,然后以缩略图展示,放大后可以看到部分中文重叠在了英文上。
word每页转png代码如下:
private String renderWordPage(Request request, int index) throws Exception {
Document doc = new Document(request.path);
ImageSaveOptions options = new ImageSaveOptions(SaveFormat.PNG);
options.setPageCount(doc.getPageCount());
options.setImageColorMode(ColorMode.NORMAL);
options.setColorMode(ColorMode.NORMAL);
options.setUseAntiAliasing(false);
options.setMemoryOptimization(true);
options.setPrettyFormat(true);
options.setUseHighQualityRendering(true);
File pageFile = createFile(request.pagePngName(index));
if (!pageFile.exists()) {
float scale = getScale(doc.getPageInfo(index), request.width);
options.setScale(scale);
options.setPageIndex(index);
doc.save(pageFile.getAbsolutePath(), options);
}
return pageFile.getAbsolutePath();
}