This commit is contained in:
Anthony Stirling
2024-05-27 16:31:00 +01:00
parent b93bff5cad
commit 6ffa80c386
21 changed files with 526 additions and 147 deletions

View File

@@ -59,7 +59,7 @@ public class ConvertWebsiteToPDF {
pdfBytes = Files.readAllBytes(tempOutputFile);
} finally {
// Clean up the temporary files
Files.delete(tempOutputFile);
Files.deleteIfExists(tempOutputFile);
}
// Convert URL to a safe filename
String outputFilename = convertURLToFileName(URL);