<< Click to Display Table of Contents >> Navigation: Drivers API > Macros |
The PDF-XChange Drivers API supports the use of macros to name files and insert headers/footers. All macros use the following syntax:
%[Macro{:extra}]
Where Macro is the macro name and extra defines optional specifiers. Available macros are detailed in the table below. Please note that not all macros are case-sensitive and use specifiers:
NAME
|
DEFINITION |
AppName |
Specifies the executable module of the printing application.
Please note that this macro should contain only the file name of the executable and not the path of the module. For example if printing from Microsoft Word then this macro has the value Winword.exe.
|
DocName |
Specifies the document name when the printing application passes it (via the DOCINFO structure at the start of the process) to the PDF-XChange Drivers API.
Please note that if the Save.StripPath property is True and the document name contains a path then the path will be stripped before the macro is assigned.
|
DocPath |
Specifies the paths of document names that the printing application passes.
|
Date |
Specifies the document printing date. The {:extra} specifier can be used to format date values. If an {:extra} specifier is not given then the default regional settings are used. A format string must be used for this macro - see below for string syntax.
|
Year |
Specifies the year. Macro format depends on regional settings.
|
Month |
Specifies the month. Macro format depends on regional settings.
|
Day |
Specifies the day of the month. Macro format depends on regional settings.
|
Time |
Specifies the time of printing as a string. The {:extra} specifier can be used to format date values. If an {:extra} specifier is not given then the default regional settings are used. A format string must be used for this macro - see below for string syntax.
|
Hour |
Specifies the hour of printing. Macro format depends on regional settings.
|
Minute |
Specifies the minute of printing. Macro format depends on regional settings.
|
Second |
Specifies the seconds of printing. Macro format depends on regional settings.
|
Computer |
The name of the local computer.
|
User |
The login name of the current user.
|
The current page number. This macro can be used for only headers and footers.
The HeadersFooters.FirstPageNumber property defines the starting page.
|
|
Pages |
The total number of document pages.
|
Env |
The value of this macro is an environment variable specified with the {:extra} specifier. If the specifier is not present, or there is no associated environment variable, then the value of the macro will be an empty string.
For example %[Env:UserName] specifies the login name of the user when printing takes place.
|