Please enable JavaScript to view this site.

Navigation: Developer Information > Using the Windows registry

Environment Variable Expansion

Scroll Prev Top Next More

The following environment variables are set by Win2PDF and can be used with registry expansion in the "PDFFileName", "PDFDefaultFileName", and all other Win2PDF String registry values. The registry values must be set as REG_EXPAND_SZ instead of REG_SZ for the expansion to work.

%PDFTitle%

Document title set by the application

%PDFTitleNoExtension%

Document title set by the application with document extension removed

%PDFIncrement%

If a file exists with the expanded name, %PDFIncrement% is incremented until a file does not exist. Starts at 1. Ensures files are never overwritten.

%PDFDate%

Eight digit date separated by dashes in the format month-day-year (12-25-2015)

%PDFTime%

Six digit 12 hour time separated by dashes in the format hour-minute-second-AM/PM (12-59-59 PM)

%PDFYear%

Four digit number for the current year (2015)

%PDFMonth%

Two digit number for the current month (12)

%PDFMonthName%

Three character abbreviated name for the current month (Dec)

%PDFDay%

Two digit number for the current day of the month (25)

%PDFDayName%

Three character abbreviated name for the day of the week (Wed)

%PDFDayInWeek%

One digit number for the current day of the week

%PDFHour%

Two digit number for the current hour in a 12 hour format (12)

%PDFHour24%

Two digit number for the current hour in a 24 hour format (24)

%PDFMinute%

Two digit number for the current minute within the hour (59)

%PDFMinute5%

Two digit number for the current minute in 5 minute increments (0,5,10,..55)

%PDFMinute10%

Two digit number for the current minute in 10 minute increments (0,10,..50)

%PDFMinute15%

Two digit number for the current minute in 15 minute increments (0,15,30,45)

%PDFMinute30%

Two digit number for the current minute in 30 minute increments (0,30)

%PDFSecond%

Two digit number for the current second within the minute (59)

%PDFMillisecond%

Three digit number for the current millisecond (999)

%PDFTimeMarker%

Two character abbreviation for AM or PM

%PDFAutoNameContentSearch%

Expanded to the word in the PDF following the registry value specified by PDFAutoNameContentSearchWord

%PDFAutoNameContentSearch2%

Expanded to the word in the PDF following the registry value specified by PDFAutoNameContentSearchWord2

%PDFAutoNameContentSearch3%

Expanded to the word in the PDF following the registry value specified by PDFAutoNameContentSearchWord3

%PDFAutoNameContentField%

Expanded to the word in the PDF specified by the absolute location defined in the Win2PDF Desktop Content Field.

 

Environment variables defined by Windows such as %HOMEPATH%, %USERNAME%, and %USERPROFILE% can also be used with all Win2PDF String registry settings.