Version 13 (modified by robin, 4 years ago) (diff)


Render dia and vdx files


This plugin automatically creates a bitmapped render of Dia and MS Visio VDX diagrams when attaching them to objects in Trac.

This has taken the original DiaViewPlugin and modified it for use with Trac 0.11, and at the same time included support for vdx and compressed files.

It has had very little testing. It has been set up as a separate hack to the original DiaViewPlugin so as not to break DiaViewPlugin for Trac < 0.11.

If the width was changed in the macro argument the displayed image would scale, however the source file stayed the same. To overcome this the width is checked using the image library, and if different it is re-rendered. Please see the link below for the image library.

Bugs/Feature Requests

Existing bugs and feature requests for DiaVisViewPlugin are here.

If you have any issues, create a new ticket.

Download and Source

Download the zipped source, check out using Subversion, or browse the source with Trac.


To install download the archive, then either $ python install or copy it to the plugins directory of the particular project

Do not forget to enable the macro in trac.ini in the components section like this:

diavisview.* = enabled

Also ensure that dia (diagram editor) and the Python Imaging Library (cf. link above) are installed.

Attach a file you wish to display to the page as per normal. The files can be either dia or vdx, compressed or uncompressed.

Make suitable macro entries in the page. If a number is given after the filename it will be taken as the width. Please see the main image macro for all the options.


[[DiaVisView(Diagram2.vdx, border=5)]]

Recent Changes

[11124] by Martin on 2012-01-07 15:51:57
Closes #9674.
[11123] by Martin on 2012-01-07 15:51:22
Closes #9673.
[8100] by Martin on 2010-06-08 18:53:20
Support for --show-layers. Closes #7193.

  • new parameter layers
  • accepts dot separated list of layer numbers

E.g. [[DiaVisView(myfile.dia, layers=0.3.7)]]


Author: robert_martin
Maintainer: robert_martin
Contributors: arkemp

Bug Report

It seems that each time when you refresh the page, the png file would generate automatically if you haven't set the png file width on the wiki. Here is my solution: Change the code

    if (dia_mtime > png_mtime) or (existing_width != width): 


    if (dia_mtime > png_mtime) or (existing_width != width and width != None):

That's all.