Dia cannot export directly to Adobe's Portable Document Format. It can export to the Encapsulated PostScript vector format. As EPS is an Adobe specification it shares a lot of concepts with PDF, giving a pleasing accuracy in the PDF file.
The utility which does the magic is epstopdf, which is part of the TeTeX TeX distribution. This Perl script sets the bounding box and calls GhostScript to do the heavy lifting of the conversion.
Here is a GNU Make file for batch conversion of Dia diagrams in the current directory to PDF. It's a nice skeleton for people who have long-running batched file tasks, as Make takes care of a lot of details which are a real pain in shell scripts (such cleaning up after a Ctrl-C).
#!/usr/bin/gmake -f DIA=dia DIAFLAGS=--log-to-stderr --nosplash EPSTOPDF=epstopdf EPSTOPDFFLAGS= %.eps : %.dia $(DIA) $(DIAFLAGS) --filter=eps --export=$@ $< %.pdf : %.eps $(EPSTOPDF) $(EPSTOPDFFLAGS) --outfile=$@ $< SRC=$(wildcard *.dia) DST=$(SRC:.dia=.pdf) all: $(DST) .PHONY: clean clean: $(RM) $(RMFLAGS) $(DST) $(RM) $(RMFLAGS) $(SRC:.dia=.eps)
For the record, this is on Fedora 8:
$ rpm --query --file `which epstopdf` tetex-3.0-44.8.fc8 $ rpm --query --file `which dia` dia-0.96.1-6.fc8