I’m looking for some API for printing.
Basically what I want to achieve is to print set of pixels(monochromatic bitmap which I store in memory) onto the generic paper format (A4,A5..etc.).
What I think that would be minimum API is:
- printer devices list
- printer buffer where I could send my in-memory pixmap (ex. like winXP printer tasks folder)
- some API which would translate SI dimensions onto printer resolution, or according to previous – in memory pixmap (ex. 450×250) onto paper in appropriate resolution.
What I was considering is postScript, but I’ve some old LPT drived laserjet which probably doesn’t support *PS.
Currently I’m trying to find something interesting in Qt – QGraphicsView.
Well you got close, look at Printing in Qt. There is the QPrinter class that implements some of what you are looking for. It is implmenetent as a
QPaintDevice. This means that any widget that can render itself on the screen can be printed. This also mean you don’t need to render to a bitmap to print, you can use Qt widgets or drawing functions for printingOn a side note, check the version number of the Qt documentation, the last release of Qt is 4.5, 4.6 is in beta.