Latest recipes tagged "textbox"http://code.activestate.com/recipes/tags/textbox/new/2017-06-29T22:54:25-07:00ActiveState Code RecipesInsert a Text Box in a PDF page (fitz / PyMuPDF) (Python)
2017-06-29T22:54:25-07:00Jorj X. McKiehttp://code.activestate.com/recipes/users/4193772/http://code.activestate.com/recipes/580809-insert-a-text-box-in-a-pdf-page-fitz-pymupdf/
<p style="color: grey">
Python
recipe 580809
by <a href="/recipes/users/4193772/">Jorj X. McKie</a>
(<a href="/recipes/tags/fitz/">fitz</a>, <a href="/recipes/tags/mupdf/">mupdf</a>, <a href="/recipes/tags/pdf/">pdf</a>, <a href="/recipes/tags/textbox/">textbox</a>).
</p>
<p>This method inserts text into a predefined rectangular area of a (new or existing) PDF page.
Words are distributed across the available space, put on new lines when required etc. Line breaks and tab characters are respected / resolved.
Text can be aligned in the box (left, center, right) and fonts can be freely chosen.
The method returns a float indicating how vertical space is left over after filling the area.</p>