Casestudy
Read our latest CasestudyAvailable via PyPi
Install easily with:pip install PyMuPDF
pip install PyMuPDF
Please run the samples and/or type your own Python code to learn PyMuPDF.
pymupdf.version
import pyodide.http
r = await pyodide.http.pyfetch('https://pymupdf.io/docs/mupdf_explored.pdf')
data = await r.bytes()
doc = pymupdf.Document(stream=data)
print(f'Is PDF: {doc.is_pdf}')
print(f'Number of pages: {doc.page_count}')
import pyodide.http
r = await pyodide.http.pyfetch('https://pymupdf.io/docs/mupdf_explored.pdf')
data = await r.bytes()
doc = pymupdf.Document(stream=data)
for page in doc:
print(f'Page: {page.number}')
import pyodide.http
r = await pyodide.http.pyfetch('https://pymupdf.io/docs/mupdf_explored.pdf')
data = await r.bytes()
doc = pymupdf.Document(stream=data)
for page in doc:
for annot in page.annots():
print(f'Annotation on page: {page.number} with type: {annot.type} and rect: {annot.rect}')
If you determine you cannot meet the requirements of the AGPL, please contact Artifex for more information regarding a commercial license.