Popular recipes tagged "meta:requires=reportlab.pdfgen"http://code.activestate.com/recipes/tags/meta:requires=reportlab.pdfgen/2009-07-06T10:03:28-07:00ActiveState Code RecipesImproved ReportLab recipe for "page x of y" (Python)
2009-07-06T10:03:28-07:00Vinay Sajiphttp://code.activestate.com/recipes/users/4034162/http://code.activestate.com/recipes/576832-improved-reportlab-recipe-for-page-x-of-y/
<p style="color: grey">
Python
recipe 576832
by <a href="/recipes/users/4034162/">Vinay Sajip</a>
(<a href="/recipes/tags/pdf/">pdf</a>, <a href="/recipes/tags/reportlab/">reportlab</a>).
Revision 2.
</p>
<p>This recipe is based on <a href="http://code.activestate.com/recipes/546511/"><a href="http://code.activestate.com/recipes/546511/">Recipe 546511</a></a> which does not work reliably if there are images in the content.</p>
PDF a Directory of Images using Reportlab (Python)
2009-04-12T08:35:10-07:00andrew.canithttp://code.activestate.com/recipes/users/4169843/http://code.activestate.com/recipes/576717-pdf-a-directory-of-images-using-reportlab/
<p style="color: grey">
Python
recipe 576717
by <a href="/recipes/users/4169843/">andrew.canit</a>
(<a href="/recipes/tags/directory/">directory</a>, <a href="/recipes/tags/images/">images</a>, <a href="/recipes/tags/pdf/">pdf</a>).
</p>
<p>Walk through a directory PDFing Images</p>
Generate a PDF Greeting Card (Python)
2007-12-06T04:06:04-08:00greg phttp://code.activestate.com/recipes/users/4047849/http://code.activestate.com/recipes/535155-generate-a-pdf-greeting-card/
<p style="color: grey">
Python
recipe 535155
by <a href="/recipes/users/4047849/">greg p</a>
(<a href="/recipes/tags/programs/">programs</a>).
Revision 2.
</p>
<p>Code to generate a PDF greeting card using a user specified image, and text.</p>
<p>You can try it out online here: <a href="http://utilitymill.com/utility/Greeting_Card_Generator" rel="nofollow">http://utilitymill.com/utility/Greeting_Card_Generator</a></p>
How to use Cyrillic fonts in ReportLab PDF library (Python)
2005-08-06T10:02:14-07:00Yuriy Tkachenkohttp://code.activestate.com/recipes/users/2011468/http://code.activestate.com/recipes/438817-how-to-use-cyrillic-fonts-in-reportlab-pdf-library/
<p style="color: grey">
Python
recipe 438817
by <a href="/recipes/users/2011468/">Yuriy Tkachenko</a>
(<a href="/recipes/tags/text/">text</a>).
</p>
<p>By default ReportLab PDF library <a <a href="http://href=%22http://www.reportlab.com%22%3Ehttp://www.reportlab.com" rel="nofollow">href="http://www.reportlab.com">http://www.reportlab.com</a></a> doesn't allow
easy using Cyrillic fonts for generating PDF documents. The following example
explains how to use any font in the Adobe AFM ('Adobe Font Metrics') and PFB
('Printer Font Binary') format (aka Type 1) which supports Unicode Cyrillic
characters (glyphs). It assumes that you have font files named 'a010013l.afm'
and 'a010013l.pfb' in the same directory with this example.
The font files can be found in /usr/share/fonts/default/Type1 directory in
many Linux distributions.</p>
List all Type 1 Cyrillic fonts to one PDF file (Python)
2005-08-06T12:15:13-07:00Yuriy Tkachenkohttp://code.activestate.com/recipes/users/2011468/http://code.activestate.com/recipes/438818-list-all-type-1-cyrillic-fonts-to-one-pdf-file/
<p style="color: grey">
Python
recipe 438818
by <a href="/recipes/users/2011468/">Yuriy Tkachenko</a>
(<a href="/recipes/tags/text/">text</a>).
</p>
<p>This example uses ReportLab PDF library <a <a href="http://href=%22http://www.reportlab.com%22%3Ehttp://www.reportlab.com" rel="nofollow">href="http://www.reportlab.com">http://www.reportlab.com</a></a> and made
from reportlab/demos/stdfonts/stdfonts.py demo. It generates tables showing
all Type 1 fonts in Cyrillic cp1251 encoding in /usr/share/fonts/default/Type1
Linux directory. It may be helpful for choosing most suitable fonts for your
documents.</p>
serving dynamically-generated PDF files via XML/RPC (Python)
2005-05-05T23:41:15-07:00gian paolo cicerihttp://code.activestate.com/recipes/users/631476/http://code.activestate.com/recipes/413404-serving-dynamically-generated-pdf-files-via-xmlrpc/
<p style="color: grey">
Python
recipe 413404
by <a href="/recipes/users/631476/">gian paolo ciceri</a>
(<a href="/recipes/tags/distributed/">distributed</a>).
</p>
<p>It's only a matter to put together Reportlab to generate a pdf file on the fly and Cherrypy xmlrpc filter to serve it as an XML/RPC binary object (base64-encoded).</p>