Macro Tags
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.
The current date in the format yyyy-mm-dd.
Example: 2012-11-30
The current time in the format hh.mm.ss.
Example: 22.54.29
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
The current time in UTC format.
Example: 2012-11-30 22:54:29Z
Only available in professional and expert editions.
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 Tag | Result |
<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 |
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.
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.
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 of the printed document. This value is specified by the program
creating the print job.
Document name. The document name stems from the print job created by
the printing application.
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.
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.
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.
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.
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.
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.
The folder where the program is installed.
Example: C:\Program Files\BioPDF\PDF Writer
The user's desktop folder.
Example: C:\Users\User Name\Desktop
Location of personal files.
Example: C:\Users\User Name\Documents
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
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
Logged on user name for the process that creates the PDF. See also <docusername>.
Name of the computer where the PDF is created. See also <doccomputername>.
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.
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.
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.
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.
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.
Evaluates to a system generated Globally Unique Identifier (GUID).
Example: B700E108-4EDA-4BE8-84EF-301D7C8CB80A
Only available in professional and expert editions.
The name of the PDF printer used to create the print job.
Only available in professional and expert editions.
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.
|