DefaultDirectory

The DefaultDirectory property defines the default directory used to store the files generated by the Document Converter products.

Syntax

ActiveX:

BSTR DefaultDirectory

DLL:

int SetDefaultDirectory( HANDLE hPrinter, LPCSTR szDir )

int SetDefaultDirectory( HANDLE hPrinter, LPCWSTR szDir )

Parameters

DefaultDirectory

[in, out] Default directory used to store output files, can be a Unicode or Ansi string.

hPrinter

[in] Handle to printer returned by any of the DriverInit function calls.  

szDir

[in] Default directory used to store output files, should be an Ansi string for SetDefaultDirectory or a Unicode string for SetDefaultDirectoryW.

Remarks

The directory can be either a local or a network directory. In both cases, the directory should exist and the users have rights to write to this directory. The printer driver will not attempt to create the directory if it does not exist.

This setting is only used in the case where the output file name is defined by the printer driver and not by the user or developer, i.e. when the FileNameOptions contain the NoPrompt but not the UseFileName options.

Visual Basic Example

 

For ActiveX:

' set output directory

cdi.DefaultDirectory = "c:\temp"

 

C++ Example

 

For  DLL:

HANDLE hPrinter = DriverInit ("Amyuni Document Converter");

 

// output file name derived by the printer from the document title

SetFileNameOptions (NoPrompt);

// all files will be placed in c:\temp

SetDefaultDirectory ("c:\\temp");