diff --git a/main.py b/main.py index d2e5525..dab32a0 100644 --- a/main.py +++ b/main.py @@ -64,6 +64,7 @@ async def unoConvertDocument(sourceDocumentPath, sourceDocumentName): outputDocumentPath = Path(outputDir) / Path(f"{sourceDocumentName}").with_suffix('.pdf') Path(outputDir).mkdir(parents=True, exist_ok=True) # Ensure directory exists subprocess.run(args=[unoconvertPath, "--convert-to", "pdf", sourceDocumentPath, outputDocumentPath]) + subprocess.run(args=["rm", sourceDocumentPath], check=True) return outputDocumentPath async def convertDocumentOneShot(sourceDocumentPath, sourceDocumentName):