Solved

Is the selected printer a postscript printer?

Posted on 1997-05-30
3
257 Views
Last Modified: 2013-12-03
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
Comment
Question by:DANANDERSSON
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
AVaulin earned 100 total points
ID: 1397719
Use CPrintDialog::GetDevMode. If dmTTOption field of returned DEVMODE structure equal DMTT_SUBDEV then selected printer is PostScript.
0
 

Author Comment

by:DANANDERSSON
ID: 1397720
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
 
LVL 4

Expert Comment

by:AVaulin
ID: 1397721
There is also one way: there is dmDeviceName member which is unique among device drivers. You can analyze it.
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article was inspired by a question here at Experts Exchange (http://www.experts-exchange.com/Software/Photos_Graphics/Images_and_Photos/Q_28629170.html). The requirements stated in that question are (1) reduce the file size of a large number of…
In a previous article here at Experts Exchange (http://www.experts-exchange.com/articles/18414/Create-a-PDF-file-with-Contact-Sheets-montage-of-thumbnails-for-all-JPG-files-in-a-folder-and-each-of-its-subfolders-using-an-automated-batch-method.html)…
In this third video of the Xpdf series, we discuss and demonstrate the PDFtoText utility, which converts PDF files into plain text files. Download and install the software.: You may have already downloaded and installed the Xpdf tools while watching…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question