PDFStyles.py Inserting images in footer

192 views
Skip to first unread message

Kunal

unread,
Jul 16, 2008, 2:28:55 PM7/16/08
to mwlib
Hi

I wanted to know whether it is possible to insert images in
PDFStyles.py to get some graphic in the footer.

Thanks
Kunal Deo

Volker Haas

unread,
Jul 17, 2008, 6:28:26 AM7/17/08
to mw...@googlegroups.com
Hi Kunal,

I updated the README.txt file of mwlib.rl which now contains hints on
how to customize the PDF layout.

Regarding your question, currently it is only possible to add inline
images (via XML Markup Tags for reportlab Paragraph objects).
To make things even more "interesting" for you, these inline image are
currently an undocumented feature of reportlab. --> You need to look at
the reportlab source code too ;)

Let me give you a quick example:

pagefooter = 'All Articles originate <img
src="/someabsolutepath/test.jpg" width="0.5in" height="0.2in"
valign="bottom" /> from @WIKITITLE@ (@WIKIURL@)'

As described in the README.txt now, you should add the above line to
your (newly created) customconfig.py file. For reference you should look
at the pdfstyles.py file.

This should result in an inline image in the page footer.

Regards,
Volker
--
volker haas brainbot technologies ag
fon +49 6131 2116394 boppstraße 64
fax +49 6131 2116392 55118 mainz
volke...@brainbot.com http://www.brainbot.com/

Reply all
Reply to author
Forward
0 new messages