This demonstrates the superior rendering capabilities of MuPDF using wxPython as the display manager.
To access the program, have a look at PDFdisplay.py in the demo folder of the repository.
To access the program, have a look at PDFdisplay.py in the demo folder of the repository.
In this NLP Tutorial, we will use Python NLTK library. Before I start installing NLTK, I assume that you know some Python basics to get started. Install NLTK. If you are using Windows or Linux or Mac, you can install NLTK using pip: $ pip install nltk. You can use NLTK on Python 2.7, 3.4, and 3.5 at the time of writing this post.
Changes in PyMuPDF v1.9.2
The program now supports the display of links contained in a page. When activating this option, the next displayed page will mark any link with a blue-lined frame. When clicking such a link, the respective action will be performed. Supported are links within the document (
GoTo
), links to other documents (GoToR
, in this case subprocess.Popen
is used to display the requested document with the standard PDF reader), links to web sites (URI
) and named destinations.Using wxPython-Phoenix
When using this newest wxPython version, you can simply use its new
pdfviewer
class. This class uses PyMuPDF as its default PDF module (falling back to PyPDF2 if PyMuPDF is unavailable). Here is the sample code provided in the online documentation.This GUI script is based on Tkinter and the pure Python package PySimpleGUI.
It runs with Python 2 or 3 (you must install PySimpleGUI27 if Python 2).
The script features direct jumping to pages, Next / Previous buttons and - for demonstration purposes - also has some buttons to zoom into quarter pages of the display.
Also note, that not only PDF files can be displayed - support is for all document types (XPS, EPUB, ...).