Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Re thread1252-1135853 PDF Printing

Status
Not open for further replies.

bobmpalmer

Programmer
Aug 19, 2003
161
GB
Has anyone found a resolution to this problem as discussed in thread1252-1135853

I tried Randy's Path fix which works fine but if the user selects Acrobat PDF Writer as their default printer Fox really chucks its teddy!! Why should an external app affect VFP's Paths which are in memory?


Bob Palmer
The most common solution is H2O!
 

Bob,

It looks like this is now generally accepted as a bug. The immediate workaround is to save the default directory any time you print a report, and restore it afterwards, which is a big nuisance.

I assume someone has reported it to Microsoft so that it can be fixed.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
This has been working this way since Adobe 5. I don't think it's a VFP thing, I think it's the Adobe driver being called from within VFP that's changing the default directory. I'm not sure Microsoft can do anything about it.

Mike Krausnick
Dublin, California
 

Mike,

But the same behaviour occurs with other PDF-creating tools, not Adobe. I've seen it in the Docucom PDF driver, and I know it's also present in Win2PDF.

(Or, maybe all those tools use the same underlying code?)

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Very interesting - I didn't know that. So maybe it is an operating system thing. Still, I wouldn't hold my breath waiting for a fix. The standard workaround works fine, and is a one-time effort if one writes a function to do PDF printing. Pain in the butt though to always have to test whether the target printer is PDF or not.

Mike Krausnick
Dublin, California
 

Mike,

Actually, the workaround isn't quite so simple. It's not just a question of writing a function to wrap PDF printing. You really need to save and restore the default directory any time your users sees a GETPRINTER() dialogue.

The point is that you can never be sure when the user is going to select a PDF printer driver. If you ever let the user choose a printer, you have to defend against the bug.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Hi,

As far as I remember (since VFP6) this behaviour has always been so.
I 'fixed' it by creating a printbutton in class which always saves the current default environment, than do the printjob, including selecting a printer. Than, after the printjob has been finished I reset the environment to the one which was saved before starting the printjob.
Never any problem on this issue anylonger!

-Bart
 
Mike,
Slip of the pen!
I meant current or default environment.
Current is here in fact the default environment.
-Bart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top