I’ve written a version of Ocaml’s Graphics module which outputs PDF directly, using the CamlPDF library – its only dependency. It’s based on the approach of Pierre Weis’ GraphPS program.
It has the same API as Ocaml’s module – just have your build process find the GraphPDF files before it finds the system ones – the vast majority of programs shouldn’t need altering.
Get it here.