java将pdf文件转成图片后删除pdf文件计算机等级考试
文章作者 100test 发表时间 2010:01:08 20:19:57
来源 100Test.Com百考试题网
/**
* 将pdf转成img
*/
public static void changePdfToImg() {
try {
File file = new File("E:\\test\\baseInfo_2.pdf").
RandomAccessFile raf = new RandomAccessFile(file, "r").
FileChannel channel = raf.getChannel().
MappedByteBuffer buf = channel.map(FileChannel.MapMode.READ_ONLY, 0, channel.size()).
PDFFile pdffile = new PDFFile(buf).
for (int i = 1. i