mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2024-11-18 21:30:10 +01:00
blank page path problem fixed
This commit is contained in:
parent
c4e5bfdabb
commit
089b2290bd
@ -81,7 +81,7 @@ public class BlankPageController {
|
|||||||
BufferedImage image = pdfRenderer.renderImageWithDPI(pageIndex, 300);
|
BufferedImage image = pdfRenderer.renderImageWithDPI(pageIndex, 300);
|
||||||
ImageIO.write(image, "png", tempFile.toFile());
|
ImageIO.write(image, "png", tempFile.toFile());
|
||||||
|
|
||||||
List<String> command = new ArrayList<>(Arrays.asList("python3", System.getProperty("user.dir") + "scripts/detect-blank-pages.py", tempFile.toString() ,"--threshold", String.valueOf(threshold), "--white_percent", String.valueOf(whitePercent)));
|
List<String> command = new ArrayList<>(Arrays.asList("python3", System.getProperty("user.dir") + "/scripts/detect-blank-pages.py", tempFile.toString() ,"--threshold", String.valueOf(threshold), "--white_percent", String.valueOf(whitePercent)));
|
||||||
|
|
||||||
// Run CLI command
|
// Run CLI command
|
||||||
int returnCode = ProcessExecutor.getInstance(ProcessExecutor.Processes.PYTHON_OPENCV).runCommandWithOutputHandling(command);
|
int returnCode = ProcessExecutor.getInstance(ProcessExecutor.Processes.PYTHON_OPENCV).runCommandWithOutputHandling(command);
|
||||||
|
Loading…
Reference in New Issue
Block a user