I wanna open pdf file from python console, I can do it with os.system(filename)
, it will open in adobe reader, but the problem is that os.system
also opens a command prompt, is there another way that won't open command prompt?
Here are some of the most common culprits to consider: Your laptop doesn't have a PDF reader installed. Your PDF reader or preferred program is out of date and needs an update. Your PDF application is potentially damaged or needs to be rebooted.
Your Web Browser Web browsers like Google Chrome, Firefox, and Safari all have integrated PDF readers. To view a PDF on your browser, all you have to do is click on the PDF link. You can also open PDF files that are already stored on your computer by dragging them to an open tab in your browser.
Google Chrome can function as your default local PDF viewer, too. Right-click your PDF, and select Properties. Select Change, followed by Google Chrome. Then select Apply.
Try:
import subprocess subprocess.Popen([file],shell=True)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With