Previewing

text items

All text items can be scaled down by resizing the font by a small jquery js code. If non text is transcluded it must be exchanged to its preview or a placeholder. This respects also ACLs for transcluded stuff.

non text items

For all non text items we have to create an image. This can for example be done by a firefox plugin (Pearl Crescent Page Saver) on the server.

saveimage_cmd = """xvfb-run --auto-servernum --server-num 2 "--server-args=-screen 0, 800x600x24" /usr/bin/firefox -savepng %(url)s -savelog /dev/null """

The image can be scaled down to a comfortable preview size by PIL.

Some examples of the excellent quality by that browser plugin

MoinMoin: ReimarBauer/Moin2BrainDump/Preview (last edited 2011-08-24 19:29:10 by ReimarBauer)