Popular recipes tagged "word" and "python" but not "singular"http://code.activestate.com/recipes/tags/word-singular+python/2013-12-24T23:03:43-08:00ActiveState Code RecipesConvert Microsoft Word files to PDF with DOCXtoPDF (Python)
2013-12-24T23:03:43-08:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/578795-convert-microsoft-word-files-to-pdf-with-docxtopdf/
<p style="color: grey">
Python
recipe 578795
by <a href="/recipes/users/4173351/">Vasudev Ram</a>
(<a href="/recipes/tags/docx/">docx</a>, <a href="/recipes/tags/microsoft/">microsoft</a>, <a href="/recipes/tags/pdf/">pdf</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/word/">word</a>, <a href="/recipes/tags/xtopdf/">xtopdf</a>).
</p>
<p>Yhis recipe shows how to convert Microsoft Word .DOCX files to PDF format, using the python-docx library and my xtopdf toolkit for PDF creation.</p>
<p>Note: The recipe has some limitations. E.g. fonts, tables, etc. from the input DOCX file are not preserved in the output PDF file.</p>
Minimalistic Word Wrap using Regex (Python)
2012-06-07T14:31:44-07:00Alfehttp://code.activestate.com/recipes/users/4182236/http://code.activestate.com/recipes/578162-minimalistic-word-wrap-using-regex/
<p style="color: grey">
Python
recipe 578162
by <a href="/recipes/users/4182236/">Alfe</a>
(<a href="/recipes/tags/minimalistic/">minimalistic</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/regex/">regex</a>, <a href="/recipes/tags/word/">word</a>, <a href="/recipes/tags/wrap/">wrap</a>).
</p>
<p>I know there is the module textwrap and other recipes like <a href="http://code.activestate.com/recipes/148061-one-liner-word-wrap-function/" rel="nofollow">http://code.activestate.com/recipes/148061-one-liner-word-wrap-function/</a></p>
<p>But in some constellations my recipe for a very simple word wrap might come in handy nevertheless.</p>
Word Wrap for Proportional Fonts (Python)
2011-11-11T21:29:21-08:00Michael Foglemanhttp://code.activestate.com/recipes/users/4171845/http://code.activestate.com/recipes/577946-word-wrap-for-proportional-fonts/
<p style="color: grey">
Python
recipe 577946
by <a href="/recipes/users/4171845/">Michael Fogleman</a>
(<a href="/recipes/tags/fixed/">fixed</a>, <a href="/recipes/tags/font/">font</a>, <a href="/recipes/tags/proportional/">proportional</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/text/">text</a>, <a href="/recipes/tags/word/">word</a>, <a href="/recipes/tags/word_wrap/">word_wrap</a>, <a href="/recipes/tags/wrap/">wrap</a>).
</p>
<p>Word wrap function / algorithm for wrapping text using proportional (versus
fixed-width) fonts.</p>
<p><code>text</code>: a string of text to wrap
<code>width</code>: the width in pixels to wrap to
<code>extent_func</code>: a function that returns a (w, h) tuple given any string, to
specify the size (text extent) of the string when rendered.
the algorithm only uses the width.</p>
<p>Returns a list of strings, one for each line after wrapping.</p>
Textual diffs between word files (Python)
2010-02-16T08:58:07-08:00Joseph Reaglehttp://code.activestate.com/recipes/users/4171494/http://code.activestate.com/recipes/577055-textual-diffs-between-word-files/
<p style="color: grey">
Python
recipe 577055
by <a href="/recipes/users/4171494/">Joseph Reagle</a>
(<a href="/recipes/tags/diff/">diff</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/word/">word</a>).
</p>
<p>Diff two directories of Word documents, providing extra context as well, using antiword and dwdiff.</p>