Class PdfName
- All Implemented Interfaces:
Comparable<PdfName>
PdfName is an object that can be used as a name in a PDF-file.
A name, like a string, is a sequence of characters. It must begin with a slash followed by a sequence of ASCII
characters in the range 32 through 136 except %, (, ), [, ], <, >, {, }, / and #. Any character except 0x00 may
be included in a name by writing its two character hex code, preceded by #. The maximum number of characters in a
name is 127.
This object is described in the 'Portable Document Format Reference Manual version 1.7' section
3.2.4 (page 56-58).
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PdfName(Optional) An action that shall be performed when the annotation is activated.static final PdfName(Optional) An additional-actions dictionary defining the field's / annotations's behaviour in response to various trigger events.static final PdfNameA namestatic final PdfName(Optional; PDF 2.0) An array of one or more file specification dictionaries which denote the associated files for this annotation.static final PdfNameA namestatic final PdfName(Optional) An appearance dictionary specifying how the annotation shall be presented visually on the page.static final PdfNameA namestatic final PdfName(Required if the appearance dictionary AP contains one or more subdictionaries) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary.static final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfName(Optional) An array of numbers in the range 0.0 to 1.0, representing a colour used for the following purposes: The background of the annotation's icon when closed The title bar of the annotation's popup window The border of a link annotationstatic final PdfNameA namestatic final PdfNameA namestatic final PdfName(Optional; PDF 2.0) When regenerating the annotation's appearance stream, this is the opacity value that shall be used for all nonstroking operations on all visible elements of the annotation in its closed state (including its background and border) but not the popup window that appears when the annotation is opened.static final PdfName(Optional; PDF 2.0) When regenerating the annotation's appearance stream, this is the opacity value that shall be used for stroking all visiblea elements of the annotation in its closed state, including its background and border, but not the popup window that appears when the annotation is opened.static final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA name.static final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameUsed in several places: 1) Annotations: (Optional) Text that shall be displayed for the annotation or, if this type of annotation does not display text, an alternative description of the annotation's contents in human-readable form.static final PdfNameA namestatic final PdfNameA name of a base 14 type 1 fontstatic final PdfNameA name of a base 14 type 1 fontstatic final PdfNameA name of a base 14 type 1 fontstatic final PdfNameA name of a base 14 type 1 fontstatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNamePart of the Build Data Dictionary.static final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA name.static final PdfNameA namestatic final PdfNameA namestatic final PdfName(Optional) A default style string; described in the PDF Annex M.static final PdfNameEntry in a structure element dictionary: The expanded form of an abbreviation or an acronym.static final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfName(Optional) A set of flags specifying various characteristics of the annotation Default value: 0.static final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfName(Required) The PostScript name of the font.static final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA name of an attribute.static final PdfNameA name of an attribute.static final PdfNameA name of an attribute.static final PdfNameOptional) The annotation's highlighting mode, the visual effect that shall be used when the mouse button is pressed or held down inside its active area: N (None) No highlighting.static final PdfNameA name of an attribute.static final PdfNameA name of a base 14 type 1 fontstatic final PdfNameA name of a base 14 type 1 fontstatic final PdfNameA name of a base 14 type 1 fontstatic final PdfNameA name of a base 14 type 1 fontstatic final PdfName(Sometimes required, otherwise optional) For choice fields that allow multiple selection (MultiSelect flag set), an array of integers, sorted in ascending order, representing the zero-based indices in the Opt array of the currently selected option items.static final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfName(Sometimes required, as described) An array of indirect references to the immediate children of this field.static final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfName(Optional) The date and time when the annotation was most recently modified.static final PdfNameA name of an encodingstatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfName(optional) The name of the person or authority signing the document.static final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfName(Optional) An optional content group or optional content membership dictionary specifying the optional content properties for the annotation.static final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameParts of the Build Data Dictionary.static final PdfNameA namestatic final PdfName(Optional) An indirect reference to the page object with which this annotation is associated.static final PdfNameA namestatic final PdfNameA namestatic final PdfName(Required if this field is the child of another in the field hierarchy; absent otherwise) The field that is the immediate parent of this one (the field, if any, whose Kids array includes this field).static final PdfNameA namestatic final PdfNameA namestatic final PdfNameA name.static final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfName(Optional; inheritable) A code specifying the form of quadding (justification) that shall be used in displaying the text: 0 Left-justified (default) 1 Centered 2 Right-justifiedstatic final PdfNameA namestatic final PdfNamePart of the Build Data Dictionary.static final PdfName(Required) The annotation rectangle, defining the location of the annotation on the page in default user space units.static final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfName(Required) The type of annotation that this dictionary describes.static final PdfNameA namestatic final PdfNameA name of a base 14 type 1 fontstatic final PdfName(Required) The partial field name.static final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA name of a base 14 type 1 fontstatic final PdfNameA name of a base 14 type 1 fontstatic final PdfNameA name of a base 14 type 1 fontstatic final PdfNameA name of a base 14 type 1 fontstatic final PdfNameA namestatic final PdfNameOptional) The mapping name that shall be used when exporting interactive form field data from the document.static final PdfNameA namestatic final PdfNameA namestatic final PdfNameThere are lots of Type s in the PDF specification.static final PdfNameA namestatic final PdfNameA name of an attribute.static final PdfName(Required if R=6 (PDF 2.0)) A 32-byte string, based on the user password, that shall be used in computing the file encryption key.static final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfName(Optional; inheritable) The field value, whose format varies depending on the field type.static final PdfName(Deprecated) The application shall ask the security handler for the file encryption key and shall implicitly decrypt data with7.6.3.1, "Algorithm 1: Encryption of data using the RC4 or AESalgorithms", using the RC4 algorithm.static final PdfNameA namestatic final PdfNameA name of an attribute.static final PdfNameA name of an attribute.static final PdfNameA namestatic final PdfNameA name of an encodingstatic final PdfNameA name of an encodingstatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA namestatic final PdfNameA name of a base 14 type 1 fontFields inherited from class org.openpdf.text.pdf.PdfObject
ARRAY, BOOLEAN, bytes, DICTIONARY, INDIRECT, NOTHING, NULL, NUMBER, STREAM, STRING, TEXT_PDFDOCENCODING, TEXT_UNICODE, type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCompares this object with the specified object for order.static byte[]encodeName(String name) Encodes a plain name given in the unescaped form "AB CD" into "/AB#20CD".booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for the object.Methods inherited from class org.openpdf.text.pdf.PdfObject
canBeInObjStm, getBytes, isArray, isDictionary, isName, isNull, isNumber, isString, setContent, toPdf, toString, type
-
Field Details
-
A
(Optional) An action that shall be performed when the annotation is activated. -
AA
(Optional) An additional-actions dictionary defining the field's / annotations's behaviour in response to various trigger events. This entry has exactly the same meaning as the AA entry in an annotation dictionary. -
AC
A name -
AF
(Optional; PDF 2.0) An array of one or more file specification dictionaries which denote the associated files for this annotation. -
ANNOTS
A name -
AP
(Optional) An appearance dictionary specifying how the annotation shall be presented visually on the page. A PDF writer shall include an appearance dictionary when writing or updating an annotation dictionary except for the two cases listed below. Every annotation (including those whose Subtype value is Widget, as used for form fields), except for the two cases listed below, shall have at least one appearance dictionary. Exclusions:- Annotations where the value of the Rect key consists of an array where the value at index 1 is equal to the value at index 3 or the value at index 2 is equal to the value at index 4
- Annotations whose Subtype value is Popup, Projection or Link.
-
ARTBOX
A name -
ASCENT
A name -
AS
(Required if the appearance dictionary AP contains one or more subdictionaries) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary. -
AUTHOR
A name -
B
A name -
BASEFONT
A name -
BBOX
A name -
BC
A name -
BITSPERCOMPONENT
A name -
BLACKIS1
A name -
BLEEDBOX
A name -
BOX
A name -
BS
A name -
C
(Optional) An array of numbers in the range 0.0 to 1.0, representing a colour used for the following purposes:- The background of the annotation's icon when closed
- The title bar of the annotation's popup window
- The border of a link annotation
The number of array elements determines the colour space in which the colour shall be defined: 0=No colour; transparent 1=DeviceGray 3=DeviceRGB 4=DeviceCMYK
-
C0
A name -
C1
A name -
CA
(Optional; PDF 2.0) When regenerating the annotation's appearance stream, this is the opacity value that shall be used for stroking all visiblea elements of the annotation in its closed state, including its background and border, but not the popup window that appears when the annotation is opened. If a ca entry is not present in this dictionary, then the value of this CA entry shall also be used for nonstroking operations as well.Default Value: 1.0
The specified value shall not be used if the annotation has an appearance stream; in that case, the appearance stream shall specify any transparency.
-
ca
(Optional; PDF 2.0) When regenerating the annotation's appearance stream, this is the opacity value that shall be used for all nonstroking operations on all visible elements of the annotation in its closed state (including its background and border) but not the popup window that appears when the annotation is opened. Default value: 1.0 The specified value shall not be used if the annotation has an appearance stream in that case, the appearance stream shall specify any transparency. -
CAPHEIGHT
A name -
CATALOG
A name -
CCITTFAXDECODE
A name -
CI
A name -
CMD
A name.- Since:
- 2.1.6
-
COLORSPACE
A name -
COLUMNS
A name -
CONTENT
A name -
CONTENTS
Used in several places:- 1) Annotations: (Optional) Text that shall be displayed for the annotation or, if this type of annotation does not display text, an alternative description of the annotation's contents in human-readable form. In either case, this text is useful when extracting the document's contents in support of accessibility to users with disabilities or for other purposes. Might be different for each annotation type.
- 2) Part of the signature dictionary. The signature value. The value is a hexadecimal string representing the value of the byte range digest. (Required)
-
COUNT
A name -
COURIER
A name of a base 14 type 1 font -
COURIER_BOLD
A name of a base 14 type 1 font -
COURIER_OBLIQUE
A name of a base 14 type 1 font -
COURIER_BOLDOBLIQUE
A name of a base 14 type 1 font -
CREATIONDATE
A name -
CREATOR
A name -
CROPBOX
A name -
CS
A name -
D
A name -
DATE
Part of the Build Data Dictionary. The software module build date. -
DC
A name -
DECODE
A name -
DECODEPARMS
A name -
DEFAULT
A name- Since:
- 2.1.6
-
DESCENT
A name -
DEST
A name -
DEVICEGRAY
A name -
DEVICERGB
A name -
DEVICECMYK
A name -
DIFFERENCES
A name -
DL
A name -
DOCUMENT
A name.- Since:
- 2.1.6
-
DP
A name -
DR
A name -
DS
(Optional) A default style string; described in the PDF Annex M. -
E
Entry in a structure element dictionary: The expanded form of an abbreviation or an acronym.OR
Entry in an annotation’s additional-actions dictionary: An action that shall be performed when the cursor enters theannotation’s active area.
OR
Entry in a collection field dictionary: A flag indicating whether the interactive PDF processor should provide support for editing the field value.
OR more...
-
EF
A name -
EMBEDDED
A name- Since:
- 2.1.6
-
ENCODEDBYTEALIGN
A name -
ENCODING
A name -
ENCRYPT
A name -
ENDOFBLOCK
A name -
ENDOFLINE
A name -
EXTENSIONS
A name- Since:
- 2.1.6
-
EXTGSTATE
A name -
F
(Optional) A set of flags specifying various characteristics of the annotation Default value: 0. -
FILEID
A name -
FILTER
A name -
FIRST
A name -
FIRSTCHAR
A name -
FIRSTPAGE
A name -
FLAGS
A name -
FLATEDECODE
A name -
FONT
A name -
FONTBBOX
A name -
FONTDESCRIPTOR
A name -
FONTFILE
A name -
FONTNAME
(Required) The PostScript name of the font. This name shall be the same as the value of BaseFont in the font or CIDFont dictionary that refers to this font descriptor. -
FORM
A name -
FORMTYPE
A name -
FS
A name -
GOTO
A name of an attribute. -
GOTOR
A name of an attribute. -
GROUP
A name of an attribute. -
H
Optional) The annotation's highlighting mode, the visual effect that shall be used when the mouse button is pressed or held down inside its active area:- N (None) No highlighting.
- I (Invert) Invert the colours used to display the contents of the annotation rectangle.
- O (Outline) Stroke the colours used to display the annotation border.
- P (Push) Display the annotation's down appearance, if any. If no down appearance is defined, the contents of the annotation rectangle shall be offset to appear as if it were beingpushed below the surface of the page.
- T (Toggle) Same as P (which is preferred).
-
HEIGHT
A name of an attribute. -
HELVETICA
A name of a base 14 type 1 font -
HELVETICA_BOLD
A name of a base 14 type 1 font -
HELVETICA_OBLIQUE
A name of a base 14 type 1 font -
HELVETICA_BOLDOBLIQUE
A name of a base 14 type 1 font -
I
(Sometimes required, otherwise optional) For choice fields that allow multiple selection (MultiSelect flag set), an array of integers, sorted in ascending order, representing the zero-based indices in the Opt array of the currently selected option items. This entry shall be used when two or more elements in the Opt array have different names but the same export value or when the value of the choice field is an array. If the items identified by this entry differ from those in the V entry of the field dictionary (see discussion following this Table), the V entry shall be used. -
ID
A name -
IDENTITY
A name -
IF
A name -
IMAGE
A name -
IMAGEMASK
A name -
INDEX
A name -
INDEXED
A name -
INFO
A name -
INTENT
A name -
INTERPOLATE
A name -
ISMAP
A name -
ITALICANGLE
A name -
IX
A name -
JAVASCRIPT
A name -
JBIG2GLOBALS
A name- Since:
- 2.1.5
-
JS
A name -
K
A name -
KEYWORDS
A name -
KIDS
(Sometimes required, as described) An array of indirect references to the immediate children of this field. In a non-terminal field, the Kids array shall refer to field dictionaries that are immediate descendants of this field. In a terminal field, the Kids array ordinarily shall refer to one or more separate widget annotations that are associated with this field. However, if there is only one associated widget annotation, and its contents have been merged into the field dictionary, Kids shall be omitted. -
L
A name -
LASTCHAR
A name -
LASTPAGE
A name -
LENGTH
A name -
LI
A name- Since:
- 2.1.6
-
LINK
A name -
M
(Optional) The date and time when the annotation was most recently modified. The format should be a date string (a text string containing no whitespace, of the form (D:YYYYMMDDHHmmSSOHH'mm)) but interactive PDF processors shall accept and display a string in any format. -
MATRIX
A name -
MAC_ROMAN_ENCODING
A name of an encoding -
MARKED
A name -
MASK
A name -
MEDIABOX
A name -
METADATA
A name -
MODDATE
A name -
N
A name -
NAME
(optional) The name of the person or authority signing the document. This value should be used only when it is not possible to extract the name from the signature. -
NAMED
A name -
NEXTPAGE
A name -
O
A name -
OBJSTM
A name -
OC
(Optional) An optional content group or optional content membership dictionary specifying the optional content properties for the annotation. Before the annotation is drawn, its visibility shall be determined based on this entry as well as the annotation flags specified in the F entry. If it is determined to be invisible, the annotation shall not be drawn. -
OCG
A name -
OFF
A name -
ON
A name -
op
A name -
OS
Parts of the Build Data Dictionary. Indicates the operating system, such as Win10. Currently there is no specific string format defined for the value of this attribute. -
OUTLINES
A name -
P
(Optional) An indirect reference to the page object with which this annotation is associated. This entry shall be present in screen annotations associated with rendition actions. OR (Optional; PDF 2.0) The access permissions granted for this document. Valid values shall be 1,2,3 -
PAGE
A name -
PAGES
A name -
PARENT
(Required if this field is the child of another in the field hierarchy; absent otherwise) The field that is the immediate parent of this one (the field, if any, whose Kids array includes this field). A field can have at most one parent; that is, it can be included in the Kids array of at most one other field. -
PATTERN
A name -
PDF
A name -
PI
A name.- Since:
- 2.1.6
-
PREV
A name -
PREVPAGE
A name -
PRODUCER
A name -
PROPERTIES
A name -
PS
A name -
Q
(Optional; inheritable) A code specifying the form of quadding (justification) that shall be used in displaying the text:- 0 Left-justified (default)
- 1 Centered
- 2 Right-justified
-
QUOTE
A name- Since:
- 2.1.6
-
R
Part of the Build Data Dictionary. The software module revision number -
RECT
(Required) The annotation rectangle, defining the location of the annotation on the page in default user space units. -
RESOURCES
A name -
RI
A name -
ROOT
A name -
ROTATE
A name -
ROWS
A name -
S
A name -
SHADING
A name -
SIZE
A name -
SMASK
A name -
STEMV
A name -
SUBJECT
A name -
SUBTYPE
(Required) The type of annotation that this dictionary describes. -
SW
A name -
SYMBOL
A name of a base 14 type 1 font -
T
(Required) The partial field name. -
TA
A name- Since:
- 2.1.6
-
TABLE
A name- Since:
- 2.1.6
-
TABS
A name- Since:
- 2.1.5
-
TD
A name- Since:
- 2.1.6
-
TH
A name- Since:
- 2.1.6
-
TIMES_ROMAN
A name of a base 14 type 1 font -
TIMES_BOLD
A name of a base 14 type 1 font -
TIMES_ITALIC
A name of a base 14 type 1 font -
TIMES_BOLDITALIC
A name of a base 14 type 1 font -
TITLE
A name -
TM
Optional) The mapping name that shall be used when exporting interactive form field data from the document. -
TRANSPARENCY
A name -
TRIMBOX
A name -
TYPE
There are lots of Type s in the PDF specification. The following dictionaries use Type:- Crypt filters
- object stream dictionary
- cross-reference stream dictionary
- encrypted payload dictionary
- catalog dictionary
- page tree node
- page object
- file specification dictionary
- embedded file stream dictionary
- collection item dictionary
- collection subitem dictionary
- extensions dictionary
- developer extensions dictionary
- graphics state parameter dictionary
- Type 1 pattern dictionary
- DSS dictionary
- Type 2 pattern dictionary
- image dictionary
- Type 1 form dictionary
- group attributes dictionary
- content group dictionary
- content membership dictionary
- Type 1 font dictionary
- Type 3 font dictionary
- encoding dictionary
- outline dictionary
- annotation dictionaries
- field lock dictionary
- ...
-
TYPE1
A name -
U
A name of an attribute. -
UE
(Required if R=6 (PDF 2.0)) A 32-byte string, based on the user password, that shall be used in computing the file encryption key. -
UR
A name -
URI
A name -
URL
A name -
USERUNIT
A name -
V
(Optional; inheritable) The field value, whose format varies depending on the field type. See the descriptions of individual field types for further information. -
V2
(Deprecated) The application shall ask the security handler for the file encryption key and shall implicitly decrypt data with7.6.3.1, "Algorithm 1: Encryption of data using the RC4 or AESalgorithms", using the RC4 algorithm. -
VERSION
A name -
W
A name of an attribute. -
WIDTH
A name of an attribute. -
WIDTHS
A name -
WIN_ANSI_ENCODING
A name of an encoding -
WS
A name of an encoding -
X
A name -
XML
A name -
XOBJECT
A name -
XREF
A name -
XYZ
A name -
ZAPFDINGBATS
A name of a base 14 type 1 font
-
-
Constructor Details
-
PdfName
Constructs a newPdfName. The name length will be checked.- Parameters:
name- the new name
-
PdfName
Constructs a newPdfName.- Parameters:
name- the new namelengthCheck- iftruecheck the length validity, iffalsethe name can have any length
-
-
Method Details
-
encodeName
Encodes a plain name given in the unescaped form "AB CD" into "/AB#20CD".- Parameters:
name- the name to encode- Returns:
- the encoded name
- Since:
- 2.1.5
-
compareTo
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.- Specified by:
compareToin interfaceComparable<PdfName>- Parameters:
name- the Object to be compared.- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
- Throws:
ClassCastException- if the specified object's type prevents it from being compared to this Object.
-
equals
Indicates whether some other object is "equal to" this one. -
hashCode
public int hashCode()Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided byjava.util.Hashtable.
-