page numbers and custom images

This commit is contained in:
Anthony Stirling
2023-07-04 21:45:35 +01:00
parent 3c54429fe0
commit f92482d89e
16 changed files with 317 additions and 8 deletions

View File

@@ -1,5 +1,9 @@
package stirling.software.SPDF.utils;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
@@ -88,4 +92,16 @@ public class GeneralUtils {
return newPageOrder;
}
public static boolean createDir(String path) {
Path folder = Paths.get(path);
if (!Files.exists(folder)) {
try {
Files.createDirectories(folder);
} catch (IOException e) {
e.printStackTrace();
return false;
}
}
return true;
}
}