The program replaces macro tags with other information when a print job is processed. Macro tags can be used to change output file names to contain values such as the date and time of a print job. They can also be used in watermark text and other properties for the job.

Below you will find a description of each of the supported macros.

Date and Time

<date>

The current date in the format yyyy-mm-dd.
Example: 2012-11-30

<time>

The current time in the format hh.mm.ss.
Example: 22.54.29

<ticks>

The value of this macro tag represents the number of 100-nanosecond intervals that have elapsed since 12:00:00 midnight, January 1, 0001.
Example: 634889921720358114

<utc>

The current time in UTC format.
Example: 2012-11-30 22:54:29Z
Only available in professional and expert editions.

<now|format:formatstring>

The current time in a user specific format. Format string syntax can be found here: http://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.80).aspx.

Examples:

Macro TagResult
<now|format:d>11/20/2012
<now|format:D>Tuesday, November 20, 2012
<now|format:F>11/20/2012 8:30:01 AM
<now|format:yyyy-MM-dd hh.mm.ss>2012-11-20 08.31.09

<quarter>

Returns the number 1 through 4 of the current quarter.
Example: 3
Only available in professional and expert editions.
Requires version 10.26 or later.

Document Properties

<title>

Title of the printed document. This is the title as it appears in the print queue. It is the application that creates the print job that determines the title of the print job. Sometimes it is related to a file name of a document that is printed.

<smarttitle>

The smarttitle macro tag uses the title of the print job just as the <title> tag. With this tag the title is stripped from its file extension and some well known strings are removed from the title. Microsoft Office programs creates print job titles such as "Microsoft Word - My Document.docx". The smarttitle for that name would only contain the "My Document" text.

<author>

Author of the printed document. This value is specified by the program creating the print job.

<docname>

Document name. The document name stems from the print job created by the printing application.

<basedocname>

Base part of the document name. This macro gives you the part of document name up to the last dot. If the document name is a file name then the resulting value is the file name without an extension.

<pageno>

Page number for use in image creation or watermark text. When creating images there will typically be one output file for each page in the original document. By using additional information in the <pageno> macro, you can control the padding width and character. <pageno,3> will pad the page number to a width of 3 characters (001, 002, etc.). <pageno,3,-> will use a dash as padding character and produce a different result (--1, --2, etc.). You can also use the <pageno> macro in the watermark text. However, the formatting options are not supported when used in watermarks.

<mergepageno>

The merge page number is used in the watermark text. It will make an adjustment to the page number based on the documents you may be merging with or appending to.
Only available in professional and expert editions.

<pagecount>

With this macro value you can get the number of pages in the print job. A typical use of this macro is in watermarks where you can specify something like this:

<pageno> of <pagecount>
Only available in professional and expert editions.

<docusername>

Document user name. The document user name is the name of the user on the computer where the print job was created.
See also <username>.
Only available in professional and expert editions.

<doccomputername>

Document computer name. The document computer name stems from the print job created by the printing application. If you share the printer then this value can be different from the normal <computername> macro.
Only available in professional and expert editions.

Folders

<app>

The folder where the program is installed.
Example: C:\Program Files\7-PDF\PDF Printer

<desktop>

The user's desktop folder.
Example: C:\Users\User Name\Desktop

<personal>

Location of personal files.
Example: C:\Users\User Name\Documents

<commonapplicationdata>

Location of program data files.
Example from English Windows XP: C:\Documents and Settings\All Users\Application Data
Example from English Windows 7: C:\ProgramData

<localapplicationdata>

Location of personal files.
Example from English Windows XP: C:\Documents and Settings\User Name\Local Settings\Application Data
Example from English Windows 7: C:\Users\User Name\AppData\Local

System Properties

<username>

Logged on user name.

<computername>

Computer name.

<env:environmentstring>

This macro allows you to query the values of the environment variables.
Example: <env:username> is substituted with the logged in user name.
Only available in professional and expert editions.

Special Tags

<empty>

This macro will result in an empty string. It may seem a bit weird to have a macro like this. However, it can be very useful if you want to set document properties such as the author to an empty value.
Requires version 10.11 or later.

<vbs:function>

Call a VB Script function and insert the return value of this function. The function must be in a .vbs file in the MacroDir. You can also write VB Script expressions directly in the macro.

Examples:

<vbs:MyFunction> is substituted with the return value of a function named MyFunction.
<vbs:2+2> is substituted with 4.
Only available in professional and expert editions.

<random:length>

Creates a string of random characters. The length of the string is specified by the length parameter.
Example: <random:10> returns a string similar to phtwv27taj.
Only available in professional and expert editions.

<counter:filename|format:formatstring>

A counter macro tag will return the next available number for a specific counter. You can have any number of counters. Each counter is identified by a file name where the current value of the counter is stored.

The counter file name can be an absolute file path or a relative one. Relative counter file locations are placed relative to the user's %APPDATA% folder.

Counter file names can contain environment variables. One example could be "C:\Counters\%USERNAME%\Invoice.txt". This would create and use a counter specific to the logged on user.

When a counter is increased the program will try to get an exclusive lock on the counter file. It will retry a number of times if the lock cannot be obtained. This is done to prevent two simultaneous processes from serving the same counter value.

An optional number format can be specified to change the default appearance of the counter. This is useful if you want to add zero padding to the counter or need to customize the representation otherwise. Details on format strings can be found here: http://msdn.microsoft.com/en-US/library/dwhawy9k(v=vs.80).aspx

Examples:

  • <counter> will use a default counter file in the user's %APPDATA% folder.
  • <counter:MyCounter.txt> Creates a user specific MyCounter.txt file in the user's %APPDATA% folder.
  • <counter:MyCounter.txt|format:D5> Creates a counter value that is zero padded to the width of 5.
  • <counter:%ProgramData%\MyCounter.txt> Creates a counter that is shared by all users on the machine.
  • <counter:\\ServerName\ShareName\MyCounter.txt> Creates a counter that is shared by all users on the network.

Note: Please make sure that the user has access to the location of the counter file.

<guid>

Evaluates to a system generated Globally Unique Identifier (GUID).
Example: B700E108-4EDA-4BE8-84EF-301D7C8CB80A
Only available in professional and expert editions.

<printername>

The name of the PDF printer used to create the print job.
Only available in professional and expert editions.

<optionset>

This is the name of the current option set selected in the printing dialog. The value of this macro is empty if the dialog is not shown.
Only available in professional and expert editions.

Top