Problems with HP printers
-
I have been having some issues with HP printers (HP DesignJet 1055CM and HP DesignJet 5500ps 60 HPGL2) and Qt.
Firstly I'm on windows, and have bypassed the QPrintDialog as this displays a dialog that brings up the print dialog, while I want a print properties dialog.So I do this my self using PrintDlg win32 API with the Flag PD_PRINTSETUP.
Once the user accepts this dialog, I attempt to apply the values to a QPrinter.The first problem is HP drivers do not change the dmColor field of the DEVMODE structure so when you set to greyscale this value is still 1.
The second problem is setting of a custom paper size. HP printers ignore setting dmPaperWidth or dmPaperLength. It looks to exclusively use dmPaperSize. To compound the problem, the drivers do not allow me to use the win32 API AddForm, or SetForm.
When you set up a custom paper size, this information seems to be saved in the printer so if you print using the result from PrintDlg
it should print correctly. Just extracting this information seems to be a problem.Has any one run in to a similar situation? I can see the only solution to my problem is to roll my own version of QWin32PrintEngine