Before we get into the details it is useful to review the dia command line options. Dia supports all of the usual Gnome, GTK+ and Session Management options which are listed with the -help option. In addition dia has just a single option, -export, abbreviated as -e. This will generate an exported graphic of the supplied dia diagram in one of the supported export formats. The particular export format is determined from the supplied filename extension. Thus,
dia --export survey-chart.eps survey-chart.dia
generates an Encapsulated PostScript image while
dia --export survey-chart.png survey-chart.dia
generates a Portable Network Graphics image.