public static void main(String[] args) throws Exception {
String inputFileName = Paths.get("979943-BLU-625.docx").toString();
Document document = new Document(inputFileName);
final ImageSaveOptions options = new ImageSaveOptions(SaveFormat.JPEG);
options.setImageBrightness(0.7f);
options.setImageContrast(0.7f);
final List<FileTargetDTO> list = new ArrayList<>(document.getPageCount());
log.info("document size:"+document.getPageCount());
for (int i = 0; i < document.getPageCount(); i++) {
options.setPageSet(new PageSet(i));
final String filename = "aaa";
document.save(filename,options);
}
}
https://tezign-assets.oss-cn-beijing.aliyuncs.com/b82091828ba6f1a7e6011606dc468b77.docximage.zip (1.3 MB)