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

How do I determine if a printer will print to PDF format

I need to be able to check all installed printersand or drivers programatically on a pc and determine if they can produce a PDF file, So that I am able to give the choice of which one to choose.
0
SCSUSERLTD
Asked:
SCSUSERLTD
2 Solutions
 
sls80Commented:
What language are you programming in?

Also, generally you would create a PDF file and then send it as a print job to a selected printer. Are you using non-typical printers that would not be able to print PDFs?
0
 
SCSUSERLTDAuthor Commented:
Sorry should have mentioned language.
I am programming with VB6.

There are various printers/drivers that can be installed to produce a PDF file, in addition to Adobe Distiller

I am writing a DLL that will allow a user to add an email attachment, If a PDF writer or writers are installled then the user should be shown the list and allow them to select a PDF printer. The resulting PDF file would then be attached to the email and sent. The users  printer selection would then be used for any future email attachments



0
 
Arno KosterCommented:
I don't know any property which states wether a printer can generate pdf output or not.

Maybe you could manually make a list of all printers that allow pdf creation and check for (parts of) their name ?
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
sls80Commented:
There is a zip file on this site that contains an example of how to enumerate through printer drivers for various operating systems:
http://www.vbdiamond.com/ViewSource.aspx?Type=VB&ID=114702 

Direct link to zip download:
http://www.vbdiamond.com/DownloadFile.aspx?Type=VB&ID=26163

This site also provides an example of accessing printer driver properties that may be of some use:
http://www.devx.com/vb2themax/Tip/19573

I think the above suggestion about detecting printer drivers allowing PDF creation is a good one, as I'm not sure if that is possible either. It would need to be an available property of the printer driver in VB6 for you to be able to pick it up programatically, and I don't think that is the case. A naming convention for printer drivers may be the way to go, or you could automatically create a printer driver when your code executes if you know that the other components are available.
0
 
SCSUSERLTDAuthor Commented:
Thanks for the suggestions I will try them.
Will come back with progress
0
 
santosh26676Commented:
MAy be use the Printers object and run thru the properties. It will have a property that will indiacte the drivers used by each printer. Incase you find "PDF" in the driver you know it is a PDF Driver.

Hope this helps.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

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