/***
*
* @param source 源文件
* @param target 目标文件
* @param n 缩放系数
*/
private static void changePdfToImg(String source,String target,int n) {
try {
File file = new File(source);
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);
BufferedImage tag = new BufferedImage(595 * 2, 842 * 2 * pdffile.getNumPages(), BufferedImage.TYPE_INT_RGB);
for (int i = 1; i
*
* @param source 源文件
* @param target 目标文件
* @param n 缩放系数
*/
private static void changePdfToImg(String source,String target,int n) {
try {
File file = new File(source);
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);
BufferedImage tag = new BufferedImage(595 * 2, 842 * 2 * pdffile.getNumPages(), BufferedImage.TYPE_INT_RGB);
for (int i = 1; i