Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PDFMergerUtility pm = new PDFMergerUtility();
- File file = new File(filePath);
- pm.addSource(file);
- //Aufteilen, wenn es Farbe oder SchwarzWeiß ist
- if(filePath.contains("FARBE")) {
- pm.setDestinationFileName(destinationFileName);
- } else if(filePath.contains("BNW")) {
- pm.setDestinationFileName(destinationFileName);
- }
- //speichern
- pm.mergeDocuments(null);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement