I would like to know how to delete the pdf file when printing has finished in Python. I have tried a different method, but it doesn't work.
Method 1:
import os os.startfile("test.pdf", "print") os.remove("test.pdf")
Method 2:
import os import time os.startfile("test.pdf", "print") timesleep(10) os.remove("test.pdf")
Method 3: Print a PDF and delete the file when printing has finished
However, I find that the installation of GSview is not available.
Delete the pdf file when printing has finished in python.