OT: Fake Printer Driver

OT: Fake Printer Driver

Postby Jeff Barnes » Tue Jun 28, 2011 8:14 pm

Hi,

Does anyone know of a "printer driver" that will force the printer selection box to open.

I have a customer that is using a software package that will only print to the windows default printer but sometimes they need to print to a different printer.
It is a pain for them to keep switching the default printer.
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: OT: Fake Printer Driver

Postby ukoenig » Tue Jun 28, 2011 9:44 pm

Hello Jeff,

there is a Function

SetPrintDefault()

Sets the specified printer as the default printer.
Syntax:
SetPrintDefault( <cModel> ) --> nil
Parameters:
<cModel> The name of the new default printer.
Returns:
Nil

Source Code:
SOURCE\CLASSES\PRINTER.PRG


please search inside the Forum, to get the Informations You need.

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: OT: Fake Printer Driver

Postby Jeff Barnes » Tue Jun 28, 2011 10:47 pm

I'm not looking to do this via code. The software I am working with always prints to the windows default printer therefore the user cannot select a different printer.

What I'm looking for is a print diver that will pop up the printer selection window.
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: OT: Fake Printer Driver

Postby MarcoBoschi » Wed Jun 29, 2011 12:26 pm

Jeff,
Which OS you're talking about?
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: OT: Fake Printer Driver

Postby Jeff Barnes » Wed Jun 29, 2011 12:29 pm

Hi Marco,

Windows XP
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: OT: Fake Printer Driver

Postby James Bott » Thu Jun 30, 2011 3:22 pm

Jeff,

The best solution is to get the software producer to modify the software to allow printer selection.

Note that the standard is to print automatically to the default windows printer when selecting the print button, but to allow changing the printer when selecting File-Print. I presume you have already checked for that option.

The only workaround I can think of is to use a batch file to call a FW program that allows the user to change the Windows default printer, then runs the app, then runs another FW program that changes the default printer back to the original after the app is exited.

You could also do the same thing but change to a different printer automatically so there would be no user interaction required.

The downside is that changing the default Windows printer will also affect other programs that may be accessed while the specified app is still running.

As I mentioned at the start, the only good solution is to get the software modified to allow changing of the current printer in that app.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: OT: Fake Printer Driver

Postby Jeff Barnes » Fri Jul 01, 2011 3:08 pm

Hi James,

I agree, having the software changed would be the best solution. However, since it is medical software, it is regulated by FDA so any change requires the manufacturer to resubmit paperwork to FDA. Manufacturers try to avoid this as it takes time and costs money.

The problem I am having is that they want to print to an HP laser so the doctor can look at the data and make his interpretation. Then they go back into the program and enter his comments. Then they want to print to a PDF printer to store the completed report.

I guess the only solution (as you mentioned) is to have 2 FW apps. One that set the HP as the default and the other that sets the PDF printer as the default. They would just need to make sure that they run the correct FW app before they launch the software.

I'm surprised that no one has created a printer driver that pops up the print select window but as you said, this should be done on the software side not the driver side :cry:
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: OT: Fake Printer Driver

Postby Bayron » Fri Jul 01, 2011 3:33 pm

Hi Jeff, You can actually set the PDF printer as Default...

First make a small program that monitors the directory for certain file names...

For example File0

when file is found, print and erase (for example)

And then print File1, File2, File3, etc. with comments, so you move to another directory or leave in same directory but do not erase...

That would be easer than having to change printers, you only have to tell them to change the file name... (I assume the PDF printer should have to give you that option)

If the PDF does not checks for existing filenames in the target directory, then you can use the monitoring program to change to a correlative number or whatever the new file...(Example from File1 to File20110701-001)

This is just a wild idea I had, so I can only give you the recipe but not the medicine...
=====>

Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: OT: Fake Printer Driver

Postby kok joek hoa » Fri Jul 01, 2011 5:48 pm

kok joek hoa
 
Posts: 117
Joined: Tue Jan 03, 2006 6:18 pm

Re: OT: Fake Printer Driver

Postby Jeff Barnes » Mon Jul 04, 2011 1:10 pm

Thanks everyone.

Kok, the utility you pointed me to is perfect :) Simple and no code to write.
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 74 guests