最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

java - Apache POI ppt to image, broken table border - Stack Overflow

programmeradmin7浏览0评论

I created a table in ppt with 1px solid border applied to all. but If you check the resulting image using POI, you can see that the border is double-lined. how to fix it?

for (XSLFSlide slide : ppt.getSlides()) {
    BufferedImage image = new BufferedImage(pageSize.width, pageSize.height, BufferedImage.TYPE_INT_RGB);
    Graphics2D graphics = image.createGraphics();

    graphics.setFont(gqmsFontFamilyProvider.getDefaultFont());

    slide.draw(graphics);
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    ImageIO.write(image, "png", baos);
    images.add(baos.toByteArray());

    graphics.dispose();
    baos.close();
}

发布评论

评论列表(0)

  1. 暂无评论