Python Forum

Full Version: How to display a pdf file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

I'm migrating a bash script I coded, which reads pdf files (pages of a ancient greek to french dictionnary) and displays them to the user. I tried the pipes methods, without success as the pdf viewer does not seem able to display what it get on /dev/stdin.

Has anybody an idea on how I can achieve this goal ?

Arbiel
Depends a bit on which graphics package you are using.
If Tkinter, try https://www.codespeedy.com/how-to-create...ng-python/
This works for me:
>>>import webbrowser as wb
>>> wb.open('test.pdf')
Thank at both of you

I've tried steve_shambles's solution and I'm quite happy with it.

Arbiel