In my app, we are able to export to bitmap graphics files with QImage, and with qprinter, to export proper PDF and PS files.

However, we also need to be able to export to encapsulated postscript (which is just a ps file with bounding box info). Using qimage produces a bitmap, which isn't what we want - we need a proper postscript file with vector lines and proper fonts.

In the past, we've exported to a regular .ps file, edited it to insert the bounding box info, and renamed it. This really sounds like a hack. Is there a better way to do this?