# Definitions

This page defines various terms that are used throughout this documentation.

## Action

An action can take one of the following forms. Note that some types of action cannot be used in certain contexts - eg. you cannot submit a form from the "onOpen" event.

http://url | Jump to a hyperlink. The link is opened through the web-browser
#id | Jump the document to the specified element. ID must be the ID of an element in the document
javascript:script | Run some JavaScript code. The script is the JavaScript to run
pdf:submit:(url [,method]) | Submit the documents form. The URL is the URL to submit the form to, and is mandatory. The method is the format to submit the form as - It can be POST (the default) for an HTTP POST, XML to submit the form as XML (Acrobat 5.0 only), FDF to submit the form as Adobes FDF format, or PDF to submit the entire document (Acrobat 5.0 only)
pdf:show(id) | Show a previously hidden form field. ID must be the "name" of a form field in the document
pdf:reset() | Reset the documents form
pdf:hide(id) | Hide a previously visible form field. ID must be the "name" of a form field in the document
pdf:namedaction | Run a named action. This functionality is browser dependent - for a list of named actions see the userguide

## Colors

Colors may be specified in the document in one of several ways.

"none" or "transparent" | Specify no color is to be used
#FF0000 | Specify a color in the documents RGB colorspace by setting the red component to 0xFF and the green and blue components to 0x00. Each component is on a scale from 0 to 255, so 0xFF is 100% red.
rgb(100%, 0, 0) | Another method of specifying an RGB color, this is identical to #FF0000. May also be specified as `rgb(255,0,0)`
gray(100%) | Specify a color in the documents GrayScale colorspace. `gray(0%)` is black and `gray(100%)` is white
cmyk(100%, 0%, 0%, 0%) | Specify a color in the documents CMYK colorspace. The example here would set the color to cyan.
black | Specify a named color - one of the list of 140 named colors in the current RGB colorspace (the list is the same list as used by HTML). The full list of named colors is in the reference section of the userguide and also in the "colors.pdf" document in the `docs` directory of the package.
spot("name", cmyk(100%,72%,0%,6%)) | Specify a spot color. Requires the name of the color, and the fallback color to use if it's unavailable
spot("name", cmyk(100%,72%,0%,6%), 50%) | Specify a spot color and the intensity of that color. Requires the name of the color, and the fallback color to use if it's unavailable, and the "intensity", or how much of that ink to use. Values can range from 100% (which is the same as the 2 argument form above) to 0% (which is the same as transparency).
alpha(50%, red) | Specify a translucent color. The first parameter is the amount of opacity in the color - 100% gives a completely opaque color, 0% completely transparent. The second parameter may be any type of simple color, eg "red", "cmyk(100%,0,0,0)" and so on. Translucent colors are only supported in Acrobat 5 or later.
pattern(stripe,fg,bg,fgwidth,bgwidth,ang) | The `stripe` pattern creates a striped color pattern. The angle and width of each stripe can be set separately - the width of the stripe in the foreground color is set by fgwidth and the width in the background color is set by bgwidth. The angle is set by ang, and is specified in degrees clockwise from 12 o'clock.
pattern(brick,fg,bg,width,height | This `brick` pattern creates a brickwork pattern (using the "running bond" style of bricklaying, for what it's worth). The width and height of each brick must be specified.
pattern(check,fg,bg,size) | The `check` pattern requires the size of each square in the check to be specified.
pattern(grid,fg,bg,linewidth,spacewidth) | The `grid` pattern creates a gridded pattern as shown here. The width of the line and the width of the space between the lines must be specified.
pattern(spot,fg,bg,size) | A "spot" pattern similar to the pattern used for halftoning in newspapers can be created with the `spot` pattern. The size of each spot must be specified.
pattern(polka,fg,bg,size) | A different kind of "spot" pattern, containing a number of different size random spots can be created with the `polka` pattern. The average size of the spots must be specified.
pattern(star,fg,bg,20) | A pattern of repeating 5-pointed stars (like those on the US flag) can be created with the `star` pattern. The size of each star must be specified.
gradient(color1,color2) | For bargraphs only, this sets a color gradient running from the first color to the second.

## Length

A length is an absolute length in the document. It can be specified as points (eg "8" or "8pt"), inches (eg "2in"), centimeters (eg "1.3cm"), millimeters (eg "13mm"), picas (eg "5pc" - a pica is equivalent to 12 points), or a size relative to the current font size - if the current font size is "12pt" and you specify a length of "0.5em", the distance is equivalent to 6pt. Specifying a distance of "1ex" would result in a length equivalent to roughly the height of the letter "x" in the current font.

## Percentage

A percentage can be specified like "10%" or "200%" - what it is relative to depends on the attribute. Often this is the width or height of a block - if a block has a width of "100" and you specify a padding of "5%", this will result in a padding of 5 points.

## URL

A URL is a standard format URL, which undoubtedly everyone is familiar with by now. One aspect which is slightly different is that when using a URL to reference multipage TIFF images or PDF documents using the "src", "background-image" or "background-pdf" attributes, the particular page to load can be specified by adding a "#n" at the end - so to load page 3 of an example image, set the URL to something like "http://localhost/myimage.tif#3"

When referencing a URL from a stylesheet, URLs may optionally be formatted the "CSS way" by wrapping them in "url()" - eg. "url(http://localhost/myimage.tif#3)". Relative URLs referenced from an external stylesheet are relative to the URL of the stylesheet, not the document.