Beta
Java 8 or greater
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.5.13.1</version>
</dependency>
- Folder
- Zip file
- Pdf file
- PNG file
- JPEG file
- JPG file
- TIFF file
- TXT file
- PPT(X file)
- DOC(X file)
- XLS(X file)
List of all processed files
- Files are pipelined throw processors (Virus scan, ...)
- Next, they are pipelined through converters
- Next, the resulting pdf files are pipelined through transformers (Scale, Change paper format, ...)
- Last, they are stored on the output directory
static void run(String path, double scale, Format format) {
try {
PdfConverterEngine engine = PdfConverterEngine.engine();
// Ex : engine.addFileConverter(converter);
Configuration conf = Configuration.of(new File("./tmp"), new File("./out"), new ArrayList<>());
// Ex : conf.addFileProcessor(processor);
FileData fileData = FileData.of(new File(path), scale, format);
List<FileResponse> files = engine.convert(fileData, conf);
System.out.println("End");
files.stream().forEach(System.out::println);
} catch (Exception e) {
e.printStackTrace();
}
}
- Implements the DOCXFileConverter
- Implements the PPTXFileConverter
- Implements the XLSXFileConverter
Inspired from a job post on Upwork