Page 1 of 1

Save.ShowSaveDialog initial directory wrong

Posted: Tue Mar 17, 2015 10:02 pm
by musabio
When the Save.ShowSaveDialog is enabled, the dialog starts in the directory last used in a prior save, rather than in the directory corresponding to the Save.File and/or Save.Path value. You can reproduce this in the CExAPI sample program by just enabling the option. You'll see that the dialog comes up defaulting not to the location of the full path specified in Save.File, but to the last saved location. (When the dialog is disabled, the file gets saved in the proper location.)

This is a change from the version 3 driver API, and creates an obstacle for us upgrading, because we like to provide the flexibility for the advanced user to override the location, but 99% of the time, users just click Save to use the location pre-determined by our app, which changes for different reports/circumstances.

Is there a way to override it to default to the directory matching the Save.File full filespec? Or is it a bug that can be fixed?

Thanks!

Re: Save.ShowSaveDialog initial directory wrong

Posted: Wed Mar 18, 2015 5:40 pm
by Ivan - Tracker Software
Please set pPrinter->Options["Save.UseLastPath"] = 0;

Re: Save.ShowSaveDialog initial directory wrong

Posted: Wed Mar 18, 2015 9:56 pm
by musabio
Works like a charm - thanks!

As an aside, is it intentionally undocumented, or is there a later (than April 17, 2014) version of the PDF-XChange Drivers API SDK 2012 User Manual?

Thanks again,
Jack

Re: Save.ShowSaveDialog initial directory wrong

Posted: Thu Mar 19, 2015 12:25 am
by Ivan - Tracker Software
No, not intentionally. Will update the documentation.