0

I was trying to write a program. I'm using tkinter and I've created a label and a menu bar. I would like to open a PDF from the menu bar (HELP --> Instruction for use), but I don't know how. I've tried the module filedialog.askopenfile but it is not appropriate for me because I want to dispay a specific PDF on screen and not browse through them.
Here is the code for the menu bar:

subMenu = Menu (menubar, tearoff = 0)
menubar.add_cascade (label = "Help")
subMenu.add_command (label =" Instruction for use", command = help)





def help ():
TheTechRobo the Nerd
  • 1,249
  • 15
  • 28
  • Does this answer your question? [PDF Viewer for Python Tkinter](https://stackoverflow.com/questions/26653929/pdf-viewer-for-python-tkinter) – juzraai Jun 27 '20 at 15:01
  • actually nope ! I'm using python 3.x – Albert_programmer Jun 27 '20 at 15:09
  • 1
    can you perhaps just request the shell to open the file, e.g. by using `os.system`? – michalwa Jun 27 '20 at 15:25
  • [This project](http://africanenergylife.eklablog.com/tkinter-tutorial-python-pdf-reader-a184607126) is a PDF viewer written in Tkinter (so you can check out the source code to see how they do it). I also found [this](https://www.codespeedy.com/how-to-create-a-pdf-viewer-using-python/), [this answer](https://stackoverflow.com/a/27987190/9654083), and [this Windows-only answer](https://stackoverflow.com/a/43747338/9654083). – TheTechRobo the Nerd Jun 27 '20 at 16:36

0 Answers0