• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 267
  • Last Modified:

Is the selected printer a postscript printer?

Hi,

I'm using Visual C++ 5.0 and MFC's common dialog class CPrintDialog to let the user select printer, printer options, and range of pages to print. After (s)he clicks OK I need to know if the selected printer is a postscript printer since we convert TIFF files to PS files before printing anything.

Any help is deeply appreciated!

Thanks,      
      Dan
_____________________________
Dan Andersson
Frontec Norr AB
Sweden
Email: dan@lule.frontec.se
0
DANANDERSSON
Asked:
DANANDERSSON
  • 2
1 Solution
 
AVaulinCommented:
Use CPrintDialog::GetDevMode. If dmTTOption field of returned DEVMODE structure equal DMTT_SUBDEV then selected printer is PostScript.
0
 
DANANDERSSONAuthor Commented:
I was a little to quick to give A Vaulin credit for the answer. It seems like all my printers give the value of the dmTTOption field to DMTT_SUBDEV. For instance I have a laber printer (Axiohm LabelWriter XL Plus) that definitely is not a Postscript printer. This printer gives the value DMTT_SUBDEV.

Have any other clues?

Thanks,
                 Dan    (dan@lule.frontec.se)
0
 
AVaulinCommented:
There is also one way: there is dmDeviceName member which is unique among device drivers. You can analyze it.
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now