Popular recipes tagged "meta:requires=pymupdf" but not "fitz"http://code.activestate.com/recipes/tags/meta:requires=pymupdf-fitz/2016-09-28T12:21:03-07:00ActiveState Code RecipesPDF Text Extraction using fitz / MuPDF (PyMuPDF) (Python)
2016-03-17T12:00:06-07:00Jorj X. McKiehttp://code.activestate.com/recipes/users/4193772/http://code.activestate.com/recipes/580626-pdf-text-extraction-using-fitz-mupdf-pymupdf/
<p style="color: grey">
Python
recipe 580626
by <a href="/recipes/users/4193772/">Jorj X. McKie</a>
(<a href="/recipes/tags/cbz/">cbz</a>, <a href="/recipes/tags/epub/">epub</a>, <a href="/recipes/tags/mupdf/">mupdf</a>, <a href="/recipes/tags/openxps/">openxps</a>, <a href="/recipes/tags/pdf/">pdf</a>, <a href="/recipes/tags/pymupdf/">pymupdf</a>, <a href="/recipes/tags/text_extraction/">text_extraction</a>, <a href="/recipes/tags/xps/">xps</a>).
</p>
<p>Extract all the text of a PDF (or other supported container types) at very high speed.
In general, text pieces of a PDF page are not arranged in natural reading order, but in the order they were entered during PDF creation.
This script re-arranges text blocks according to their pixel coordinates to achieve a more readable output, i.e. top-down, left-right.</p>
How to delete pages in a PDF using fitz / MuPDF / PyMuPDF (Python)
2016-05-01T09:26:44-07:00Jorj X. McKiehttp://code.activestate.com/recipes/users/4193772/http://code.activestate.com/recipes/580657-how-to-delete-pages-in-a-pdf-using-fitz-mupdf-pymu/
<p style="color: grey">
Python
recipe 580657
by <a href="/recipes/users/4193772/">Jorj X. McKie</a>
(<a href="/recipes/tags/mupdf/">mupdf</a>, <a href="/recipes/tags/pdf/">pdf</a>, <a href="/recipes/tags/pdf_generation/">pdf_generation</a>).
</p>
<p>A new method <strong>select()</strong> in PyMuPDF 1.9.0 allows selecting pages of a PDF document to create a new one. Any Python list of integers (0 <= n < page count) can be taken.</p>
<p>The resulting PDF contains all links, annotations and bookmarks (provided they still point to valid targets).</p>
Decrypt a PDF using fitz / MuPDF (PyMuPDF) (Python)
2016-03-17T12:22:10-07:00Harald Liederhttp://code.activestate.com/recipes/users/4191581/http://code.activestate.com/recipes/580627-decrypt-a-pdf-using-fitz-mupdf-pymupdf/
<p style="color: grey">
Python
recipe 580627
by <a href="/recipes/users/4191581/">Harald Lieder</a>
(<a href="/recipes/tags/decompression/">decompression</a>, <a href="/recipes/tags/decryption/">decryption</a>, <a href="/recipes/tags/pdf/">pdf</a>, <a href="/recipes/tags/repair/">repair</a>).
</p>
<p>It's more a code snippet. Shows how to dynamically check whether a PDF is password protected. If it is, decrypt it and save it back to disk un-encrypted.</p>
wxPython PDF / XPS Viewer using PyMuPDF (binding for fitz / MuPDF) (Python)
2016-09-28T12:21:03-07:00Jorj X. McKiehttp://code.activestate.com/recipes/users/4193772/http://code.activestate.com/recipes/580621-wxpython-pdf-xps-viewer-using-pymupdf-binding-for-/
<p style="color: grey">
Python
recipe 580621
by <a href="/recipes/users/4193772/">Jorj X. McKie</a>
(<a href="/recipes/tags/cbz/">cbz</a>, <a href="/recipes/tags/epub/">epub</a>, <a href="/recipes/tags/mupdf/">mupdf</a>, <a href="/recipes/tags/pdf/">pdf</a>, <a href="/recipes/tags/pymupdf/">pymupdf</a>, <a href="/recipes/tags/wxpython/">wxpython</a>, <a href="/recipes/tags/xps/">xps</a>).
Revision 2.
</p>
<p>A simple program to display a PDF (or XPS, EPUB, CBZ) document with forward / backward buttons and a field for directly jumping to a specific page.
It uses the Python binding PyMuPDF for fitz, the high-performance / high-quality graphics library of MuPDF.
It obviously can also be used to display XPS documents on non-Windows platforms.</p>
<p>This new version also supports any links contained in a page.</p>
Create Tiles of Images with fitz / MuPDF (PyMuPDF) (Python)
2016-04-26T19:54:31-07:00Jorj X. McKiehttp://code.activestate.com/recipes/users/4193772/http://code.activestate.com/recipes/580629-create-tiles-of-images-with-fitz-mupdf-pymupdf/
<p style="color: grey">
Python
recipe 580629
by <a href="/recipes/users/4193772/">Jorj X. McKie</a>
(<a href="/recipes/tags/mupdf/">mupdf</a>, <a href="/recipes/tags/png/">png</a>, <a href="/recipes/tags/pymupdf/">pymupdf</a>, <a href="/recipes/tags/tiles/">tiles</a>).
Revision 4.
</p>
<p>Take an image file (like PNG) and create a new one consisting of arbitrary tiles of the original (or overlay an existing image with selective tiles of another).</p>
Find all fonts used in a PDF document by page (Python)
2016-08-26T00:02:48-07:00Jorj X. McKiehttp://code.activestate.com/recipes/users/4193772/http://code.activestate.com/recipes/580651-find-all-fonts-used-in-a-pdf-document-by-page/
<p style="color: grey">
Python
recipe 580651
by <a href="/recipes/users/4193772/">Jorj X. McKie</a>
(<a href="/recipes/tags/pdf/">pdf</a>).
Revision 3.
</p>
<p>Finds all fonts used in a PDF document by page.
This new script is based on PyMuDF v1.9.2 and works for PDF files only.
However, it is a lot simpler, speed has drastically improved and there is no dependency on other packages any more.</p>
PDF Joiner / Splitter using wxPython, PyMuPDF (fitz / MuPDF) (Python)
2016-03-15T19:07:35-07:00Harald Liederhttp://code.activestate.com/recipes/users/4191581/http://code.activestate.com/recipes/580622-pdf-joiner-splitter-using-wxpython-pymupdf-fitz-mu/
<p style="color: grey">
Python
recipe 580622
by <a href="/recipes/users/4191581/">Harald Lieder</a>
(<a href="/recipes/tags/join/">join</a>, <a href="/recipes/tags/pdf/">pdf</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/split/">split</a>).
</p>
<p>Full featured PDF joiner. Join several PDF files into one output PDF. Page ranges can be specified as well as page orientation for each output page range. Tables of contents are intelligently preserved for each page range (can also be switched off).
Output PDF metadata editable.</p>
Create Sierpinski Carpet (Fractal) FAST (Python)
2016-03-16T08:56:08-07:00Jorj X. McKiehttp://code.activestate.com/recipes/users/4193772/http://code.activestate.com/recipes/580624-create-sierpinski-carpet-fractal-fast/
<p style="color: grey">
Python
recipe 580624
by <a href="/recipes/users/4193772/">Jorj X. McKie</a>
(<a href="/recipes/tags/fractal/">fractal</a>, <a href="/recipes/tags/sierpinski/">sierpinski</a>).
</p>
<p>Create a Sierpinski carpet using MuPDF's graphics library fitz (binding PyMuPDF) at high speed.</p>