Please enable JavaScript to view this site.

PDFX Reference

Navigation: » No topics above this level «

GDI Print Directives

Scroll Prev Top Next More

The functionality of PDFX—how to make it produce and post-process the PDF documents as you intend—is controlled by GDI print directives. These directives or commands are embedded in the reports you send to the PDFX virtual printer. The syntax for all such directives is:

//PDFX, class.subclass {.subclass}, value {,value,…}

When using the PDFX GDI directives, note the following:

As with all of A-Shell's GDI printer directives, the lead-in for PDFX is double slash ( // ). A double slash followed by a semi-colon indicates a comment, and the line is ignored by A-Shell—although it may be useful in understanding what you were trying to accomplish (e.g. //;the following directive is a mystery to me).
The PDFX lead-in cannot contain any spaces; the directive "//  PDFX..." will result in the desired directive not being recognized as such, instead appearing as plain text in the output.
The PDFX directives are case sensitive. Alternate forms may be accepted in some cases, but you should strive to match the case as documented.
Hex values in the form &h#### are supported, although this only applies to color specifications.
A-Shell does not perform any validation on the PDFX directives; the directives are simply passed to the driver if the driver is PDFX. In the absence of the PDFX (i.e., the report is directed to some other printer), PDFX directives are still legal but will be ignored. If the driver does not recognize the directive, it may return a code that causes A-Shell to print the directive as text. In other cases, the driver may just ignore the directive. Note also that no error message or other feedback is provided when a command fails due to improper spelling, punctuation, syntax, etc.
Also in keeping with GDI conventions is the handling of strings. When entering strings, you MAY quote the entire string (i.e., enclose it with double quote marks), but you only MUST quote the string if it contains commas. Always enclosing strings in quotes eliminates the possibility of the stray or unusual comma causing the string to be truncated at the point of the comma.
The order in which directives are entered is usually optional, although there are some exceptions, such as Email.Content.
In some cases, the form or spelling of the directive differs between PDFXv3 and later versions (PDFXv5+). In such cases, the PDFXv3 version will be automatically converted to the PDFXv5+ equivalent when applicable. The tables of directives are organized by the v5 names, but contain cross references to the v3 names when applicable.
In the following tables of directives, note that many of the values are shown in quotes. This means that the quoted values are valid entries for that directive. The value entry 0 ("AllOpened"), for example, means that when specifying this value you can use either "0" or "AllOpened".

The PDFX variables fall into several categories, as shown in this document's table of contents. The category keyword, with which all directives in that category begin, gives an indication of the type of control offered. See those topics for information on the category (what is "Downsample"?), as well as syntax, values and descriptions for the individual directives.

Examples

Here are a few examples showing PDFX directives from an actual print file.

Command

Result

//PDFX,DocInfo.Title,"Test PDFX1"

Specify doc title

//PDFX,Save.ShowSaveDialog,0

Do not display Save dialog on completion

//PDFX,Save.RunApp,0

Do not run Acrobat on completion

//PDFX,Save.WhenExists,1

Automatically overwrite doc if it already exists

//; this is a comment

//; indicates comment; rest of line ignored

//PDFX,Security.Enabled,1

Enable security

//PDFX,Security.UserPwd,jack

Set user password (for opening the document)

//PDFX,Email.Method,5

Invoke PC's default mail client

//PDFX,Email.Subject,Testing PDF

Insert "Testing PDF" as subject in email message

//PDFX,Links.Enabled,1

Convert text that looks like links into actual links