亲测,完美转换!
public static void pdfToTif() {
PDDocument doc = null;
FileOutputStream fos = null;
try {
//获取pdf的内容
doc = PDDocument.load(new File("D:\\1.pdf"));
//获取pdf的页数
int pageCount = doc.getNumberOfPages();
// 根据PDDocument对象创建pdf渲染器
PDFRenderer renderer = new PDFRenderer(doc);
List<PlanarImage> piList = new ArrayList<PlanarImage>(pageCount - 1);
// 创建tiff编码参数类
TIFFEncodeParam param = new TIFFEncodeParam(