Added the pdf backend.

Added support for the new diagrams-pdf backend.