itext version 2.1.7

itext操作rtf文档其实还是挺方便的。

itext为图片操作提供了一个类com.lowagie.text.Image,使用方法如下:

    static Image createImage(URL path) {
Image image;
try {
image = Image.getInstance(path);
image.setAlignment(Image.UNDERLYING);
image.scaleAbsolute(400, 320);
return image;
} catch (BadElementException e) {
e.printStackTrace();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}



相关文章:

  • 2021-07-19
  • 2022-01-18
  • 2021-06-26
  • 2021-06-15
  • 2022-01-02
  • 2022-12-23
  • 2021-04-18
猜你喜欢
  • 2022-01-20
  • 2021-12-14
  • 2022-02-22
  • 2021-11-25
  • 2021-07-07
相关资源
相似解决方案