Вы находитесь на странице: 1из 1521

Documentation

jPod
intarsys PDF Library
Vision
jPod is an already mature PDF manipulating and rendering framework.
Until now it is contained in shrink wrapped products like

- EFormServer (commercial)
- CABAReT Stage (free for personal use)

jPod can be compared to other PDF libraries, but we believe it has its strengths...

- reading (also lazy), verified against many of the "real world PDF documents" that
slightly deviate from the spec.
- manipulating (COS level, PD level)
- undo and update propagation make it suitable for interactive applications
- sophisticated consistency checks improve resulting PDF documents
- writing (full and incremental)
- data source abstraction makes it easy to integrate in new architecture
(for example file based, web based, database...) and adapt to complex requirements
(for example untrusted or security sensitive environments. Currently a certification on
the base of CommonCriteria is under way…).
- AFM and TrueType support
- ContentStream rendering and creation framework

As described above, jPod is already a full featured component of its own.


What it makes even more interesting is the upcoming availability of more complex
components for

- - application level tasks (action processing, JavaScript integration with Mozilla Rhino,
- update propagation, undo - to name only a few)
- - full graphics and text rendering (SWT, AWT)
- - XFA
- - XMP (using ben litchfields xmp library)
- - ...more to come

These are multi purpose components we plan to release as they mature and we succeed to
finish documentation.

jPod is currently the base of CABAReT Stage, which uses it for PDF rendering, manipulation
(form editor, annotations etc.) and even more sophisticated tasks like signing and others. Our
plan is to push jPod as an universal PDF library, with CABAReT Stage as its "reference"
client, making more and more of its components available.

Page 2 of 1521
Overview
This is the initial release for jPod – intarsys PDF Library. It is yet another PDF manipulation
and rendering library, but we believe it is worth having a look.

Contained in this release is the complete “foundation”. This includes all components
necessary to read, manipulate and write, along with the basic frameworks to build higher level
logic.

While jPod is a mature component this is our initial “coming out” to a public community.
There may be some flaws in the documentation or deployment material – please report them
to support@intarsys.de

Initial steps
We recommend you to have a look at the examples and to have a look at the PDF reference
from Adobe. This way you will gain a good understanding of the features and the design
principles of this library.

Even so not completely free software, we recommend using CABAReT Stage to play around
with jPod, as you will have an interactive environment completely integrated with jPod. It
will give you complete scripting access to PDF documents and provide good debugging tools
with the COS Browser feature.

The application and a tutorial is available at

http://www.cabaret-solutions.com/downloads

Give it a try.

Technical notes
jPod has dependencies in other packages delivered by intarsys. These are at least included in
binary form (jpod_tools.jar) and may be redistributed under the same BSD style license. The
reason for this libraries being include in binary form is simply that we didn’t completely clean
up and document the API for all packages.

The packages directly referenced and crucial for the jPod library are included in the
documentation and included in the source distribution and are considered stable (e.g.
“de.intarsys.tools.locator.*”).

The other non-pfd packages (de.intarsys.tools.* and de.intarsys.font.*) are considered free and
are at your disposition, but understand that they are not part of the public, stable jPod API.
Maybe some day we release them as a component of its own with stable API.

Page 3 of 1521
Acknowledgements
* Adobe Systems Incorporated
The datastructures and operators as defined in the "PDF reference" are copyrighted by Adobe
Systems Incorporated.

* The Apache Software Foundation


This product includes software developed by the Apache Software Foundation
(http://www.apache.org/).

* Mozilla
This product uses Rhino as its JavaScript engine.

* Freetype
Portions of this software are copyright © 1996-2002 The FreeType Project
(www.freetype.org). All rights reserved.

* bouncycastle

* eclipse

* Ben Litchfield (PDFBox)


In PDFBox’s early days (way before it was PDFBox) we had interesting discussions and
some of the ideas spread in both the products evolving (as you can still easily see from the
naming). Additionaly we currently use Ben’s XMP library.

Trademarks
Adobe, Adobe Reader are trademarks or registered trademarks of Adobe Systems
Incorporated in the United States and other countries.

CABAReT is a trademark or registered trademark of CABAReT Solutions AG in


Switzerland, European Union and the United States.

Page 4 of 1521
Overview

jPod intarsys PDF Library


Content
a. Installation
b. Overview
c. Implementation Details
d. License
e. References
f. Service and support

Installation
To use this implementation, you have to include the jar files in the "lib" directory in your classpath.

Overview
This is the "kernel" of the intarsys PDF implementation, containing the static model parts, datatypes and IO implementations.
Using this kernel alone, you are able to read, manipulate and write PDF documents in any way you like. An impressive example is
CABAReT Stage, built completely on top of this kernel. A couple of other layers and libraries will provide additional features to
ease PDF document handling. Here is a (incomplete) Feature List for this implementation:

• Lazy reading
• Incremental writing
• Update propagation
• Hooks for undo support
• Strict constraints on internal COSObject consistency
• Rich PD level
• Additional higher level features (rendering etc.) available
• Professional references (e.g. CABAReT Stage)

Implementation Details
There are some common patterns througout this implementation.
* still incomplete list *

Factories
A factory decouples semantics from concrete implementation. Our factories use always an interface using the name
"I[name]Factory". A singleton implementation with the name "[name]Factory" provides getter and setter to access this factory. In
most cases a standard implementation is provided, named "Standard[name]Factory".

License
This library is released under a BSD style license. The license is included with the sources and at numerous other places, for
example here:

(continued on next page)

Page 5 of 1521
(continued from last page)

/*
* Copyright (c) 2007, intarsys consulting GmbH
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of intarsys nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/

As far as we need 3rd party components, the respective licenses are included in the "license" directory.

References
jPod intarsys PDF library is a stable, industrial strength java library to access or generate PDF documents. Currently it is used in
different products, e.g.:

• EForm™ Server, intarsys consulting GmbH


• CABAReT™ Stage, CABAReT Solutions AG

Service & Support


If you need further support, feel free to contact us. intarsys consulting GmbH
Bahnhofplatz 8
76137 Karlsruhe
Fon +49 721 38479-0
Fax +49 721 38479-60
info@intarsys.de
www.intarsys.de

(continued on next page)

Page 6 of 1521
(continued from last page)

For service and support contact


1. EMail support: support@intarsys.de

Page 7 of 1521
Package
de.intarsys.font

Page 8 of 1521
de.intarsys.font.AbstractFontRegistry

de.intarsys.font
Class AbstractFontRegistry
java.lang.Object
|
+-de.intarsys.font.AbstractFontRegistry

public class AbstractFontRegistry


extends Object

Common superclass for implementing a font registry.

Constructor Summary
public AbstractFontRegistry()

public AbstractFontRegistry(int initialCapacity)

Method Summary
void addFont(IFont font)

IFont getFont(String familyName, FontStyle style)

FontFamily getFontFamily(String familyName)

java.util.Iterator getFontFamilyIterator()

Constructors
AbstractFontRegistry
public AbstractFontRegistry()

AbstractFontRegistry
public AbstractFontRegistry(int initialCapacity)

Methods
addFont
public void addFont(IFont font)

Page 9 of 1521
de.intarsys.font.AbstractFontRegistry

getFontFamily
public FontFamily getFontFamily(String familyName)

getFont
public IFont getFont(String familyName,
FontStyle style)

getFontFamilyIterator
public java.util.Iterator getFontFamilyIterator()

Page 10 of 1521
de.intarsys.font.FontAliasMap

de.intarsys.font
Class FontAliasMap
java.lang.Object
|
+-de.intarsys.font.FontMap
|
+-de.intarsys.font.FontAliasMap

public class FontAliasMap


extends FontMap

Constructor Summary
public FontAliasMap(FontMapper mapper, String name, String alias)

Method Summary
String getAlias()

java.io.InputStream getAsStream()

Constructors
FontAliasMap
public FontAliasMap(FontMapper mapper,
String name,
String alias)

Methods
getAlias
public String getAlias()

getAsStream
public java.io.InputStream getAsStream()
throws java.io.IOException

Page 11 of 1521
de.intarsys.font.FontFamily

de.intarsys.font
Class FontFamily
java.lang.Object
|
+-de.intarsys.font.FontFamily

public class FontFamily


extends Object

An abstraction of a fonts family.

Constructor Summary
public FontFamily()

Method Summary
IFont getFont(FontStyle style)

java.util.Iterator getFontIterator()

void setFont(IFont font, FontStyle style)

Constructors
FontFamily
public FontFamily()

Methods
setFont
public void setFont(IFont font,
FontStyle style)

getFont
public IFont getFont(FontStyle style)

getFontIterator
public java.util.Iterator getFontIterator()

Page 12 of 1521
de.intarsys.font.FontFamily

(continued from last page)

Page 13 of 1521
de.intarsys.font.FontFileMap

de.intarsys.font
Class FontFileMap
java.lang.Object
|
+-de.intarsys.font.FontMap
|
+-de.intarsys.font.FontFileMap

public class FontFileMap


extends FontMap

DOCUMENT ME!

Constructor Summary
public FontFileMap(FontMapper mapper, String name, java.io.File file)

Method Summary
java.io.InputStream getAsStream()

java.io.File getFile()

Constructors
FontFileMap
public FontFileMap(FontMapper mapper,
String name,
java.io.File file)

Methods
getAsStream
public java.io.InputStream getAsStream()
throws java.io.IOException

getFile
public java.io.File getFile()

Page 14 of 1521
de.intarsys.font.FontMap

de.intarsys.font
Class FontMap
java.lang.Object
|
+-de.intarsys.font.FontMap
Direct Known Subclasses:
FontAliasMap, FontFileMap, FontResourceMap

public abstract class FontMap


extends Object

Constructor Summary
public FontMap(FontMapper mapper, String name)

Method Summary
abstract getAsStream()
java.io.InputStream

String getKey()

FontMapper getMapper()

String getName()

Constructors
FontMap
public FontMap(FontMapper mapper,
String name)

Methods
getName
public String getName()

getKey
public String getKey()

Page 15 of 1521
de.intarsys.font.FontMap

getAsStream
public abstract java.io.InputStream getAsStream()
throws java.io.IOException

getMapper
public FontMapper getMapper()

Page 16 of 1521
de.intarsys.font.FontMapper

de.intarsys.font
Class FontMapper
java.lang.Object
|
+-de.intarsys.font.FontMapper

public class FontMapper


extends Object

DOCUMENT ME!

Method Summary
static FontMapper getActive()

FontMap getDefaultMap()

FontMap lookupFontMap(String name)

void registerAlias(String name, String alias)

void registerFile(String name, java.io.File file)

void registerResource(String name, Class owner, String resource)

void setDefaultMap(FontMap defaultMap)

Methods
getActive
public static FontMapper getActive()

setDefaultMap
public void setDefaultMap(FontMap defaultMap)

getDefaultMap
public FontMap getDefaultMap()

Page 17 of 1521
de.intarsys.font.FontMapper

(continued from last page)

lookupFontMap
public FontMap lookupFontMap(String name)

registerAlias
public void registerAlias(String name,
String alias)

registerFile
public void registerFile(String name,
java.io.File file)

registerResource
public void registerResource(String name,
Class owner,
String resource)

Page 18 of 1521
de.intarsys.font.FontResourceMap

de.intarsys.font
Class FontResourceMap
java.lang.Object
|
+-de.intarsys.font.FontMap
|
+-de.intarsys.font.FontResourceMap

public class FontResourceMap


extends FontMap

DOCUMENT ME!

Constructor Summary
public FontResourceMap(FontMapper mapper, String name, Class owner, String
resource)

Method Summary
java.io.InputStream getAsStream()

Class getOwner()

String getResource()

Constructors
FontResourceMap
public FontResourceMap(FontMapper mapper,
String name,
Class owner,
String resource)

Methods
getAsStream
public java.io.InputStream getAsStream()
throws java.io.IOException

getOwner
public Class getOwner()

Page 19 of 1521
de.intarsys.font.FontResourceMap

getResource
public String getResource()

Page 20 of 1521
de.intarsys.font.FontStyle

de.intarsys.font
Class FontStyle
java.lang.Object
|
+-de.intarsys.font.FontStyle

public class FontStyle


extends Object

docme

Field Summary
public static final BOLD

public static final BOLD_ITALIC

public static final COUNT


The number of font styles
Value: 4

public static final ITALIC

public static final REGULAR

public static final UNDEFINED


The enumeration of supported font styles

Method Summary
FontStyle getBoldFlavor()

static FontStyle getFontStyle(String name)

FontStyle getItalicFlavor()

String getLabel()

String toString()

Fields
COUNT
public static final int COUNT

The number of font styles


Constant value: 4

Page 21 of 1521
de.intarsys.font.FontStyle

UNDEFINED
public static final de.intarsys.font.FontStyle UNDEFINED

The enumeration of supported font styles

REGULAR
public static final de.intarsys.font.FontStyle REGULAR

ITALIC
public static final de.intarsys.font.FontStyle ITALIC

BOLD
public static final de.intarsys.font.FontStyle BOLD

BOLD_ITALIC
public static final de.intarsys.font.FontStyle BOLD_ITALIC

Methods
getFontStyle
public static FontStyle getFontStyle(String name)

getBoldFlavor
public FontStyle getBoldFlavor()

getItalicFlavor
public FontStyle getItalicFlavor()

getLabel
public String getLabel()

Page 22 of 1521
de.intarsys.font.FontStyle

(continued from last page)

toString
public String toString()

Page 23 of 1521
de.intarsys.font.FontTools

de.intarsys.font
Class FontTools
java.lang.Object
|
+-de.intarsys.font.FontTools

public class FontTools


extends Object

A helper class providing font-related utilities.

Constructor Summary
public FontTools()

Method Summary
static String[] getFontDirectories()
This method determines the system's font directories.

Constructors
FontTools
public FontTools()

Methods
getFontDirectories
public static String[] getFontDirectories()

This method determines the system's font directories.

Returns:
an array containing the font directory paths found on the local system

Page 24 of 1521
de.intarsys.font.IFont

de.intarsys.font
Interface IFont
All Known Implementing Classes:
PDFont, PDFontType1

public interface IFont


extends

DOCUMENT ME!

Method Summary
String getFontFamilyName()
The font family name.

String getFontName()
The complete font name.

FontStyle getFontStyle()
The font style.

Methods
getFontFamilyName
public String getFontFamilyName()

The font family name.

Returns:
The font family name.

getFontName
public String getFontName()

The complete font name.

Returns:
The complete font name.

getFontStyle
public FontStyle getFontStyle()

The font style.

Returns:
The font style.

Page 25 of 1521
Package
de.intarsys.pdf.app.acroform
This package encapsulates the quite complex logic when filling forms.

This comes to its full power when integrated in a feature rich, JavaScript enabled interactive application. All this features can be
made available to jPod via the application level frameworks ( for example for handling appearances and actions).

Page 26 of 1521
de.intarsys.pdf.app.acroform.CommonFormHandler

de.intarsys.pdf.app.acroform
Class CommonFormHandler
java.lang.Object
|
+-de.intarsys.pdf.app.acroform.CommonFormHandler
All Implemented Interfaces:
IFormHandler

Direct Known Subclasses:


StandardFormHandler

public abstract class CommonFormHandler


extends Object
implements IFormHandler

A common superclass for implementing IFormHandler.

Method Summary
PDDocument getDoc()

String getFieldValue(Object fieldref)

boolean isCalculate()

boolean isValidate()

void recalculate()

void recalculate(Object fieldRef)

void resetFields()

void resetFields(java.util.List fieldNames, boolean invert)

void setCalculate(boolean calculate)

void setFieldValue(Object fieldRef, Object value)

void setValidate(boolean validate)

Methods
getDoc
public PDDocument getDoc()

Page 27 of 1521
de.intarsys.pdf.app.acroform.CommonFormHandler

(continued from last page)

getFieldValue
public String getFieldValue(Object fieldref)

isCalculate
public boolean isCalculate()

isValidate
public boolean isValidate()

recalculate
public void recalculate()

resetFields
public void resetFields()

resetFields
public void resetFields(java.util.List fieldNames,
boolean invert)

setCalculate
public void setCalculate(boolean calculate)

setFieldValue
public void setFieldValue(Object fieldRef,
Object value)

setValidate
public void setValidate(boolean validate)

Page 28 of 1521
de.intarsys.pdf.app.acroform.CommonFormHandler

recalculate
public void recalculate(Object fieldRef)

Page 29 of 1521
de.intarsys.pdf.app.acroform.FormHandlerFactory

de.intarsys.pdf.app.acroform
Class FormHandlerFactory
java.lang.Object
|
+-de.intarsys.pdf.app.acroform.FormHandlerFactory

public class FormHandlerFactory


extends Object

The singleton for accessing the VM IFormHandlerFactory.

Constructor Summary
public FormHandlerFactory()

Method Summary
static get()
IFormHandlerFactory
The active IFormHandlerFactory for the VM.

static void set(IFormHandlerFactory factory)


Set the active IFormHandlerFactory for the VM.

Constructors
FormHandlerFactory
public FormHandlerFactory()

Methods
get
public static IFormHandlerFactory get()

The active IFormHandlerFactory for the VM.

Returns:

set
public static void set(IFormHandlerFactory factory)

Set the active IFormHandlerFactory for the VM.

Parameters:
factory - The new IFormHandlerFactory singleton.

Page 30 of 1521
de.intarsys.pdf.app.acroform.IFormHandler

de.intarsys.pdf.app.acroform
Interface IFormHandler
All Known Implementing Classes:
CommonFormHandler

public interface IFormHandler


extends

A wrapper implementation for the business logic around an AcroForm.

The IFormHandler manages the complex protocols when handling forms.

Method Summary
PDDocument getDoc()

String getFieldValue(Object fieldRef)

boolean isCalculate()

boolean isValidate()

void recalculate()

void recalculate(Object fieldRef)

void resetFields()

void resetFields(java.util.List fieldNames, boolean invert)

void setCalculate(boolean calculate)

void setFieldValue(Object fieldRef, Object value)

void setValidate(boolean validate)

Methods
setValidate
public void setValidate(boolean validate)

isValidate
public boolean isValidate()

Page 31 of 1521
de.intarsys.pdf.app.acroform.IFormHandler

(continued from last page)

setCalculate
public void setCalculate(boolean calculate)

isCalculate
public boolean isCalculate()

getFieldValue
public String getFieldValue(Object fieldRef)

setFieldValue
public void setFieldValue(Object fieldRef,
Object value)

resetFields
public void resetFields()

resetFields
public void resetFields(java.util.List fieldNames,
boolean invert)

recalculate
public void recalculate(Object fieldRef)

recalculate
public void recalculate()

getDoc
public PDDocument getDoc()

Page 32 of 1521
de.intarsys.pdf.app.acroform.IFormHandlerFactory

de.intarsys.pdf.app.acroform
Interface IFormHandlerFactory
All Known Implementing Classes:
StandardFormHandlerFactory

public interface IFormHandlerFactory


extends

A factory form IFormHandler instances. An IFormHandler is always attached to a concrete PDDocument.

Method Summary
IFormHandler createFormHandler(PDDocument doc, java.util.Map options)
Get the IFormHandler related to PDDocument.

Methods
createFormHandler
public IFormHandler createFormHandler(PDDocument doc,
java.util.Map options)

Get the IFormHandler related to PDDocument.

Parameters:
doc - The document whose IFormHandler is requested.
options - TODO

Returns:
Get the IFormHandler related to PDDocument.

Page 33 of 1521
de.intarsys.pdf.app.acroform.StandardFormHandler

de.intarsys.pdf.app.acroform
Class StandardFormHandler
java.lang.Object
|
+-de.intarsys.pdf.app.acroform.CommonFormHandler
|
+-de.intarsys.pdf.app.acroform.StandardFormHandler
All Implemented Interfaces:
IFormHandler

public class StandardFormHandler


extends CommonFormHandler

The standard implementation of an IFormHandler. This one delegates its tasks to some other PDF library components, like
appearance creation and action processing.

Page 34 of 1521
de.intarsys.pdf.app.acroform.StandardFormHandlerFactory

de.intarsys.pdf.app.acroform
Class StandardFormHandlerFactory
java.lang.Object
|
+-de.intarsys.pdf.app.acroform.StandardFormHandlerFactory
All Implemented Interfaces:
IFormHandlerFactory

public class StandardFormHandlerFactory


extends Object
implements IFormHandlerFactory

The standard implementation for IFormHandlerFactory creating a StandardFormHandler.

Constructor Summary
public StandardFormHandlerFactory()

Method Summary
IFormHandler createFormHandler(PDDocument doc, java.util.Map options)

Constructors
StandardFormHandlerFactory
public StandardFormHandlerFactory()

Methods
createFormHandler
public IFormHandler createFormHandler(PDDocument doc,
java.util.Map options)

Page 35 of 1521
Package
de.intarsys.pdf.app.action
Some application level framework to handle the event mechanics in a PDF document.

Concrete implementations have to be provided by the application itself, as the heavily depend on the applications abilities
(JavaScript) and interaction behavior.

Page 36 of 1521
de.intarsys.pdf.app.action.AbstractActionHandler

de.intarsys.pdf.app.action
Class AbstractActionHandler
java.lang.Object
|
+-de.intarsys.pdf.app.action.AbstractActionHandler
All Implemented Interfaces:
IActionHandler

public abstract class AbstractActionHandler


extends Object
implements IActionHandler

A common convenience superclass for implementing IActionHandler objects.

Constructor Summary
public AbstractActionHandler()

Constructors
AbstractActionHandler
public AbstractActionHandler()

Page 37 of 1521
de.intarsys.pdf.app.action.ActionException

de.intarsys.pdf.app.action
Class ActionException
java.lang.Object
|
+-java.lang.Throwable
|
+-java.lang.Exception
|
+-de.intarsys.pdf.app.action.ActionException
All Implemented Interfaces:
java.io.Serializable

public class ActionException


extends Exception

An exception encountered ahile handling a action or action sequence.

Constructor Summary
public ActionException()

public ActionException(String message)

public ActionException(Throwable cause)

public ActionException(String message, Throwable cause)

Constructors
ActionException
public ActionException()

ActionException
public ActionException(String message)

ActionException
public ActionException(Throwable cause)

Page 38 of 1521
de.intarsys.pdf.app.action.ActionException

(continued from last page)

ActionException
public ActionException(String message,
Throwable cause)

Page 39 of 1521
de.intarsys.pdf.app.action.ActionHandlerRegistry

de.intarsys.pdf.app.action
Class ActionHandlerRegistry
java.lang.Object
|
+-de.intarsys.pdf.app.action.ActionHandlerRegistry

public class ActionHandlerRegistry


extends Object

A singleton for the IActionHandlerRegistry.

Constructor Summary
public ActionHandlerRegistry()

Method Summary
static get()
IActionHandlerRegistr
y The active IActionHandlerRegistry for the VM.

static void set(IActionHandlerRegistry active)


Set the active IActionHandlerRegistry for the VM.

Constructors
ActionHandlerRegistry
public ActionHandlerRegistry()

Methods
set
public static void set(IActionHandlerRegistry active)

Set the active IActionHandlerRegistry for the VM.

Parameters:
active - The new active IActionHandlerRegistry.

get
public static IActionHandlerRegistry get()

The active IActionHandlerRegistry for the VM.

Returns:
The active IActionHandlerRegistry for the VM.

Page 40 of 1521
de.intarsys.pdf.app.action.ActionProcessor

de.intarsys.pdf.app.action
Class ActionProcessor
java.lang.Object
|
+-de.intarsys.pdf.app.action.ActionProcessor

public class ActionProcessor


extends Object

A singleton for the IActionProcessor.

Constructor Summary
public ActionProcessor()

Method Summary
static get()
IActionProcessor
The active IActionHandlerRegistry for the VM.

static void set(IActionProcessor active)


Set the active IActionProcessor for the VM.

Constructors
ActionProcessor
public ActionProcessor()

Methods
set
public static void set(IActionProcessor active)

Set the active IActionProcessor for the VM.

Parameters:
active - The new active IActionProcessor.

get
public static IActionProcessor get()

The active IActionHandlerRegistry for the VM.

Returns:
The active IActionHandlerRegistry for the VM.

Page 41 of 1521
de.intarsys.pdf.app.action.ActionTools

de.intarsys.pdf.app.action
Class ActionTools
java.lang.Object
|
+-de.intarsys.pdf.app.action.ActionTools

public class ActionTools


extends Object

Tool class for PDAction related tasks.

Nested Class Summary


class ActionTools.ActionDisablement
ActionTools.ActionDisablement

Field Summary
public static final DK_JavaScript
The key where we can find the static JavaScripts in the document catalog.

Constructor Summary
public ActionTools()

Method Summary
static TriggerEvent annotationTriggerBlurred(PDAnnotation annotation)

static TriggerEvent annotationTriggerFocus(PDAnnotation annotation)

static TriggerEvent annotationTriggerKeystroke(PDAnnotation annotation, String change,


boolean willCommit, int commitKey, boolean modifier, int selStart, int
selEnd, boolean shift, String value)

static TriggerEvent annotationTriggerMouseDown(PDAnnotation annotation)

static TriggerEvent annotationTriggerMouseEnter(PDAnnotation annotation)

static TriggerEvent annotationTriggerMouseExit(PDAnnotation annotation)

static TriggerEvent annotationTriggerMouseUp(PDAnnotation annotation)

static TriggerEvent annotationTriggerPageClose(PDAnnotation annotation)

static TriggerEvent annotationTriggerPageInvisible(PDAnnotation annotation)

static TriggerEvent annotationTriggerPageOpen(PDAnnotation annotation)

Page 42 of 1521
de.intarsys.pdf.app.action.ActionTools

static TriggerEvent annotationTriggerPageVisible(PDAnnotation annotation)

static disableActions(COSDocument doc, COSName actionType)


ActionTools.ActionDis
ablement Set a flag with doc to signal that action processing for the type actionType should be
disabled.

static void documentProcessModules(PDDocument doc)

static TriggerEvent documentTriggerClose(PDDocument doc)

static TriggerEvent documentTriggerDidPrint(PDDocument doc)

static TriggerEvent documentTriggerDidSave(PDDocument doc)

static TriggerEvent documentTriggerOpen(PDDocument doc)

static TriggerEvent documentTriggerWillPrint(PDDocument doc)

static TriggerEvent documentTriggerWillSave(PDDocument doc)

static void enableActions(COSDocument doc, ActionTools.ActionDisablement


disablement)
Remove a flag with doc to reestablish action processing for the type actionType.

static TriggerEvent fieldTriggerCalculate(PDAcroFormField field, String value,


PDAcroFormField source)

static TriggerEvent fieldTriggerFormat(PDAcroFormField field, boolean willCommit, int


commitKey, String value)
Format the value of the widget according to its formatting script.

static TriggerEvent fieldTriggerValidate(PDAcroFormField field, String value)

static boolean isEnabled(COSDocument doc, COSName actionType)


true if execution of an action of type actionType should be allowed.

static TriggerEvent pageTriggerClose(PDPage page)

static TriggerEvent pageTriggerOpen(PDPage page)

Fields
DK_JavaScript
public static final de.intarsys.pdf.cos.COSName DK_JavaScript

The key where we can find the static JavaScripts in the document catalog.

Constructors

Page 43 of 1521
de.intarsys.pdf.app.action.ActionTools

(continued from last page)

ActionTools
public ActionTools()

Methods
annotationTriggerBlurred
public static TriggerEvent annotationTriggerBlurred(PDAnnotation annotation)

annotationTriggerFocus
public static TriggerEvent annotationTriggerFocus(PDAnnotation annotation)

annotationTriggerKeystroke
public static TriggerEvent annotationTriggerKeystroke(PDAnnotation annotation,
String change,
boolean willCommit,
int commitKey,
boolean modifier,
int selStart,
int selEnd,
boolean shift,
String value)

annotationTriggerMouseDown
public static TriggerEvent annotationTriggerMouseDown(PDAnnotation annotation)

annotationTriggerMouseEnter
public static TriggerEvent annotationTriggerMouseEnter(PDAnnotation annotation)

annotationTriggerMouseExit
public static TriggerEvent annotationTriggerMouseExit(PDAnnotation annotation)

annotationTriggerMouseUp
public static TriggerEvent annotationTriggerMouseUp(PDAnnotation annotation)

Page 44 of 1521
de.intarsys.pdf.app.action.ActionTools

annotationTriggerPageClose
public static TriggerEvent annotationTriggerPageClose(PDAnnotation annotation)

annotationTriggerPageInvisible
public static TriggerEvent annotationTriggerPageInvisible(PDAnnotation annotation)

annotationTriggerPageOpen
public static TriggerEvent annotationTriggerPageOpen(PDAnnotation annotation)

annotationTriggerPageVisible
public static TriggerEvent annotationTriggerPageVisible(PDAnnotation annotation)

disableActions
public static ActionTools.ActionDisablement disableActions(COSDocument doc,
COSName actionType)

Set a flag with doc to signal that action processing for the type actionType should be disabled. This flag is honoured by
the StandardActionProcessor.

Specify null as the actionType to disable processing of all actions.

Parameters:
doc - The document for which action processing is switched off.
actionType - The type of actions no longer executed or null for all action types.

Returns:
A handle that is used for re-enabling the processing. This ensures that action processing can't be reestablished by
malicious code (as long as you don't leak the handle).

documentProcessModules
public static void documentProcessModules(PDDocument doc)

documentTriggerClose
public static TriggerEvent documentTriggerClose(PDDocument doc)

documentTriggerDidPrint
public static TriggerEvent documentTriggerDidPrint(PDDocument doc)

Page 45 of 1521
de.intarsys.pdf.app.action.ActionTools

documentTriggerDidSave
public static TriggerEvent documentTriggerDidSave(PDDocument doc)

documentTriggerOpen
public static TriggerEvent documentTriggerOpen(PDDocument doc)

documentTriggerWillPrint
public static TriggerEvent documentTriggerWillPrint(PDDocument doc)

documentTriggerWillSave
public static TriggerEvent documentTriggerWillSave(PDDocument doc)

enableActions
public static void enableActions(COSDocument doc,
ActionTools.ActionDisablement disablement)

Remove a flag with doc to reestablish action processing for the type actionType. This flag is honoured by the
StandardActionProcessor.

You must supply the handle from your call to "disableAction" in disablement.

Parameters:
doc - The document for which action processing is switched off.
disablement - The handle from "disableActions"

fieldTriggerCalculate
public static TriggerEvent fieldTriggerCalculate(PDAcroFormField field,
String value,
PDAcroFormField source)

fieldTriggerFormat
public static TriggerEvent fieldTriggerFormat(PDAcroFormField field,
boolean willCommit,
int commitKey,
String value)

Format the value of the widget according to its formatting script. The result of the formatting is not stored but only used as
the input for the widget appearance rendering.

Page 46 of 1521
de.intarsys.pdf.app.action.ActionTools

(continued from last page)

fieldTriggerValidate
public static TriggerEvent fieldTriggerValidate(PDAcroFormField field,
String value)

isEnabled
public static boolean isEnabled(COSDocument doc,
COSName actionType)

true if execution of an action of type actionType should be allowed. This flag is honoured by the
StandardActionProcessor.

Parameters:
doc - The document under inspection.
actionType - The type of actions we want to execute.

Returns:
true if execution of an action of type actionType should be allowed.

pageTriggerClose
public static TriggerEvent pageTriggerClose(PDPage page)

pageTriggerOpen
public static TriggerEvent pageTriggerOpen(PDPage page)

Page 47 of 1521
de.intarsys.pdf.app.action.ActionTools.ActionDisablement

de.intarsys.pdf.app.action
Class ActionTools.ActionDisablement
java.lang.Object
|
+-de.intarsys.pdf.app.action.ActionTools.ActionDisablement

public static class ActionTools.ActionDisablement


extends Object

Handle type for disable/enable action processing

Constructor Summary
public ActionTools.ActionDisablement()

Constructors
ActionTools.ActionDisablement
public ActionTools.ActionDisablement()

Page 48 of 1521
de.intarsys.pdf.app.action.IActionHandler

de.intarsys.pdf.app.action
Interface IActionHandler
All Known Implementing Classes:
AbstractActionHandler

public interface IActionHandler


extends

An object that can process an action definition in a defined event context.

An action handler is registered with the action handler factory in the action framework and exists ONCE in the system. The handler
should be prepared to run in a threaded environment and should not be stateful.

Method Summary
COSName getActionType()
The type of actions this handler can process.

void process(TriggerEvent event, COSObject actionDefinition)


Perform the actionDefinition in the context of event.

Methods
getActionType
public COSName getActionType()

The type of actions this handler can process.

This is for example /JavaScript for JavaScript or /GoTo for a jump to another destination in the document.

Returns:
The type of actions this handler can process.

process
public void process(TriggerEvent event,
COSObject actionDefinition)
throws ActionException

Perform the actionDefinition in the context of event.

Parameters:
event - The cause of the processing.
actionDefinition - The processing definition.

Throws:
ActionException

Page 49 of 1521
de.intarsys.pdf.app.action.IActionHandlerRegistry

de.intarsys.pdf.app.action
Interface IActionHandlerRegistry
All Known Implementing Classes:
StandardActionHandlerRegistry

public interface IActionHandlerRegistry


extends

A factory for action handler objects.

The action handler factory returns a registered handler for a given action type.

Method Summary
java.util.List getActionHandlers()
A collection of all registered IActionHandler instances.

IActionHandler lookupActionHandler(COSName actionType)


The IActionHandler for the specified actionType.

void registerActionHandler(IActionHandler handler)


Register an IActionHandler.

void unregisterActionHandler(IActionHandler handler)


Unregister an IActionHandler.

Methods
lookupActionHandler
public IActionHandler lookupActionHandler(COSName actionType)

The IActionHandler for the specified actionType.

Parameters:
actionType - The type of action to be executed, for example /JavaScript

Returns:
The IActionHandler able to process an action definition of the specified type.

registerActionHandler
public void registerActionHandler(IActionHandler handler)

Register an IActionHandler.

Parameters:
handler - The new handler

Page 50 of 1521
de.intarsys.pdf.app.action.IActionHandlerRegistry

(continued from last page)

unregisterActionHandler
public void unregisterActionHandler(IActionHandler handler)

Unregister an IActionHandler.

Parameters:
handler - The IActionHandler to be unregistered.

getActionHandlers
public java.util.List getActionHandlers()

A collection of all registered IActionHandler instances.

Returns:
A collection of all registered IActionHandler instances.

Page 51 of 1521
de.intarsys.pdf.app.action.IActionProcessor

de.intarsys.pdf.app.action
Interface IActionProcessor
All Known Implementing Classes:
StandardActionProcessor

public interface IActionProcessor


extends

A processor (interpreter) object for action definition objects.

This objects calls the "statements" of an "action script" one by one in a given event context.The action definition remains
"untyped" to allow for the different definition forms (for example in GoTo actions this may be a String, a Name, an Array or a
Dictionary).

Method Summary
void process(TriggerEvent event, COSName actionType, COSObject
actionDefinition)
Process an actionDefinition of type actionType caused by event.

Methods
process
public void process(TriggerEvent event,
COSName actionType,
COSObject actionDefinition)

Process an actionDefinition of type actionType caused by event.

Parameters:
event
actionType
actionDefinition

Page 52 of 1521
de.intarsys.pdf.app.action.PACKAGE

de.intarsys.pdf.app.action
Class PACKAGE
java.lang.Object
|
+-de.intarsys.pdf.app.action.PACKAGE

public class PACKAGE


extends Object

Field Summary
public static final Log

Constructor Summary
public PACKAGE()

Fields
Log
public static final java.util.logging.Logger Log

Constructors
PACKAGE
public PACKAGE()

Page 53 of 1521
de.intarsys.pdf.app.action.StandardActionHandlerRegistry

de.intarsys.pdf.app.action
Class StandardActionHandlerRegistry
java.lang.Object
|
+-de.intarsys.pdf.app.action.StandardActionHandlerRegistry
All Implemented Interfaces:
IActionHandlerRegistry

public class StandardActionHandlerRegistry


extends Object
implements IActionHandlerRegistry

The default implementation for a action handler factory.

Constructor Summary
public StandardActionHandlerRegistry()

Method Summary
java.util.List getActionHandlers()

IActionHandler getDefaultHandler()

IActionHandler lookupActionHandler(COSName actionType)

void registerActionHandler(IActionHandler handler)

void registerDefaultHandler(IActionHandler handler)

void unregisterActionHandler(IActionHandler handler)

Constructors
StandardActionHandlerRegistry
public StandardActionHandlerRegistry()

Methods
lookupActionHandler
public IActionHandler lookupActionHandler(COSName actionType)

Page 54 of 1521
de.intarsys.pdf.app.action.StandardActionHandlerRegistry

registerActionHandler
public void registerActionHandler(IActionHandler handler)

unregisterActionHandler
public void unregisterActionHandler(IActionHandler handler)

getDefaultHandler
public IActionHandler getDefaultHandler()

registerDefaultHandler
public void registerDefaultHandler(IActionHandler handler)

getActionHandlers
public java.util.List getActionHandlers()

Page 55 of 1521
de.intarsys.pdf.app.action.StandardActionProcessor

de.intarsys.pdf.app.action
Class StandardActionProcessor
java.lang.Object
|
+-de.intarsys.pdf.app.action.StandardActionProcessor
All Implemented Interfaces:
IActionProcessor

public class StandardActionProcessor


extends Object
implements IActionProcessor

The standard IActionProcessor implementation.

Constructor Summary
public StandardActionProcessor()

Method Summary
void process(TriggerEvent event, COSName actionType, COSObject
actionDefinition)

Constructors
StandardActionProcessor
public StandardActionProcessor()

Methods
process
public void process(TriggerEvent event,
COSName actionType,
COSObject actionDefinition)

Page 56 of 1521
de.intarsys.pdf.app.action.TriggerEvent

de.intarsys.pdf.app.action
Class TriggerEvent
java.lang.Object
|
+-java.util.EventObject
|
+-de.intarsys.pdf.app.action.TriggerEvent
All Implemented Interfaces:
java.io.Serializable

public class TriggerEvent


extends java.util.EventObject

An event that leads to the processing of an action or action sequence.

The source of the event is always the COSObject responsible for the event, for example the document for document level events,
the field for field events and so on.

Constructor Summary
public TriggerEvent(Object context, COSName reason)

public TriggerEvent(Object source, Object context, COSName reason)

Method Summary
String getChange()

int getCommitKey()

Object getContext()

String getName()

boolean getRc()

COSName getReason()

int getSelEnd()

int getSelStart()

Object getSource()

Object getTarget()

String getTargetName()

Page 57 of 1521
de.intarsys.pdf.app.action.TriggerEvent

String getType()

String getValue()

boolean isExecuted()

boolean isModifier()

boolean isRc()

boolean isShift()

boolean isWillCommit()

void setChange(String change)

void setCommitKey(int commitKey)

void setExecuted(boolean executed)

void setModifier(boolean modifier)

void setRc(boolean rc)

void setSelEnd(int selEnd)

void setSelStart(int selStart)

void setShift(boolean shift)

void setTarget(Object target)

void setTargetName(String targetName)

void setValue(String value)

void setWillCommit(boolean willCommit)

Constructors
TriggerEvent
public TriggerEvent(Object context,
COSName reason)

Page 58 of 1521
de.intarsys.pdf.app.action.TriggerEvent

(continued from last page)

TriggerEvent
public TriggerEvent(Object source,
Object context,
COSName reason)

Methods
getSource
public Object getSource()

isModifier
public boolean isModifier()

setModifier
public void setModifier(boolean modifier)

getCommitKey
public int getCommitKey()

setCommitKey
public void setCommitKey(int commitKey)

isWillCommit
public boolean isWillCommit()

setWillCommit
public void setWillCommit(boolean willCommit)

getSelEnd
public int getSelEnd()

Page 59 of 1521
de.intarsys.pdf.app.action.TriggerEvent

setSelEnd
public void setSelEnd(int selEnd)

getSelStart
public int getSelStart()

setSelStart
public void setSelStart(int selStart)

getValue
public String getValue()

setValue
public void setValue(String value)

isShift
public boolean isShift()

getTarget
public Object getTarget()

getTargetName
public String getTargetName()

setRc
public void setRc(boolean rc)

getRc
public boolean getRc()

Page 60 of 1521
de.intarsys.pdf.app.action.TriggerEvent

(continued from last page)

isRc
public boolean isRc()

getReason
public COSName getReason()

getChange
public String getChange()

setChange
public void setChange(String change)

setShift
public void setShift(boolean shift)

setTarget
public void setTarget(Object target)

setTargetName
public void setTargetName(String targetName)

getName
public String getName()

getType
public String getType()

Page 61 of 1521
de.intarsys.pdf.app.action.TriggerEvent

(continued from last page)

getContext
public Object getContext()

isExecuted
public boolean isExecuted()

setExecuted
public void setExecuted(boolean executed)

Page 62 of 1521
Package
de.intarsys.pdf.app.appearance
The "framework" for dealing with appearances. This is really needed when later on an interactive/viewer application needs to
create appearances. It is here already to satisfy the dependencies from the IFormHandler frameworks.

Page 63 of 1521
de.intarsys.pdf.app.appearance.AppearanceCreatorRegistry

de.intarsys.pdf.app.appearance
Class AppearanceCreatorRegistry
java.lang.Object
|
+-de.intarsys.pdf.app.appearance.AppearanceCreatorRegistry

public class AppearanceCreatorRegistry


extends Object

A VM singleton for the IAppearanceCreatorRegistry.

Constructor Summary
public AppearanceCreatorRegistry()

Method Summary
static get()
IAppearanceCreatorReg
istry

static void set(IAppearanceCreatorRegistry active)

Constructors
AppearanceCreatorRegistry
public AppearanceCreatorRegistry()

Methods
get
public static IAppearanceCreatorRegistry get()

set
public static void set(IAppearanceCreatorRegistry active)

Page 64 of 1521
de.intarsys.pdf.app.appearance.AppearanceCreatorTools

de.intarsys.pdf.app.appearance
Class AppearanceCreatorTools
java.lang.Object
|
+-de.intarsys.pdf.app.appearance.AppearanceCreatorTools

public class AppearanceCreatorTools


extends Object

Tool class for tasks related to appearance creation.

Constructor Summary
public AppearanceCreatorTools()

Method Summary
static void createAppearance(PDAcroFormField field)

static PDAppearance createAppearance(PDAnnotation annotation)

Constructors
AppearanceCreatorTools
public AppearanceCreatorTools()

Methods
createAppearance
public static PDAppearance createAppearance(PDAnnotation annotation)

createAppearance
public static void createAppearance(PDAcroFormField field)

Page 65 of 1521
de.intarsys.pdf.app.appearance.IAppearanceCreator

de.intarsys.pdf.app.appearance
Interface IAppearanceCreator
All Known Implementing Classes:
NullAppearanceCreator

public interface IAppearanceCreator


extends

A strategy for creating the appearances (PDForm objects) for an annotation. Depending on the annotations state the PDAppearance
should be manipulated to provide the correct visual feedback.

Method Summary
PDAppearance createAppearance(PDAnnotation annotation, PDAppearance appearance)
Create a PDAppearance suitable to display annotation in its current state.

COSName getAnnotationType()
The type of annotations this handler can process.

Methods
createAppearance
public PDAppearance createAppearance(PDAnnotation annotation,
PDAppearance appearance)

Create a PDAppearance suitable to display annotation in its current state. The implementation should use "appearance"
when set, if not should try to use the annotations PDAppearance. If none of both is set, it should create a new one. The
method should return the appearance it worked upon.

The code should NOT manipulate (write to) the annotation. If a new PDAppearance is to be created, it should be created
and returned as the methods result without connecting to the annotation.

To allow for "daisy chaining" calls, a appearance parameter is provided. If it is null, the code should lookup the appearance
in the annotation. If nothing there, it should create a new one (again: without connecting to the annotation).

Parameters:
annotation
appearance

Returns:

getAnnotationType
public COSName getAnnotationType()

The type of annotations this handler can process.

This is for example /Ink or /Circle.

Returns:
The type of annotations this handler can process.

Page 66 of 1521
de.intarsys.pdf.app.appearance.IAppearanceCreatorRegistry

de.intarsys.pdf.app.appearance
Interface IAppearanceCreatorRegistry
All Known Implementing Classes:
StandardAppearanceCreatorRegistry

public interface IAppearanceCreatorRegistry


extends

A registry for IAppearanceCreator instances.

By convenience the VM singleton can be looked up in AppearanceCreatorRegistry.

Method Summary
java.util.List getAppearanceCreators()
A collection of all registered IAppearanceCreator instances.

IAppearanceCreator lookupAppearanceCreator(COSName type)

void registerAppearanceCreator(IAppearanceCreator creator)

void unregisterAppearanceCreator(IAppearanceCreator creator)

Methods
getAppearanceCreators
public java.util.List getAppearanceCreators()

A collection of all registered IAppearanceCreator instances.

Returns:
A collection of all registered IAppearanceCreator instances.

lookupAppearanceCreator
public IAppearanceCreator lookupAppearanceCreator(COSName type)

registerAppearanceCreator
public void registerAppearanceCreator(IAppearanceCreator creator)

unregisterAppearanceCreator
public void unregisterAppearanceCreator(IAppearanceCreator creator)

Page 67 of 1521
de.intarsys.pdf.app.appearance.IAppearanceCreatorRegistry

(continued from last page)

Page 68 of 1521
de.intarsys.pdf.app.appearance.NullAppearanceCreator

de.intarsys.pdf.app.appearance
Class NullAppearanceCreator
java.lang.Object
|
+-de.intarsys.pdf.app.appearance.NullAppearanceCreator
All Implemented Interfaces:
IAppearanceCreator

public class NullAppearanceCreator


extends Object
implements IAppearanceCreator

Create an empty annotation appearance.

Constructor Summary
public NullAppearanceCreator()

Method Summary
PDAppearance createAppearance(PDAnnotation annotation, PDAppearance appearance)

COSName getAnnotationType()

Constructors
NullAppearanceCreator
public NullAppearanceCreator()

Methods
createAppearance
public PDAppearance createAppearance(PDAnnotation annotation,
PDAppearance appearance)

getAnnotationType
public COSName getAnnotationType()

Page 69 of 1521
de.intarsys.pdf.app.appearance.StandardAppearanceCreatorRegistry

de.intarsys.pdf.app.appearance
Class StandardAppearanceCreatorRegistry
java.lang.Object
|
+-de.intarsys.pdf.app.appearance.StandardAppearanceCreatorRegistry
All Implemented Interfaces:
IAppearanceCreatorRegistry

public class StandardAppearanceCreatorRegistry


extends Object
implements IAppearanceCreatorRegistry

A registry for the available IAppearanceCreator strategies. The IAppearanceCreator is looked up by the annotation sub-
type.

Method Summary
java.util.List getAppearanceCreators()

IAppearanceCreator lookupAppearanceCreator(COSName type)

void registerAppearanceCreator(IAppearanceCreator creator)

void unregisterAppearanceCreator(IAppearanceCreator creator)

Methods
registerAppearanceCreator
public void registerAppearanceCreator(IAppearanceCreator creator)

lookupAppearanceCreator
public IAppearanceCreator lookupAppearanceCreator(COSName type)

unregisterAppearanceCreator
public void unregisterAppearanceCreator(IAppearanceCreator creator)

getAppearanceCreators
public java.util.List getAppearanceCreators()

Page 70 of 1521
de.intarsys.pdf.app.appearance.StandardAppearanceCreatorRegistry

(continued from last page)

Page 71 of 1521
Package
de.intarsys.pdf.cds
CDS (Common Data Structure) defines higher level data structures or types on top of COS types that are used all over the PDF
spec.

Examples of such data structures that are no longer COS "primitives" (like strings and numbers) or "composites" (like arrays or
dictionaries) but have already domain specific behavior are the date or rectangle object.

The CDS objects are implemented as wrappers on COS objects. Every change is reflected immediately in the implementation
(COS) layer and vice versa.

Page 72 of 1521
de.intarsys.pdf.cds.CDSBase

de.intarsys.pdf.cds
Class CDSBase
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.cds.CDSBase
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


CDSDate, CDSMatrix, CDSRectangle, CDSTreeNode

public abstract class CDSBase


extends COSBasedObject

An abstract base class for all common data structures.

A common data structure implements some "simple" semantics based upon a COSObject, for example a rectangle based on a
COSArray.

Page 73 of 1521
de.intarsys.pdf.cds.CDSDate

de.intarsys.pdf.cds
Class CDSDate
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.cds.CDSBase
|
+-de.intarsys.pdf.cds.CDSDate
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class CDSDate


extends CDSBase

The implementation for a date string based on a COSString.

The string follows the format defined in [PDF], chapter 3.8.2.

Field Summary
public static final DATE_FORMAT

Value: 'D':yyyyMMddHHmmss

public static final DatePattern

Constructor Summary
public CDSDate()
Create a new date object with the current system date set

Method Summary
static CDSDate createFromCOS(COSString string)
Create a CDSDate from a COSString

static String format(CDSDate cdsDate)


Format a CDSDate using the default format.

static String format(java.text.Format format, CDSDate cdsDate)


Format a CDSDate using format.

String stringValue()
The java.lang.String representation of this.

java.util.Date toDate()
The java.util.Date represented by this.

static java.util.Date toDate(String string)


Create a java.util.Date using the default format.

static java.util.Date toDateWithZone(String string)


Create a java.util.Date using the default format using the timezone.

Page 74 of 1521
de.intarsys.pdf.cds.CDSDate

String toFormattedString()
A formatted java.lang.String representation of this.

static String toString(java.util.Date date)

static String toStringWithZone(java.util.Date date)

static String toStringWithZone(java.util.Date date, java.util.TimeZone timeZone)

Fields
DATE_FORMAT
public static final java.lang.String DATE_FORMAT

Constant value: 'D':yyyyMMddHHmmss

DatePattern
public static final java.util.regex.Pattern DatePattern

Constructors
CDSDate
public CDSDate()

Create a new date object with the current system date set

Methods
createFromCOS
public static CDSDate createFromCOS(COSString string)

Create a CDSDate from a COSString

Parameters:
string - The base string.

Returns:
Create a CDSDate from a COSString

format
public static String format(CDSDate cdsDate)

Format a CDSDate using the default format.

Parameters:
cdsDate - The CDSDate to be formatted.

Page 75 of 1521
de.intarsys.pdf.cds.CDSDate

(continued from last page)

Returns:
A formatted java.lang.String representation.

format
public static String format(java.text.Format format,
CDSDate cdsDate)

Format a CDSDate using format.

Parameters:
format - The format to be used for formatting
cdsDate - The date to be formatted

Returns:
A formatted java.lang.String representation of cdsDate

toDate
public static java.util.Date toDate(String string)
throws java.text.ParseException

Create a java.util.Date using the default format.

Parameters:
string - The date string.

Returns:
The parsed java.util.Date

Throws:
ParseException

toDateWithZone
public static java.util.Date toDateWithZone(String string)
throws java.text.ParseException

Create a java.util.Date using the default format using the timezone.

Parameters:
string - The date string.

Returns:
The parsed java.util.Date

Throws:
ParseException

toString
public static String toString(java.util.Date date)

Page 76 of 1521
de.intarsys.pdf.cds.CDSDate

(continued from last page)

toStringWithZone
public static String toStringWithZone(java.util.Date date)

toStringWithZone
public static String toStringWithZone(java.util.Date date,
java.util.TimeZone timeZone)

stringValue
public String stringValue()

The java.lang.String representation of this.

Returns:
The java.lang.String representation of this.

toDate
public java.util.Date toDate()
throws java.text.ParseException

The java.util.Date represented by this.

Returns:
The java.util.Date represented by this.

Throws:
ParseException

toFormattedString
public String toFormattedString()

A formatted java.lang.String representation of this.

Returns:
A formatted java.lang.String representation of this.

Page 77 of 1521
de.intarsys.pdf.cds.CDSMatrix

de.intarsys.pdf.cds
Class CDSMatrix
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.cds.CDSBase
|
+-de.intarsys.pdf.cds.CDSMatrix
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class CDSMatrix


extends CDSBase

The implementation of the pdf transformation matrix.

Each matrix is represented as an array.

The transformation matrix:

+ +
| a b 0 |
| c d 0 |
| e f 1 |
+ +

is written as a COSArray in the form:

[ a b c d e f ]

The identity transformation has the form:

[ 1 0 0 1 0 0 ]

Coordinates could be transformed by a matrix.

A coordinate transformation is defined as:


+ +
| a b 0 |
[ x' y' 1 ] = [ x y 1] * | c d 0 |
| e f 1 |
+ +

so that

x' = x*a + y*c + e


y' = x*b + y*d + f

Page 78 of 1521
de.intarsys.pdf.cds.CDSMatrix

Field Summary
public static MATRIX_0
Static information needed for rotation: rotate 0 degress (identity matrix)

public static MATRIX_180


Static information needed for rotation: rotate 180 degrees

public static MATRIX_270


Static information needed for rotation: rotate 270 degrees

public static MATRIX_90


Static information needed for rotation: rotate 90 degrees

Constructor Summary
public CDSMatrix()
CDSMatrix constructor.

public CDSMatrix(float[] data)


Create a CDSMatrix based on the array in the parameter.

Method Summary
CDSMatrix copy()
Create a copy of the receiver

static CDSMatrix createFromCOS(COSArray array)


Create a CDSMatrix from an array holding the transformation parameters.

float getA()
Return the matrix element "a".

float getB()
Return the matrix element "b".

float getC()
Return the matrix element "c".

float getD()
Return the matrix element "d".

float getE()
Return the matrix element "e".

float getF()
Return the matrix element "f".

void invalidateCaches()

void rotate(float angle)


Concatenate this transformation with a rotation transformation.

void scale(float[] v)
Concatenate this transformation with a scaling transformation.

Page 79 of 1521
de.intarsys.pdf.cds.CDSMatrix

void setA(float num)


Set the matrix element "a".

void setB(float num)


Set the matrix element "b".

void setC(float num)


Set the matrix element "c".

void setD(float num)


Set the matrix element "d".

void setE(float num)


Set the matrix element "e".

void setF(float num)


Set the matrix element "f".

void setTransformation(java.awt.geom.AffineTransform transform)


Set all matrix elements "a" - "f"

void setTransformation(float[] data)


Set all matrix elements "a" - "f"

void setTransformation(float a, float b, float c, float d, float e, float f)


Set all matrix elements "a" - "f"

java.awt.geom.AffineT toTransform()
ransform
Create an java.awt.geom.AffineTransform that corresponds to this.

float[] transform(float[] v)
Transform a vector v using this.

void translate(float[] v)
Concatenate this transformation with a translation transformation.

void translate(float x, float y)


Concatenate this transformation with a translation transformation.

Fields
MATRIX_0
public static float MATRIX_0

Static information needed for rotation: rotate 0 degress (identity matrix)

MATRIX_90
public static float MATRIX_90

Static information needed for rotation: rotate 90 degrees

MATRIX_180
public static float MATRIX_180

Page 80 of 1521
de.intarsys.pdf.cds.CDSMatrix

(continued from last page)

Static information needed for rotation: rotate 180 degrees

MATRIX_270
public static float MATRIX_270

Static information needed for rotation: rotate 270 degrees

Constructors
CDSMatrix
public CDSMatrix()

CDSMatrix constructor.

Create a new identity matrix

CDSMatrix
public CDSMatrix(float[] data)

Create a CDSMatrix based on the array in the parameter. The array must have 6 elements.

Parameters:
data - The array defining the matrix.

Methods
createFromCOS
public static CDSMatrix createFromCOS(COSArray array)

Create a CDSMatrix from an array holding the transformation parameters.

Parameters:
array - The base COSArray

Returns:
Create a CDSMatrix from array

invalidateCaches
public void invalidateCaches()

Invalidate all local caches as the base object may have changed.

setA
public void setA(float num)

Set the matrix element "a".

Parameters:
num - The new matrix element "a".

Page 81 of 1521
de.intarsys.pdf.cds.CDSMatrix

(continued from last page)

getA
public float getA()

Return the matrix element "a".

Returns:
The matrix element "a".

setB
public void setB(float num)

Set the matrix element "b".

Parameters:
num - The new matrix element "b".

getB
public float getB()

Return the matrix element "b".

Returns:
The matrix element "b".

setC
public void setC(float num)

Set the matrix element "c".

Parameters:
num - The new matrix element "c".

getC
public float getC()

Return the matrix element "c".

Returns:
The matrix element "c".

setD
public void setD(float num)

Set the matrix element "d".

Parameters:
num - The new matrix element "d".

getD
public float getD()

Page 82 of 1521
de.intarsys.pdf.cds.CDSMatrix

(continued from last page)

Return the matrix element "d".

Returns:
The matrix element "d".

setE
public void setE(float num)

Set the matrix element "e".

Parameters:
num - The new matrix element "e".

getE
public float getE()

Return the matrix element "e".

Returns:
The matrix element "e".

setF
public void setF(float num)

Set the matrix element "f".

Parameters:
num - The new matrix element "f".

getF
public float getF()

Return the matrix element "f".

Returns:
The matrix element "f".

setTransformation
public void setTransformation(float a,
float b,
float c,
float d,
float e,
float f)

Set all matrix elements "a" - "f"

Parameters:
a - The new matrix element "a".
b - The new matrix element "b".
c - The new matrix element "c".
d - The new matrix element "d".
e - The new matrix element "e".
f - The new matrix element "f".

Page 83 of 1521
de.intarsys.pdf.cds.CDSMatrix

setTransformation
public void setTransformation(float[] data)

Set all matrix elements "a" - "f"

Parameters:
data - The array defining the new parameters

setTransformation
public void setTransformation(java.awt.geom.AffineTransform transform)

Set all matrix elements "a" - "f"

Parameters:
transform - The matrix defining the new parameters

copy
public CDSMatrix copy()

Create a copy of the receiver

Returns:
a new copy of the receiver

rotate
public void rotate(float angle)

Concatenate this transformation with a rotation transformation.

Parameters:
angle - Rotation angle in radians

scale
public void scale(float[] v)

Concatenate this transformation with a scaling transformation.

Parameters:
v - The scale factor.

transform
public float[] transform(float[] v)

Transform a vector v using this.

Parameters:
v - The vector that will be transformed.

Returns:
The transformed vector.

Page 84 of 1521
de.intarsys.pdf.cds.CDSMatrix

translate
public void translate(float[] v)

Concatenate this transformation with a translation transformation.

Parameters:
v - The transaltion definition

translate
public void translate(float x,
float y)

Concatenate this transformation with a translation transformation.

Parameters:
x - The translation in x direction
y - The translation in y direction

toTransform
public java.awt.geom.AffineTransform toTransform()

Create an java.awt.geom.AffineTransform that corresponds to this.

Returns:
Create an java.awt.geom.AffineTransform that corresponds to this.

Page 85 of 1521
de.intarsys.pdf.cds.CDSNameTreeEntry

de.intarsys.pdf.cds
Class CDSNameTreeEntry
java.lang.Object
|
+-de.intarsys.pdf.cds.CDSTreeEntry
|
+-de.intarsys.pdf.cds.CDSNameTreeEntry

public class CDSNameTreeEntry


extends CDSTreeEntry

A helper class implementing an association object for the use in a PDF name tree.

Constructor Summary
public CDSNameTreeEntry(COSString name, COSObject value)
Create an an entry for a name tree

Method Summary
COSObject getKey()

COSString getName()
The name of the entry.

Constructors
CDSNameTreeEntry
public CDSNameTreeEntry(COSString name,
COSObject value)

Create an an entry for a name tree

Parameters:
name - The name of the entry
value - The value of the entry.

Methods
getName
public COSString getName()

The name of the entry.

Returns:
The name of the entry.

Page 86 of 1521
de.intarsys.pdf.cds.CDSNameTreeEntry

(continued from last page)

getKey
public COSObject getKey()

Page 87 of 1521
de.intarsys.pdf.cds.CDSNameTreeNode

de.intarsys.pdf.cds
Class CDSNameTreeNode
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.cds.CDSBase
|
+-de.intarsys.pdf.cds.CDSTreeNode
|
+-de.intarsys.pdf.cds.CDSNameTreeNode
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class CDSNameTreeNode


extends CDSTreeNode

Implementation of the PDF name tree.

Field Summary
public static final DK_Names

Method Summary
void addAll(CDSNameTreeNode node)
Add all children from node.

boolean contains(COSString name)


Answer true if the receiver subtree contains a key that matches the parameter.

static createFromCos(COSDictionary node)


CDSNameTreeNode
Create the correct concrete CDSTreeNode implementation for node.

static CDSTreeNode createIntermediate()

static createLeaf()
CDSNameTreeNode

static createRootIntermediate()
CDSNameTreeNode

static createRootLeaf()
CDSNameTreeNode

COSObject get(COSString name)


Answer the value associated with the key name.

java.util.List getEntries()

java.util.List getKids()

Page 88 of 1521
de.intarsys.pdf.cds.CDSNameTreeNode

COSArray getLimits()
Return the two element array containing the smallest and the largest key within the receiver
subtree.

COSString getMax()
The maximum key within the receiver subtree.

COSString getMin()
The minimum key within the receiver subtree.

boolean isLeaf()

java.util.Iterator iterator()
An java.util.Iterator on all leaf fields in the subtree.

boolean mayContain(COSString name)


Answer true if the receiver MAY contain the key name.

COSObject put(COSString name, COSObject value)


Store value under the key given in name.

COSObject remove(COSString name)


Remove the mapping for key given in name.

Fields
DK_Names
public static final de.intarsys.pdf.cos.COSName DK_Names

Methods
createFromCos
public static CDSNameTreeNode createFromCos(COSDictionary node)

Create the correct concrete CDSTreeNode implementation for node.

Parameters:
node - The COSDictionary defining a CDSTreeNode subclass instance

Returns:
The concrete CDSTreeNode implementation for node.

createRootIntermediate
public static CDSNameTreeNode createRootIntermediate()

createRootLeaf
public static CDSNameTreeNode createRootLeaf()

Page 89 of 1521
de.intarsys.pdf.cds.CDSNameTreeNode

(continued from last page)

createIntermediate
public static CDSTreeNode createIntermediate()

createLeaf
public static CDSNameTreeNode createLeaf()

getKids
public java.util.List getKids()

addAll
public void addAll(CDSNameTreeNode node)

Add all children from node.

Parameters:
node - A CDSNameTreeNode whose children are copied.

contains
public boolean contains(COSString name)

Answer true if the receiver subtree contains a key that matches the parameter.

Parameters:
name - The key that is searched in the receiver subtree.

Returns:
Answer true if the receiver subtree contains a key that matches the parameter.

get
public COSObject get(COSString name)

Answer the value associated with the key name. If no key is available that matches the parameter, COSNull is returned.

Parameters:
name - The key whose value is looked up.

Returns:
Answer the value associated with the key name.

getLimits
public COSArray getLimits()

Return the two element array containing the smallest and the largest key within the receiver subtree.

Page 90 of 1521
de.intarsys.pdf.cds.CDSNameTreeNode

(continued from last page)

Returns:
Return the two element array containing the smallest and the largest key within the receiver subtree.

getMax
public COSString getMax()

The maximum key within the receiver subtree.

Returns:
The maximum key within the receiver subtree.

getMin
public COSString getMin()

The minimum key within the receiver subtree.

Returns:
The minimum key within the receiver subtree.

iterator
public java.util.Iterator iterator()

An java.util.Iterator on all leaf fields in the subtree.

Returns:
An java.util.Iterator on all leaf fields in the subtree.

mayContain
public boolean mayContain(COSString name)

Answer true if the receiver MAY contain the key name.

Thi means, name lies between the range defined by the lower und upper limit key of the receiver.

Parameters:
name - The key name to lookup.

Returns:
Answer true if the receiver MAY contain the key name.

put
public COSObject put(COSString name,
COSObject value)

Store value under the key given in name.

Parameters:
name - The name with wich the value should be associated.
value - The value to associate with the name.

Returns:
The object previously associated with name or COSNull.

Page 91 of 1521
de.intarsys.pdf.cds.CDSNameTreeNode

remove
public COSObject remove(COSString name)

Remove the mapping for key given in name.

Parameters:
name - The name fo the mapping to be removed

Returns:
The object previously associated with name or COSNull.

isLeaf
public boolean isLeaf()

getEntries
public java.util.List getEntries()

Page 92 of 1521
de.intarsys.pdf.cds.CDSNumberTreeEntry

de.intarsys.pdf.cds
Class CDSNumberTreeEntry
java.lang.Object
|
+-de.intarsys.pdf.cds.CDSTreeEntry
|
+-de.intarsys.pdf.cds.CDSNumberTreeEntry

public class CDSNumberTreeEntry


extends CDSTreeEntry

A helper class implementing an association object for the use in a PDF number tree.

Constructor Summary
public CDSNumberTreeEntry(COSInteger number, COSObject value)
Create an an entry for a number tree

Method Summary
COSObject getKey()

COSInteger getNumber()

Constructors
CDSNumberTreeEntry
public CDSNumberTreeEntry(COSInteger number,
COSObject value)

Create an an entry for a number tree

Parameters:
number - The number of the entry
value - The value of the entry.

Methods
getNumber
public COSInteger getNumber()

getKey
public COSObject getKey()

Page 93 of 1521
de.intarsys.pdf.cds.CDSNumberTreeNode

de.intarsys.pdf.cds
Class CDSNumberTreeNode
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.cds.CDSBase
|
+-de.intarsys.pdf.cds.CDSTreeNode
|
+-de.intarsys.pdf.cds.CDSNumberTreeNode
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class CDSNumberTreeNode


extends CDSTreeNode

Implementation of the PDF number tree.

Not Yet done!!

Field Summary
public static final DK_Nums

Method Summary
boolean isLeaf()

Fields
DK_Nums
public static final de.intarsys.pdf.cos.COSName DK_Nums

Methods
isLeaf
public boolean isLeaf()

Page 94 of 1521
de.intarsys.pdf.cds.CDSRectangle

de.intarsys.pdf.cds
Class CDSRectangle
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.cds.CDSBase
|
+-de.intarsys.pdf.cds.CDSRectangle
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class CDSRectangle


extends CDSBase

The implementation of the pdf rectangle data type.

The specification of the data type is found in [PDF} chapter 3.8.3.

A rectangle is defined by
[llx, lly, urx, ury ]
where
llx = lower left x coordinate
lly = lower left y coordinate
urx = upper right x coordinate
ury = upper right y coordinate

urx
|
v
+-----+ <-ury
| |
lly -> +-----+
ˆ
|
llx

An application should be prepared to get any two diagonally opposite corners in the rectangle specification. Use "normalize()" to
ensure a rectangle that conforms to the above picture.

Field Summary
public static final SIZE_A4

Constructor Summary

Page 95 of 1521
de.intarsys.pdf.cds.CDSRectangle

public CDSRectangle()
CDTRectangle constructor comment.

public CDSRectangle(float llx, float lly, float urx, float ury)


CDTRectangle constructor.

public CDSRectangle(float[] rectArray)


CDTRectangle constructor.

public CDSRectangle(java.awt.geom.Rectangle2D rect)

Method Summary
boolean contains(double x, double y)
true if x/y lies within this.

boolean contains(double x, double y, double epsilon)


true if x/y lies within this, with a "uncertainty" of epsilon.

CDSRectangle copy()
Create a copy of the receiver

static CDSRectangle createFromCOS(COSArray array)


Create a CDSRectangle from an array holding the rectangle coordinates.

float getHeight()
Return the height (an absolute value) of the rectangle.

float getLowerLeftX()
The lower left x coordinate.

float getLowerLeftY()
The lower left y coordinate.

float getUpperRightX()
The upper right x coordinate.

float getUpperRightY()
The upper rigth y coordinate.

float getWidth()
Get the width (an absolute value) of the rectangle.

void invalidateCaches()

void move(float dx, float dy)


Move the rectangle by a relative offset.

CDSRectangle moveTo(float x, float y)


Move the rectangle to a new absolute position.

CDSRectangle normalize()
Adjust the corner coordinates so that lower left is really in the lower left (this means returns
the smallest coordinate values).

void resize(float dx, float dy)


Resize the rectangle by moving the upper right corner.

Page 96 of 1521
de.intarsys.pdf.cds.CDSRectangle

void resizeTo(float width, float height)


Resize the rectangle to a new width and heigth.

void setCorners(float llx, float lly, float urx, float ury)


Set the corners of this.

void setHeight(float height)


Set the height of this.

void setLowerLeftX(float num)


Set the lower left x coordinate.

void setLowerLeftY(float num)


Set the lower left y coordinate.

void setUpperRightX(float num)


Set the upper right x coordinate.

void setUpperRightY(float num)


Set the upper right y coordinate.

void setWidth(float width)


Set the width of this.

java.awt.geom.Rectang toNormalizedRectangle()
le2D
Construct a java.awt.geom.Rectangle2D object from the receiver.

java.awt.geom.Rectang toRectangle()
le2D
Construct a java.awt.geom.Rectangle2D object from the receiver.

Fields
SIZE_A4
public static final float SIZE_A4

Constructors
CDSRectangle
public CDSRectangle()

CDTRectangle constructor comment.

CDSRectangle
public CDSRectangle(float llx,
float lly,
float urx,
float ury)

CDTRectangle constructor. Create a new rectangle with given size.

Parameters:
llx - the lower left x

Page 97 of 1521
de.intarsys.pdf.cds.CDSRectangle

(continued from last page)

lly - the lower left y


urx - the upper right x
ury - the upper right y

CDSRectangle
public CDSRectangle(float[] rectArray)

CDTRectangle constructor. Create a new rectangle with given array. The array must have 4 elements of type float.

Parameters:
rectArray - A four dimensional array defining llx,lly, urx, ury.

See Also:
CDSRectangle(float, float, float, float)

CDSRectangle
public CDSRectangle(java.awt.geom.Rectangle2D rect)

Methods
createFromCOS
public static CDSRectangle createFromCOS(COSArray array)

Create a CDSRectangle from an array holding the rectangle coordinates.

Parameters:
array - The base COSArray

Returns:
Create a CDSRectangle from array

contains
public boolean contains(double x,
double y)

true if x/y lies within this.

Parameters:
x - x coordinate to be checked.
y - y coordinate to be checked.

Returns:
true if x/y lies within this.

contains
public boolean contains(double x,
double y,
double epsilon)

true if x/y lies within this, with a "uncertainty" of epsilon.

Parameters:

Page 98 of 1521
de.intarsys.pdf.cds.CDSRectangle

(continued from last page)

x - x coordinate to be checked.
y - y coordinate to be checked.
epsilon - The allowed range of uncertainty

Returns:
true if x/y lies within this.

copy
public CDSRectangle copy()

Create a copy of the receiver

Returns:
a new copy of the receiver

getHeight
public float getHeight()

Return the height (an absolute value) of the rectangle.

Returns:
Return the height (an absolute value) of the rectangle.

getLowerLeftX
public float getLowerLeftX()

The lower left x coordinate.

Returns:
The lower left x coordinate.

getLowerLeftY
public float getLowerLeftY()

The lower left y coordinate.

Returns:
The lower left y coordinate.

getUpperRightX
public float getUpperRightX()

The upper right x coordinate.

Returns:
The upper right x coordinate.

getUpperRightY
public float getUpperRightY()

The upper rigth y coordinate.

Page 99 of 1521
de.intarsys.pdf.cds.CDSRectangle

(continued from last page)

Returns:
The upper right y coordinate.

getWidth
public float getWidth()

Get the width (an absolute value) of the rectangle.

Returns:
Get the width (an absolute value) of the rectangle.

invalidateCaches
public void invalidateCaches()

Invalidate all local caches as the base object may have changed.

move
public void move(float dx,
float dy)

Move the rectangle by a relative offset. The relationship of the opposite corners is preserved by this method.

Parameters:
dx - The offset by wich we move in x direction.
dy - The offset by wich we move in y direction.

moveTo
public CDSRectangle moveTo(float x,
float y)

Move the rectangle to a new absolute position. The relationship of the opposite corners is preserved by this method. The
receiver is modified.

Parameters:
x - The new x position of the lower left corner.
y - The new y position of the lower left corner.

Returns:
this

normalize
public CDSRectangle normalize()

Adjust the corner coordinates so that lower left is really in the lower left (this means returns the smallest coordinate
values).

This method changes this in place!

Returns:
this

Page 100 of 1521


de.intarsys.pdf.cds.CDSRectangle

(continued from last page)

resize
public void resize(float dx,
float dy)

Resize the rectangle by moving the upper right corner.

Parameters:
dx - The distance we move the upper right x coordinate.
dy - The distance we move the upper right y coordinate.

resizeTo
public void resizeTo(float width,
float height)

Resize the rectangle to a new width and heigth. The new width and heigth are defined relative to the lower left corner as
signed values.

Parameters:
width - The new width of the rectangle.
height - The new height of the rectangle.

setCorners
public void setCorners(float llx,
float lly,
float urx,
float ury)

Set the corners of this.

Parameters:
llx - The lower left x coordinate
lly - The lower left y coordinate
urx - The upper right x coordinate
ury - The upper right y coordinate

setHeight
public void setHeight(float height)

Set the height of this.

Parameters:
height - THe new height

setLowerLeftX
public void setLowerLeftX(float num)

Set the lower left x coordinate.

Parameters:
num - The lower left x coordinate.

setLowerLeftY
public void setLowerLeftY(float num)

Page 101 of 1521


de.intarsys.pdf.cds.CDSRectangle

(continued from last page)

Set the lower left y coordinate.

Parameters:
num - The lower left y coordinate.

setUpperRightX
public void setUpperRightX(float num)

Set the upper right x coordinate.

Parameters:
num - The upper right x coordinate.

setUpperRightY
public void setUpperRightY(float num)

Set the upper right y coordinate.

Parameters:
num - The upper right y coordinate.

setWidth
public void setWidth(float width)

Set the width of this.

Parameters:
width - The new width.

toNormalizedRectangle
public java.awt.geom.Rectangle2D toNormalizedRectangle()

Construct a java.awt.geom.Rectangle2D object from the receiver. The rectangle will be normalized before
construction.

Returns:
The Rectangle2D created from the receiver.

toRectangle
public java.awt.geom.Rectangle2D toRectangle()

Construct a java.awt.geom.Rectangle2D object from the receiver. The resulting rectangle is not normalized, that
means it may return a negative width or height.

Returns:
The Rectangle2D created from the receiver.

Page 102 of 1521


de.intarsys.pdf.cds.CDSTreeEntry

de.intarsys.pdf.cds
Class CDSTreeEntry
java.lang.Object
|
+-de.intarsys.pdf.cds.CDSTreeEntry
Direct Known Subclasses:
CDSNameTreeEntry, CDSNumberTreeEntry

public abstract class CDSTreeEntry


extends Object

Abstract superclass for implementing entry objects in PDF name and number trees.

Constructor Summary
public CDSTreeEntry(COSObject value)

Method Summary
abstract COSObject getKey()

COSObject getValue()
The value of the entry.

COSObject setValue(COSObject object)


Set the value for entry.

Constructors
CDSTreeEntry
public CDSTreeEntry(COSObject value)

Methods
setValue
public COSObject setValue(COSObject object)

Set the value for entry.

Parameters:
object - The new value for the entry.

Returns:
The previous value

Page 103 of 1521


de.intarsys.pdf.cds.CDSTreeEntry

getValue
public COSObject getValue()

The value of the entry.

Returns:
The value of the entry.

getKey
public abstract COSObject getKey()

Page 104 of 1521


de.intarsys.pdf.cds.CDSTreeNode

de.intarsys.pdf.cds
Class CDSTreeNode
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.cds.CDSBase
|
+-de.intarsys.pdf.cds.CDSTreeNode
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


CDSNameTreeNode, CDSNumberTreeNode

public abstract class CDSTreeNode


extends CDSBase

Abstract superclass for implementing name and number trees.

Field Summary
public static final DK_Kids
common names

public static final DK_Limits

Constructor Summary
public CDSTreeNode(COSObject object)

Method Summary
boolean isIntermediate()

abstract boolean isLeaf()

Fields
DK_Kids
public static final de.intarsys.pdf.cos.COSName DK_Kids

common names

DK_Limits
public static final de.intarsys.pdf.cos.COSName DK_Limits

Page 105 of 1521


de.intarsys.pdf.cds.CDSTreeNode

(continued from last page)

Constructors
CDSTreeNode
public CDSTreeNode(COSObject object)

Methods
isIntermediate
public boolean isIntermediate()

isLeaf
public abstract boolean isLeaf()

Page 106 of 1521


Package
de.intarsys.pdf.content
The "content" package contains functionality to work on PDF content streams. Content streams are the PDF way of expressing
page or form visual content, expressed using the PDF content stream operators.

Content streams define a page or form content, implemented using COSStreams with a specific format. The stream data is built
using a sequence of content stream operators. The stream dictionary additionally contains resources referenced by these operators.

This package contains higher level abstractions of the COSStream representing a content stream, CSContent, CSOperation and
CSOperator.

A list of all known CSOperators is provided with CSOperators.

A framework for interpreting content streams is provided with ICSInterpreter and ICSDevice.

Page 107 of 1521


de.intarsys.pdf.content.CSContent

de.intarsys.pdf.content
Class CSContent
java.lang.Object
|
+-de.intarsys.pdf.content.CSContent

public class CSContent


extends Object

Represents the tokenized content of a PDF rendering program which is called a "content stream".

A PDF rendering program is a sequence of operations, each build by a list of operands followed by the operator.

Any visual appearance in a PDF document is build on a content stream. For example a PDPage hosts a content stream (or a list of
content streams) to define its appearance.

A content stream has no access to indirect objects, this means object references are not valid operands for operations. Complex
objects are used within a content stream via an indirection defined in a resource dictionary.

The CSContent itself is decoupled from its source of creation, this means after manipulating the content stream you have to apply
it where you want to (for example adding it to a page).

You can work on the content stream directly, adding and removing operations. A more elegant way to manipulate this is using a
CSCreator, providing high level methods for the different content stream operations.

Method Summary
void addMarkedContent(COSName mark, byte[] content)
Add "content" at the end of the "marked content" portion in the content stream of this.

void addOperation(CSOperation op)


Add another operation to the rendering program.

void addOperation(int index, CSOperation op)


Add another operation to the rendering program.

static CSContent createFromBytes(byte[] data)


Create CSContent from a byte array containing a PDF content stream.

static CSContent createFromCos(COSArray streams)


Create CSContent from an array of COSStream, together defining a PDF content stream.

static CSContent createFromCos(COSStream stream)


Create CSContent from a COSStream containing a PDF content stream.

static CSContent createNew()


Create a new CSContent.

COSStream createStream()

CSOperation getLastOperation()
remove last operation from the rendering program.

CSOperation getOperation(int index)

Page 108 of 1521


de.intarsys.pdf.content.CSContent

CSOperation[] getOperations()

void removeLastOperation()
remove last operation from the rendering program.

void removeOperation(int index)

void setMarkedContent(COSName mark, byte[] content)


Set the "marked content" portion in the content stream of this.

int size()
The number of operations in the content stream.

byte[] toByteArray()
Create the byte representation from the list of operations.

String toString()

Methods
createFromBytes
public static CSContent createFromBytes(byte[] data)

Create CSContent from a byte array containing a PDF content stream.

Parameters:
data - The bytes defining the PDF content stream.

Returns:
The new CSContent

createFromCos
public static CSContent createFromCos(COSStream stream)

Create CSContent from a COSStream containing a PDF content stream.

Parameters:
stream - The stream defining containing the PDF content stream.

Returns:
The new CSContent

createFromCos
public static CSContent createFromCos(COSArray streams)

Create CSContent from an array of COSStream, together defining a PDF content stream.

Parameters:
streams - An array of COSStream objects containing each a chunk of the content stream.

Returns:
The new CSContent.

Page 109 of 1521


de.intarsys.pdf.content.CSContent

createNew
public static CSContent createNew()

Create a new CSContent.

Returns:
The new CSContent.

getLastOperation
public CSOperation getLastOperation()

remove last operation from the rendering program.

Returns:
the last operation, or null of no operations left

setMarkedContent
public void setMarkedContent(COSName mark,
byte[] content)

Set the "marked content" portion in the content stream of this. Marked content is enclosed between "BMC" and "EMC", the
begin operation has an operand identifying the type of marked content.

The portion between the marks is replaced with content.If no marks are found, the new content is appended as a marked
content section.

Parameters:
mark - The type of marked content we search
content - The content we want to use.

addMarkedContent
public void addMarkedContent(COSName mark,
byte[] content)

Add "content" at the end of the "marked content" portion in the content stream of this.

Parameters:
mark - The type of marked content we search
content - The content we want to use.

addOperation
public void addOperation(CSOperation op)

Add another operation to the rendering program.

Parameters:
op - The new operation to append.

addOperation
public void addOperation(int index,
CSOperation op)

Add another operation to the rendering program.

Page 110 of 1521


de.intarsys.pdf.content.CSContent

(continued from last page)

Parameters:
op - The new operation to append.

removeOperation
public void removeOperation(int index)

getOperations
public CSOperation[] getOperations()

getOperation
public CSOperation getOperation(int index)

createStream
public COSStream createStream()

removeLastOperation
public void removeLastOperation()

remove last operation from the rendering program.

size
public int size()

The number of operations in the content stream.

Returns:
The number of operations in the content stream.

toByteArray
public byte[] toByteArray()

Create the byte representation from the list of operations.

Returns:
The byte representation from the list of operations.

toString
public String toString()

Page 111 of 1521


de.intarsys.pdf.content.CSDeviceAdapter

de.intarsys.pdf.content
Class CSDeviceAdapter
java.lang.Object
|
+-de.intarsys.pdf.content.CSDeviceAdapter
All Implemented Interfaces:
ICSDevice

Direct Known Subclasses:


CSShapeDevice, CSVirtualDevice

public abstract class CSDeviceAdapter


extends Object
implements ICSDevice

An adapter implementation for ICSDevice. This can be used as a simple superclass for implementing PDF content stream aware
devices.

Field Summary
public static MAX_STACK_SIZE
the maximum number of nested states

Constructor Summary
public CSDeviceAdapter()
Create a new CSDeviceAdapter

Method Summary
void close()

void compatibilityBegin()

void compatibilityEnd()

void doShading(COSName name, PDShading shading)

void doXObject(COSName name, PDXObject xobject)

ICSGraphicsState getGraphicsState()

ICSInterpreter getInterpreter()

void inlineImage(PDImage img)

void markedContentBegin(COSName tag)

Page 112 of 1521


de.intarsys.pdf.content.CSDeviceAdapter

void markedContentBeginProperties(COSName tag, COSName resourceName,


COSDictionary properties)

void markedContentEnd()

void markedContentPoint(COSName tag)

void markedContentPointProperties(COSName tag, COSName resourceName,


COSDictionary properties)

void open(ICSInterpreter pInterpreter)

void pathClipEvenOdd()

void pathClipNonZero()

void pathClose()

void pathCloseFillStrokeEvenOdd()

void pathCloseFillStrokeNonZero()

void pathCloseStroke()

void pathEnd()

void pathFillEvenOdd()

void pathFillNonZero()

void pathFillStrokeEvenOdd()

void pathFillStrokeNonZero()

void pathStroke()

void penCurveToC(float x1, float y1, float x2, float y2, float x3, float y3)

void penCurveToV(float x2, float y2, float x3, float y3)

void penCurveToY(float x1, float y1, float x3, float y3)

void penLineTo(float x, float y)

void penMoveTo(float x, float y)

void penRectangle(float x, float y, float w, float h)

Page 113 of 1521


de.intarsys.pdf.content.CSDeviceAdapter

void restoreState()

void saveState()

void setExtendedState(COSName name, PDExtGState gstate)

void setFlatnessTolerance(float flatness)

void setLineCap(int capStyle)

void setLineDash(float[] pattern, float phase)

void setLineJoin(int joinStyle)

void setLineWidth(float lineWidth)

void setMiterLimit(float miterLimit)

void setNonStrokeColorCMYK(float c, float m, float y, float k)

void setNonStrokeColorGray(float gray)

void setNonStrokeColorRGB(float r, float g, float b)

void setNonStrokeColorSpace(COSName name, PDColorSpace colorSpace)

void setNonStrokeColorValues(float[] values)

void setNonStrokeColorValues(float[] values, COSName name, PDPattern


pattern)

void setRenderingIntent(COSName intent)

void setStrokeColorCMYK(float c, float m, float y, float k)

void setStrokeColorGray(float gray)

void setStrokeColorRGB(float r, float g, float b)

void setStrokeColorSpace(COSName name, PDColorSpace colorSpace)

void setStrokeColorValues(float[] values)

void setStrokeColorValues(float[] values, COSName name, PDPattern pattern)

void textBegin()

void textEnd()

Page 114 of 1521


de.intarsys.pdf.content.CSDeviceAdapter

void textLineMove(float dex, float dy)

void textLineNew()

void textMove(float dx, float dy)

void textMoveTo(float x, float y)

void textSetCharSpacing(float charSpacing)

void textSetFont(COSName name, PDFont font, float size)

void textSetHorizontalScaling(float scaling)

void textSetLeading(float leading)

void textSetRenderingMode(int renderingMode)

void textSetRise(float rise)

void textSetTransform(float a, float b, float c, float d, float e, float f)

void textSetWordSpacing(float wordSpacing)

void textShow(byte[] text, int offset, int length)

void textShow(String text)

void textT3SetGlyphWidth(float x, float y)

void textT3SetGlyphWidthBB(float x, float y, float llx, float lly, float


urx, float ury)

void transform(float a, float b, float c, float d, float e, float f)

Fields
MAX_STACK_SIZE
public static int MAX_STACK_SIZE

the maximum number of nested states

Constructors
CSDeviceAdapter
public CSDeviceAdapter()

Page 115 of 1521


de.intarsys.pdf.content.CSDeviceAdapter

(continued from last page)

Create a new CSDeviceAdapter

Methods
close
public void close()

compatibilityBegin
public void compatibilityBegin()

compatibilityEnd
public void compatibilityEnd()

doShading
public void doShading(COSName name,
PDShading shading)

doXObject
public void doXObject(COSName name,
PDXObject xobject)

getInterpreter
public ICSInterpreter getInterpreter()

inlineImage
public void inlineImage(PDImage img)

markedContentBegin
public void markedContentBegin(COSName tag)

Page 116 of 1521


de.intarsys.pdf.content.CSDeviceAdapter

(continued from last page)

markedContentBeginProperties
public void markedContentBeginProperties(COSName tag,
COSName resourceName,
COSDictionary properties)

markedContentEnd
public void markedContentEnd()

markedContentPoint
public void markedContentPoint(COSName tag)

markedContentPointProperties
public void markedContentPointProperties(COSName tag,
COSName resourceName,
COSDictionary properties)

open
public void open(ICSInterpreter pInterpreter)

pathClipEvenOdd
public void pathClipEvenOdd()

pathClipNonZero
public void pathClipNonZero()

pathClose
public void pathClose()

pathCloseFillStrokeEvenOdd
public void pathCloseFillStrokeEvenOdd()

Page 117 of 1521


de.intarsys.pdf.content.CSDeviceAdapter

(continued from last page)

pathCloseFillStrokeNonZero
public void pathCloseFillStrokeNonZero()

pathCloseStroke
public void pathCloseStroke()

pathEnd
public void pathEnd()

pathFillEvenOdd
public void pathFillEvenOdd()

pathFillNonZero
public void pathFillNonZero()

pathFillStrokeEvenOdd
public void pathFillStrokeEvenOdd()

pathFillStrokeNonZero
public void pathFillStrokeNonZero()

pathStroke
public void pathStroke()

penCurveToC
public void penCurveToC(float x1,
float y1,
float x2,
float y2,
float x3,
float y3)

Page 118 of 1521


de.intarsys.pdf.content.CSDeviceAdapter

penCurveToV
public void penCurveToV(float x2,
float y2,
float x3,
float y3)

penCurveToY
public void penCurveToY(float x1,
float y1,
float x3,
float y3)

penLineTo
public void penLineTo(float x,
float y)

penMoveTo
public void penMoveTo(float x,
float y)

penRectangle
public void penRectangle(float x,
float y,
float w,
float h)

restoreState
public void restoreState()

saveState
public void saveState()

setExtendedState
public void setExtendedState(COSName name,
PDExtGState gstate)

Page 119 of 1521


de.intarsys.pdf.content.CSDeviceAdapter

setFlatnessTolerance
public void setFlatnessTolerance(float flatness)

setLineCap
public void setLineCap(int capStyle)

setLineDash
public void setLineDash(float[] pattern,
float phase)

setLineJoin
public void setLineJoin(int joinStyle)

setLineWidth
public void setLineWidth(float lineWidth)

setMiterLimit
public void setMiterLimit(float miterLimit)

setNonStrokeColorCMYK
public void setNonStrokeColorCMYK(float c,
float m,
float y,
float k)

setNonStrokeColorGray
public void setNonStrokeColorGray(float gray)

setNonStrokeColorRGB
public void setNonStrokeColorRGB(float r,
float g,
float b)

Page 120 of 1521


de.intarsys.pdf.content.CSDeviceAdapter

(continued from last page)

setNonStrokeColorSpace
public void setNonStrokeColorSpace(COSName name,
PDColorSpace colorSpace)

setNonStrokeColorValues
public void setNonStrokeColorValues(float[] values)

setNonStrokeColorValues
public void setNonStrokeColorValues(float[] values,
COSName name,
PDPattern pattern)

setRenderingIntent
public void setRenderingIntent(COSName intent)

setStrokeColorCMYK
public void setStrokeColorCMYK(float c,
float m,
float y,
float k)

setStrokeColorGray
public void setStrokeColorGray(float gray)

setStrokeColorRGB
public void setStrokeColorRGB(float r,
float g,
float b)

setStrokeColorSpace
public void setStrokeColorSpace(COSName name,
PDColorSpace colorSpace)

Page 121 of 1521


de.intarsys.pdf.content.CSDeviceAdapter

(continued from last page)

setStrokeColorValues
public void setStrokeColorValues(float[] values)

setStrokeColorValues
public void setStrokeColorValues(float[] values,
COSName name,
PDPattern pattern)

textBegin
public void textBegin()

textEnd
public void textEnd()

textLineMove
public void textLineMove(float dex,
float dy)

textLineNew
public void textLineNew()

textMove
public void textMove(float dx,
float dy)

textMoveTo
public void textMoveTo(float x,
float y)

textSetCharSpacing
public void textSetCharSpacing(float charSpacing)

Page 122 of 1521


de.intarsys.pdf.content.CSDeviceAdapter

textSetFont
public void textSetFont(COSName name,
PDFont font,
float size)

textSetHorizontalScaling
public void textSetHorizontalScaling(float scaling)

textSetLeading
public void textSetLeading(float leading)

textSetRenderingMode
public void textSetRenderingMode(int renderingMode)

textSetRise
public void textSetRise(float rise)

textSetTransform
public void textSetTransform(float a,
float b,
float c,
float d,
float e,
float f)

textSetWordSpacing
public void textSetWordSpacing(float wordSpacing)

textShow
public void textShow(byte[] text,
int offset,
int length)

Page 123 of 1521


de.intarsys.pdf.content.CSDeviceAdapter

(continued from last page)

textShow
public void textShow(String text)

textT3SetGlyphWidth
public void textT3SetGlyphWidth(float x,
float y)

textT3SetGlyphWidthBB
public void textT3SetGlyphWidthBB(float x,
float y,
float llx,
float lly,
float urx,
float ury)

transform
public void transform(float a,
float b,
float c,
float d,
float e,
float f)

getGraphicsState
public ICSGraphicsState getGraphicsState()

Page 124 of 1521


de.intarsys.pdf.content.CSDeviceBasedInterpreter

de.intarsys.pdf.content
Class CSDeviceBasedInterpreter
java.lang.Object
|
+-de.intarsys.pdf.content.CSInterpreter
|
+-de.intarsys.pdf.content.CSDeviceBasedInterpreter
All Implemented Interfaces:
ICSInterpreter

public class CSDeviceBasedInterpreter


extends CSInterpreter

A content stream interpreter for PDF graphics primitives that delegates execution to an ICSDevice object.

Constructor Summary
public CSDeviceBasedInterpreter(java.util.Map paramOptions, ICSDevice device)

Method Summary
ICSDevice getDevice()
The ICSDevice currently associated with the interpreter.

void process(CSContent pContent, PDResources resourceDict)

Constructors
CSDeviceBasedInterpreter
public CSDeviceBasedInterpreter(java.util.Map paramOptions,
ICSDevice device)

Methods
getDevice
public ICSDevice getDevice()

The ICSDevice currently associated with the interpreter.

Returns:
The ICSDevice currently associated with the interpreter.

Page 125 of 1521


de.intarsys.pdf.content.CSDeviceBasedInterpreter

(continued from last page)

process
public void process(CSContent pContent,
PDResources resourceDict)
throws CSException

Page 126 of 1521


de.intarsys.pdf.content.CSError

de.intarsys.pdf.content
Class CSError
java.lang.Object
|
+-java.lang.Throwable
|
+-java.lang.Exception
|
+-java.lang.RuntimeException
|
+-de.intarsys.pdf.content.CSException
|
+-de.intarsys.pdf.content.CSError
All Implemented Interfaces:
java.io.Serializable

public class CSError


extends CSException

An error while procssing a content stream.

Constructor Summary
public CSError(String message)

public CSError(String message, Throwable cause)

public CSError()

public CSError(Throwable cause)

Constructors
CSError
public CSError(String message)

CSError
public CSError(String message,
Throwable cause)

CSError
public CSError()

Page 127 of 1521


de.intarsys.pdf.content.CSError

CSError
public CSError(Throwable cause)

Page 128 of 1521


de.intarsys.pdf.content.CSException

de.intarsys.pdf.content
Class CSException
java.lang.Object
|
+-java.lang.Throwable
|
+-java.lang.Exception
|
+-java.lang.RuntimeException
|
+-de.intarsys.pdf.content.CSException
All Implemented Interfaces:
java.io.Serializable

Direct Known Subclasses:


CSError, CSWarning

public abstract class CSException


extends RuntimeException

An exceptional condition encountered while procesing a content streams operations.

Constructor Summary
public CSException(String message)

public CSException(String message, Throwable cause)

public CSException()

public CSException(Throwable cause)

Constructors
CSException
public CSException(String message)

CSException
public CSException(String message,
Throwable cause)

CSException
public CSException()

Page 129 of 1521


de.intarsys.pdf.content.CSException

(continued from last page)

CSException
public CSException(Throwable cause)

Page 130 of 1521


de.intarsys.pdf.content.CSInterpreter

de.intarsys.pdf.content
Class CSInterpreter
java.lang.Object
|
+-de.intarsys.pdf.content.CSInterpreter
All Implemented Interfaces:
ICSInterpreter

Direct Known Subclasses:


CSDeviceBasedInterpreter

public abstract class CSInterpreter


extends Object
implements ICSInterpreter

An abstrct superclass for implementing an interpreter for PDF content streams.

Constructor Summary
public CSInterpreter(java.util.Map paramOptions)

Method Summary
ICSExceptionHandler getExceptionHandler()

java.util.Map getOptions()

void process(CSContent pContent, PDResources pResources)

void setExceptionHandler(ICSExceptionHandler errorHandler)

Constructors
CSInterpreter
public CSInterpreter(java.util.Map paramOptions)

Methods
getExceptionHandler
public ICSExceptionHandler getExceptionHandler()

Page 131 of 1521


de.intarsys.pdf.content.CSInterpreter

(continued from last page)

getOptions
public java.util.Map getOptions()

process
public void process(CSContent pContent,
PDResources pResources)
throws CSException

setExceptionHandler
public void setExceptionHandler(ICSExceptionHandler errorHandler)

Page 132 of 1521


de.intarsys.pdf.content.CSInterpreterFrame

de.intarsys.pdf.content
Class CSInterpreterFrame
java.lang.Object
|
+-de.intarsys.pdf.content.CSInterpreterFrame

public class CSInterpreterFrame


extends Object

The context frame of a CSInterpreter holding the "process" stack frame information.

Constructor Summary
public CSInterpreterFrame()

Constructors
CSInterpreterFrame
public CSInterpreterFrame()

Page 133 of 1521


de.intarsys.pdf.content.CSLiteral

de.intarsys.pdf.content
Class CSLiteral
java.lang.Object
|
+-de.intarsys.pdf.content.CSOperation
|
+-de.intarsys.pdf.content.CSLiteral

public class CSLiteral


extends CSOperation

An "operation" that is not parsed but completely given in a byte sequence.

Constructor Summary
public CSLiteral(byte[] literal)

Constructors
CSLiteral
public CSLiteral(byte[] literal)

Page 134 of 1521


de.intarsys.pdf.content.CSNotSupported

de.intarsys.pdf.content
Class CSNotSupported
java.lang.Object
|
+-java.lang.Throwable
|
+-java.lang.Exception
|
+-java.lang.RuntimeException
|
+-de.intarsys.pdf.content.CSException
|
+-de.intarsys.pdf.content.CSWarning
|
+-de.intarsys.pdf.content.CSNotSupported
All Implemented Interfaces:
java.io.Serializable

public class CSNotSupported


extends CSWarning

A unsupported operation has been found in a content stream.

Constructor Summary
public CSNotSupported(String message, Throwable cause)

public CSNotSupported(String message)

Constructors
CSNotSupported
public CSNotSupported(String message,
Throwable cause)

CSNotSupported
public CSNotSupported(String message)

Page 135 of 1521


de.intarsys.pdf.content.CSOperation

de.intarsys.pdf.content
Class CSOperation
java.lang.Object
|
+-de.intarsys.pdf.content.CSOperation
Direct Known Subclasses:
CSLiteral

public class CSOperation


extends Object

Represents the operations that make up a content stream.

The content stream is a sequence of operations, with any operation beeing a list of operands followed by the operator.

Field Summary
public static final OPERAND_Tx

Constructor Summary
public CSOperation(CSOperator operator)

public CSOperation(CSOperator operator, COSObject[] operands)

public CSOperation(byte[] operatorToken, COSObject[] operands)

Method Summary
void addOperand(COSObject object)
Add an operand at the end of the current operand list.

COSObject getOperand(int i)
The operand at index i.

java.util.Iterator getOperands()
The iterator over all operands.

CSOperator getOperator()
The operator of the operation.

byte[] getOperatorToken()

boolean hasOperator()
Answer true if an operator is already defined.

boolean isOpBeginMarkedContent(COSName mark)


true if this is a "begin marked content" operation with the operand mark (or any operation
when mark is null).

Page 136 of 1521


de.intarsys.pdf.content.CSOperation

boolean isOpEndMarkedContent()
true if this is a "end marked content" operation.

boolean matchesOperator(CSOperator other)


Answer true if this operator's name matches the token other.

int operandSize()
Answer the number of operands.

COSObject setOperand(int i, COSObject object)


Set operand at index i to objec.

String toString()

Fields
OPERAND_Tx
public static final de.intarsys.pdf.cos.COSName OPERAND_Tx

Constructors
CSOperation
public CSOperation(CSOperator operator)

CSOperation
public CSOperation(CSOperator operator,
COSObject[] operands)

CSOperation
public CSOperation(byte[] operatorToken,
COSObject[] operands)

Methods
isOpBeginMarkedContent
public boolean isOpBeginMarkedContent(COSName mark)

true if this is a "begin marked content" operation with the operand mark (or any operation when mark is null).

Parameters:
mark - The requested operand to the operation.

Returns:

Page 137 of 1521


de.intarsys.pdf.content.CSOperation

(continued from last page)

true if this is a "begin marked content" operation with the operand mark.

isOpEndMarkedContent
public boolean isOpEndMarkedContent()

true if this is a "end marked content" operation.

Returns:
true if this is a "end marked content" operation

getOperand
public COSObject getOperand(int i)

The operand at index i.

Parameters:
i - The index of the perand in the operand's list.

Returns:
The operand at index i.

setOperand
public COSObject setOperand(int i,
COSObject object)

Set operand at index i to objec.

Parameters:
i - The index of the perand in the operand's list.
object - the operand object

Returns:
The previous operand at index i.

getOperands
public java.util.Iterator getOperands()

The iterator over all operands.

Returns:
The iterator over all operands.

getOperator
public CSOperator getOperator()

The operator of the operation.

Returns:
The operator of the operation.

getOperatorToken
public byte[] getOperatorToken()

Page 138 of 1521


de.intarsys.pdf.content.CSOperation

(continued from last page)

addOperand
public void addOperand(COSObject object)

Add an operand at the end of the current operand list.

Parameters:
object - The new operand to add.

hasOperator
public boolean hasOperator()

Answer true if an operator is already defined.

Returns:
Answer true if an operator is already defined.

matchesOperator
public boolean matchesOperator(CSOperator other)

Answer true if this operator's name matches the token other.

Parameters:
other - token to check against the operators name.

Returns:
Answer true if this operator's name matches the token other.

operandSize
public int operandSize()

Answer the number of operands.

Returns:
the number of operands.

toString
public String toString()

Page 139 of 1521


de.intarsys.pdf.content.CSOperator

de.intarsys.pdf.content
Class CSOperator
java.lang.Object
|
+-de.intarsys.pdf.content.CSOperator

public class CSOperator


extends Object

A class representing an operator of a content stream.

The content stream is a sequence of operations, with any operation beeing a list of operands followed by the operator.

Constructor Summary
public CSOperator(byte[] token)

Method Summary
static CSOperator create(String name)

boolean equals(Object o)

byte[] getToken()

int hashCode()

String toString()

Constructors
CSOperator
public CSOperator(byte[] token)

Methods
create
public static CSOperator create(String name)

getToken
public byte[] getToken()

Page 140 of 1521


de.intarsys.pdf.content.CSOperator

(continued from last page)

equals
public boolean equals(Object o)

hashCode
public int hashCode()

toString
public String toString()

Page 141 of 1521


de.intarsys.pdf.content.CSOperators

de.intarsys.pdf.content
Class CSOperators
java.lang.Object
|
+-de.intarsys.pdf.content.CSOperators

public class CSOperators


extends Object

A class enumerating the operators valid in a content stream. PDF 1.4 complete operator summary (App A)

Field Summary
public static final CSO_All

public static final CSO_b

public static final CSO_B

public static final CSO_BDC

public static final CSO_BI

public static final CSO_BMC

public static final CSO_bstar

public static final CSO_Bstar

public static final CSO_BT

public static final CSO_BX

public static final CSO_c

public static final CSO_cm

public static final CSO_cs

public static final CSO_CS

public static final CSO_d

public static final CSO_d0

public static final CSO_d1

Page 142 of 1521


de.intarsys.pdf.content.CSOperators

public static final CSO_Do

public static final CSO_DoubleQuote

public static final CSO_DP

public static final CSO_EI

public static final CSO_EMC

public static final CSO_ET

public static final CSO_EX

public static final CSO_f

public static final CSO_F

public static final CSO_fstar

public static final CSO_g

public static final CSO_G

public static final CSO_gs

public static final CSO_h

public static final CSO_i

public static final CSO_ID

public static final CSO_j

public static final CSO_J

public static final CSO_k

public static final CSO_K

public static final CSO_l

public static final CSO_m

public static final CSO_M

public static final CSO_MP

Page 143 of 1521


de.intarsys.pdf.content.CSOperators

public static final CSO_n

public static final CSO_q

public static final CSO_Q

public static final CSO_Quote

public static final CSO_re

public static final CSO_rg

public static final CSO_RG

public static final CSO_ri

public static final CSO_s

public static final CSO_S

public static final CSO_sc

public static final CSO_SC

public static final CSO_scn

public static final CSO_SCN

public static final CSO_sh

public static final CSO_Tc

public static final CSO_Td

public static final CSO_TD

public static final CSO_Tf

public static final CSO_Tj

public static final CSO_TJ

public static final CSO_TL

public static final CSO_Tm

public static final CSO_Tr

Page 144 of 1521


de.intarsys.pdf.content.CSOperators

public static final CSO_Ts

public static final CSO_Tstar

public static final CSO_Tw

public static final CSO_Tz

public static final CSO_v

public static final CSO_w

public static final CSO_W

public static final CSO_Wstar

public static final CSO_y

Method Summary
static String getDescription(CSOperator operator)

Fields
CSO_BMC
public static final de.intarsys.pdf.content.CSOperator CSO_BMC

CSO_EMC
public static final de.intarsys.pdf.content.CSOperator CSO_EMC

CSO_BT
public static final de.intarsys.pdf.content.CSOperator CSO_BT

CSO_ET
public static final de.intarsys.pdf.content.CSOperator CSO_ET

Page 145 of 1521


de.intarsys.pdf.content.CSOperators

(continued from last page)

CSO_Tf
public static final de.intarsys.pdf.content.CSOperator CSO_Tf

CSO_Tstar
public static final de.intarsys.pdf.content.CSOperator CSO_Tstar

CSO_W
public static final de.intarsys.pdf.content.CSOperator CSO_W

CSO_h
public static final de.intarsys.pdf.content.CSOperator CSO_h

CSO_bstar
public static final de.intarsys.pdf.content.CSOperator CSO_bstar

CSO_b
public static final de.intarsys.pdf.content.CSOperator CSO_b

CSO_s
public static final de.intarsys.pdf.content.CSOperator CSO_s

CSO_y
public static final de.intarsys.pdf.content.CSOperator CSO_y

CSO_v
public static final de.intarsys.pdf.content.CSOperator CSO_v

CSO_c
public static final de.intarsys.pdf.content.CSOperator CSO_c

Page 146 of 1521


de.intarsys.pdf.content.CSOperators

(continued from last page)

CSO_Wstar
public static final de.intarsys.pdf.content.CSOperator CSO_Wstar

CSO_fstar
public static final de.intarsys.pdf.content.CSOperator CSO_fstar

CSO_Bstar
public static final de.intarsys.pdf.content.CSOperator CSO_Bstar

CSO_f
public static final de.intarsys.pdf.content.CSOperator CSO_f

CSO_F
public static final de.intarsys.pdf.content.CSOperator CSO_F

CSO_B
public static final de.intarsys.pdf.content.CSOperator CSO_B

CSO_l
public static final de.intarsys.pdf.content.CSOperator CSO_l

CSO_TD
public static final de.intarsys.pdf.content.CSOperator CSO_TD

CSO_Td
public static final de.intarsys.pdf.content.CSOperator CSO_Td

Page 147 of 1521


de.intarsys.pdf.content.CSOperators

(continued from last page)

CSO_m
public static final de.intarsys.pdf.content.CSOperator CSO_m

CSO_n
public static final de.intarsys.pdf.content.CSOperator CSO_n

CSO_re
public static final de.intarsys.pdf.content.CSOperator CSO_re

CSO_Q
public static final de.intarsys.pdf.content.CSOperator CSO_Q

CSO_q
public static final de.intarsys.pdf.content.CSOperator CSO_q

CSO_Tc
public static final de.intarsys.pdf.content.CSOperator CSO_Tc

CSO_i
public static final de.intarsys.pdf.content.CSOperator CSO_i

CSO_g
public static final de.intarsys.pdf.content.CSOperator CSO_g

CSO_G
public static final de.intarsys.pdf.content.CSOperator CSO_G

CSO_Tz
public static final de.intarsys.pdf.content.CSOperator CSO_Tz

Page 148 of 1521


de.intarsys.pdf.content.CSOperators

(continued from last page)

CSO_TL
public static final de.intarsys.pdf.content.CSOperator CSO_TL

CSO_J
public static final de.intarsys.pdf.content.CSOperator CSO_J

CSO_d
public static final de.intarsys.pdf.content.CSOperator CSO_d

CSO_j
public static final de.intarsys.pdf.content.CSOperator CSO_j

CSO_w
public static final de.intarsys.pdf.content.CSOperator CSO_w

CSO_M
public static final de.intarsys.pdf.content.CSOperator CSO_M

CSO_rg
public static final de.intarsys.pdf.content.CSOperator CSO_rg

CSO_RG
public static final de.intarsys.pdf.content.CSOperator CSO_RG

CSO_Tm
public static final de.intarsys.pdf.content.CSOperator CSO_Tm

Page 149 of 1521


de.intarsys.pdf.content.CSOperators

(continued from last page)

CSO_Tr
public static final de.intarsys.pdf.content.CSOperator CSO_Tr

CSO_Ts
public static final de.intarsys.pdf.content.CSOperator CSO_Ts

CSO_Tw
public static final de.intarsys.pdf.content.CSOperator CSO_Tw

CSO_Tj
public static final de.intarsys.pdf.content.CSOperator CSO_Tj

CSO_S
public static final de.intarsys.pdf.content.CSOperator CSO_S

CSO_cm
public static final de.intarsys.pdf.content.CSOperator CSO_cm

CSO_gs
public static final de.intarsys.pdf.content.CSOperator CSO_gs

CSO_CS
public static final de.intarsys.pdf.content.CSOperator CSO_CS

CSO_cs
public static final de.intarsys.pdf.content.CSOperator CSO_cs

CSO_Do
public static final de.intarsys.pdf.content.CSOperator CSO_Do

Page 150 of 1521


de.intarsys.pdf.content.CSOperators

(continued from last page)

CSO_TJ
public static final de.intarsys.pdf.content.CSOperator CSO_TJ

CSO_Quote
public static final de.intarsys.pdf.content.CSOperator CSO_Quote

CSO_DoubleQuote
public static final de.intarsys.pdf.content.CSOperator CSO_DoubleQuote

CSO_BDC
public static final de.intarsys.pdf.content.CSOperator CSO_BDC

CSO_BI
public static final de.intarsys.pdf.content.CSOperator CSO_BI

CSO_BX
public static final de.intarsys.pdf.content.CSOperator CSO_BX

CSO_d0
public static final de.intarsys.pdf.content.CSOperator CSO_d0

CSO_d1
public static final de.intarsys.pdf.content.CSOperator CSO_d1

CSO_DP
public static final de.intarsys.pdf.content.CSOperator CSO_DP

Page 151 of 1521


de.intarsys.pdf.content.CSOperators

(continued from last page)

CSO_EI
public static final de.intarsys.pdf.content.CSOperator CSO_EI

CSO_EX
public static final de.intarsys.pdf.content.CSOperator CSO_EX

CSO_ID
public static final de.intarsys.pdf.content.CSOperator CSO_ID

CSO_K
public static final de.intarsys.pdf.content.CSOperator CSO_K

CSO_k
public static final de.intarsys.pdf.content.CSOperator CSO_k

CSO_MP
public static final de.intarsys.pdf.content.CSOperator CSO_MP

CSO_ri
public static final de.intarsys.pdf.content.CSOperator CSO_ri

CSO_SC
public static final de.intarsys.pdf.content.CSOperator CSO_SC

CSO_sc
public static final de.intarsys.pdf.content.CSOperator CSO_sc

CSO_SCN
public static final de.intarsys.pdf.content.CSOperator CSO_SCN

Page 152 of 1521


de.intarsys.pdf.content.CSOperators

(continued from last page)

CSO_scn
public static final de.intarsys.pdf.content.CSOperator CSO_scn

CSO_sh
public static final de.intarsys.pdf.content.CSOperator CSO_sh

CSO_All
public static final java.util.List CSO_All

Methods
getDescription
public static String getDescription(CSOperator operator)

Page 153 of 1521


de.intarsys.pdf.content.CSShapeDevice

de.intarsys.pdf.content
Class CSShapeDevice
java.lang.Object
|
+-de.intarsys.pdf.content.CSDeviceAdapter
|
+-de.intarsys.pdf.content.CSShapeDevice
All Implemented Interfaces:
ICSDevice

Direct Known Subclasses:


CSBoundingBoxCollector

public abstract class CSShapeDevice


extends CSDeviceAdapter

A ICSDevice creating AWT java.awt.Shape instances from the path painting operators.

Constructor Summary
public CSShapeDevice()

Method Summary
void pathClipEvenOdd()

void pathClipNonZero()

void pathClose()

void pathCloseFillStrokeEvenOdd()

void pathCloseFillStrokeNonZero()

void pathCloseStroke()

void pathEnd()

void pathFillEvenOdd()

void pathFillNonZero()

void pathFillStrokeEvenOdd()

void pathFillStrokeNonZero()

void pathStroke()

Page 154 of 1521


de.intarsys.pdf.content.CSShapeDevice

void penCurveToC(float x1, float y1, float x2, float y2, float x3, float y3)

void penCurveToV(float x2, float y2, float x3, float y3)

void penCurveToY(float x1, float y1, float x3, float y3)

void penLineTo(float x, float y)

void penMoveTo(float x, float y)

void penRectangle(float x, float y, float w, float h)

Constructors
CSShapeDevice
public CSShapeDevice()

Methods
pathClipEvenOdd
public void pathClipEvenOdd()

pathClipNonZero
public void pathClipNonZero()

pathClose
public void pathClose()

pathCloseFillStrokeEvenOdd
public void pathCloseFillStrokeEvenOdd()

pathCloseFillStrokeNonZero
public void pathCloseFillStrokeNonZero()

Page 155 of 1521


de.intarsys.pdf.content.CSShapeDevice

(continued from last page)

pathCloseStroke
public void pathCloseStroke()

pathEnd
public void pathEnd()

pathFillEvenOdd
public void pathFillEvenOdd()

pathFillNonZero
public void pathFillNonZero()

pathFillStrokeEvenOdd
public void pathFillStrokeEvenOdd()

pathFillStrokeNonZero
public void pathFillStrokeNonZero()

pathStroke
public void pathStroke()

penCurveToC
public void penCurveToC(float x1,
float y1,
float x2,
float y2,
float x3,
float y3)

penCurveToV
public void penCurveToV(float x2,
float y2,
float x3,
float y3)

Page 156 of 1521


de.intarsys.pdf.content.CSShapeDevice

(continued from last page)

penCurveToY
public void penCurveToY(float x1,
float y1,
float x3,
float y3)

penLineTo
public void penLineTo(float x,
float y)

penMoveTo
public void penMoveTo(float x,
float y)

penRectangle
public void penRectangle(float x,
float y,
float w,
float h)

Page 157 of 1521


de.intarsys.pdf.content.CSVirtualDevice

de.intarsys.pdf.content
Class CSVirtualDevice
java.lang.Object
|
+-de.intarsys.pdf.content.CSDeviceAdapter
|
+-de.intarsys.pdf.content.CSVirtualDevice
All Implemented Interfaces:
ICSDevice

Direct Known Subclasses:


DefaultAppearanceDevice, CSCreator

public abstract class CSVirtualDevice


extends CSDeviceAdapter

A "virtual" device, managing most of the GraphicsState itself.

Constructor Summary
public CSVirtualDevice()

Method Summary
void open(ICSInterpreter pInterpreter)

Constructors
CSVirtualDevice
public CSVirtualDevice()

Methods
open
public void open(ICSInterpreter pInterpreter)

Page 158 of 1521


de.intarsys.pdf.content.CSWarning

de.intarsys.pdf.content
Class CSWarning
java.lang.Object
|
+-java.lang.Throwable
|
+-java.lang.Exception
|
+-java.lang.RuntimeException
|
+-de.intarsys.pdf.content.CSException
|
+-de.intarsys.pdf.content.CSWarning
All Implemented Interfaces:
java.io.Serializable

Direct Known Subclasses:


CSNotSupported

public class CSWarning


extends CSException

A warning while processing a content stream.

Constructor Summary
public CSWarning(String message)

public CSWarning(String message, Throwable cause)

public CSWarning()

public CSWarning(Throwable cause)

Constructors
CSWarning
public CSWarning(String message)

CSWarning
public CSWarning(String message,
Throwable cause)

Page 159 of 1521


de.intarsys.pdf.content.CSWarning

(continued from last page)

CSWarning
public CSWarning()

CSWarning
public CSWarning(Throwable cause)

Page 160 of 1521


de.intarsys.pdf.content.GraphicsState

de.intarsys.pdf.content
Class GraphicsState
java.lang.Object
|
+-de.intarsys.pdf.content.GraphicsState

public class GraphicsState


extends Object

The state information for performing graphic operations.

Field Summary
public textState
The parameters used for rendering text operations.

Constructor Summary
public GraphicsState()
Create a new graphic state for the renderer

Method Summary
GraphicsState copy()

int getCapStyle()

java.awt.Shape getClip()

float[] getDashPattern()

float getDashPhase()

int getJoinStyle()

float getLineWidth()

float getMiterLimit()

float getNonStrokeAlphaValue()

PDColorSpace getNonStrokeColorSpace()

float[] getNonStrokeColorValues()

float getStrokeAlphaValue()

Page 161 of 1521


de.intarsys.pdf.content.GraphicsState

PDColorSpace getStrokeColorSpace()

float[] getStrokeColorValues()

java.awt.geom.AffineT getTransform()
ransform

float[] getTransformationValues()

void setCapStyle(int paramCapStyle)

void setClip(java.awt.Shape paramClip)

void setDash(float[] pattern, float phase)

void setExtendedState(PDExtGState gstate)

void setJoinStyle(int paramJoinStyle)

void setLineWidth(float paramWidth)

void setMiterLimit(float value)

void setNonStrokeAlphaValue(float paramNonStrokeAlphaValue)

void setNonStrokeColorSpace(PDColorSpace colorSpace)

void setNonStrokeColorValues(float[] values)

void setNonStrokeColorWithPattern(float[] values, COSName pattern)

void setStrokeAlphaValue(float paramStrokeAlphaValue)

void setStrokeColorSpace(PDColorSpace paramStrokeColorSpace)

void setStrokeColorValues(float[] values)

void setStrokeColorWithPattern(float[] values, COSName pattern)

void setTransform(java.awt.geom.AffineTransform paramTransform)

void setTransformationValues(float[] values)

Fields
textState
public de.intarsys.pdf.content.TextState textState

Page 162 of 1521


de.intarsys.pdf.content.GraphicsState

(continued from last page)

The parameters used for rendering text operations.

Constructors
GraphicsState
public GraphicsState()

Create a new graphic state for the renderer

Methods
copy
public GraphicsState copy()

getCapStyle
public int getCapStyle()

getClip
public java.awt.Shape getClip()

getDashPattern
public float[] getDashPattern()

getDashPhase
public float getDashPhase()

getJoinStyle
public int getJoinStyle()

getLineWidth
public float getLineWidth()

getMiterLimit
public float getMiterLimit()

Page 163 of 1521


de.intarsys.pdf.content.GraphicsState

(continued from last page)

getNonStrokeAlphaValue
public float getNonStrokeAlphaValue()

getNonStrokeColorSpace
public PDColorSpace getNonStrokeColorSpace()

getNonStrokeColorValues
public float[] getNonStrokeColorValues()

getStrokeAlphaValue
public float getStrokeAlphaValue()

getStrokeColorSpace
public PDColorSpace getStrokeColorSpace()

getStrokeColorValues
public float[] getStrokeColorValues()

getTransform
public java.awt.geom.AffineTransform getTransform()

getTransformationValues
public float[] getTransformationValues()

setCapStyle
public void setCapStyle(int paramCapStyle)

Page 164 of 1521


de.intarsys.pdf.content.GraphicsState

(continued from last page)

setClip
public void setClip(java.awt.Shape paramClip)

setDash
public void setDash(float[] pattern,
float phase)

setExtendedState
public void setExtendedState(PDExtGState gstate)

setJoinStyle
public void setJoinStyle(int paramJoinStyle)

setLineWidth
public void setLineWidth(float paramWidth)

setMiterLimit
public void setMiterLimit(float value)

setNonStrokeAlphaValue
public void setNonStrokeAlphaValue(float paramNonStrokeAlphaValue)

setNonStrokeColorSpace
public void setNonStrokeColorSpace(PDColorSpace colorSpace)

setNonStrokeColorValues
public void setNonStrokeColorValues(float[] values)

Page 165 of 1521


de.intarsys.pdf.content.GraphicsState

(continued from last page)

setNonStrokeColorWithPattern
public void setNonStrokeColorWithPattern(float[] values,
COSName pattern)

setStrokeAlphaValue
public void setStrokeAlphaValue(float paramStrokeAlphaValue)

setStrokeColorSpace
public void setStrokeColorSpace(PDColorSpace paramStrokeColorSpace)

setStrokeColorValues
public void setStrokeColorValues(float[] values)

setStrokeColorWithPattern
public void setStrokeColorWithPattern(float[] values,
COSName pattern)

setTransform
public void setTransform(java.awt.geom.AffineTransform paramTransform)

setTransformationValues
public void setTransformationValues(float[] values)

Page 166 of 1521


de.intarsys.pdf.content.IContentStreamProvider

de.intarsys.pdf.content
Interface IContentStreamProvider
All Superinterfaces:
IResourcesProvider

All Known Implementing Classes:


PDForm, PDPage

public interface IContentStreamProvider


extends IResourcesProvider

An interface for all owners of PDF content streams.

Method Summary
CSContent getContentStream()
The CSContent contained in this.

void setContentStream(CSContent content)


Assign the new CSContent to this.

Methods
getContentStream
public CSContent getContentStream()

The CSContent contained in this.

Returns:
The CSContent contained in this.

setContentStream
public void setContentStream(CSContent content)

Assign the new CSContent to this.

Parameters:
content - The new content

Page 167 of 1521


de.intarsys.pdf.content.ICSDevice

de.intarsys.pdf.content
Interface ICSDevice
All Known Implementing Classes:
CSDeviceAdapter

public interface ICSDevice


extends

The abstraction of a device that is manipulated by a PDF content stream interpreter (ICSInterpreter) processing a content
stream.

The device lifecycle is framed by open/close, issued by the ICSInterpreter. The behavior of an ICSDevice that is not open is
undefined.

Any of the ICSDevice methods may throw a CSException. When the ICSDevice is used in the context of an
ICSInterpreter, the exception may be handled by the associated ICSExceptionHandler, otherwise you have to be prepared
yourself. Following a list of operator/method relationship. Not all operators may have a corresponding method. b |
pathCloseFillStrokeNonZero B | pathFillStrokeNonZero b* | patcCloseFillStrokeEvenOdd B* |
pathFillStrokeEvenOdd BDC | markedContentBeginProperties BI | inlineImageBegin BMC |
markedContentBegin BT | textBegin BX | compatibilityBegin c | penCurveToC cm | transform CS |
setStrokeColorSpace cs | setNonStrokeColorSpace d | setLineDash d0 | textT3SetGlyphWidth d1 |
textT3SetGlyphWidthBB Do | doXObject DP | markedContentPointProperties EI | inlineImageEnd EMC |
markedContentEnd ET | textEnd EX | compatibilityEnd f | pathFillNonZero f* | pathFillEvenOdd G |
setStrokeColorGray g | setNonStrokeColorGray gs | setExtendedState h | pathClose i |
setFlatnessTolerance ID | inlineImageBeginData j | setLineJoin J | setLineCap K |
setStrokeColorCMYK k | setNonStrokeColorCMYK l | penLineTo m | penMoveTo M | setMiterLimit MP |
markedContentPoint n | pathEnd q | saveState Q | restoreState re | penRectangle RG |
setStrokeColorRGB rg | setNonStrokeColorRGB ri | setRenderingIntent s | pathCloseStroke S |
pathStroke SC | setStrokeColorValues sc | setNonStrokeColorValues SCN |
setStrokeColorValuesSpecial scn | setNonStrokeColorValuesSpecial sh | paintFill T* | textLineNew
Tc | textSetCharSpacing Td | textLineMove TD | use primitive methods Tf | textSetFont Tj |
textShow TJ | textShow & textMove TL | textSetLeading Tm | textSetTransform Tr |
textSetRenderingMode Ts | textSetRise Tw | textSetWordSpacing Tz | textSetHorizontalScaling v |
penCurveToV w | setLineWidth W | pathClipNonZero W* | pathClipEvenOdd y | penCurveToY ' | use
primitive methods " | use primitive methods

Method Summary
void close()
Close the device after use.

void compatibilityBegin()
Begin a compatibility section.

void compatibilityEnd()
End a compatibility section.

void doShading(COSName resourceName, PDShading shading)


Paint shape and color shading according to shading dictionary.

void doXObject(COSName resourceName, PDXObject xObject)


Stroke a PDXObject.

ICSGraphicsState getGraphicsState()
The current ICSGraphicsState active.

Page 168 of 1521


de.intarsys.pdf.content.ICSDevice

ICSInterpreter getInterpreter()
The ICSInterpreter associated with this ICSDevice.

void inlineImage(PDImage img)


Stroke an inlined image.

void markedContentBegin(COSName tag)


Begin a marked content sequence.

void markedContentBeginProperties(COSName tag, COSName resourceName,


COSDictionary properties)
Begin a marked content sequence with a property list.

void markedContentEnd()
End marked content sequence started with "BMC" or "BDC".

void markedContentPoint(COSName tag)


Set a marked point.

void markedContentPointProperties(COSName tag, COSName resourceName,


COSDictionary properties)
Define a marked content point with a property list.

void open(ICSInterpreter interpreter)


Open the device for use by interpreter.

void pathClipEvenOdd()
Intersect the current clipping path with the current path using the even/odd rule.

void pathClipNonZero()
Intersect the current clipping path with the current path using the nonzero winding rule.

void pathClose()
Close the path and append a line segment from the current coordinate to the starting point of
the path.

void pathCloseFillStrokeEvenOdd()
Close, Fill and then stroke the path using the even/odd rule.

void pathCloseFillStrokeNonZero()
Close, Fill and then stroke the path using the non zero winding rule.

void pathCloseStroke()
Close and then stroke the path.

void pathEnd()
End the path without filling or stroking.

void pathFillEvenOdd()
Fill the path using the even/odd rule.

void pathFillNonZero()
Fill the path using the non-zero winding rule.

void pathFillStrokeEvenOdd()
Fill and then stroke the path using the even/odd rule.

void pathFillStrokeNonZero()
Fill and then stroke the path using the non-zero winding rule.

Page 169 of 1521


de.intarsys.pdf.content.ICSDevice

void pathStroke()
Stroke the current path.

void penCurveToC(float x1, float y1, float x2, float y2, float x3, float y3)
Append a cubic bezier curve to the path.

void penCurveToV(float x2, float y2, float x3, float y3)


Append a cubic bezier curve to the path.

void penCurveToY(float x1, float y1, float x3, float y3)


Append a cubic bezier curve to the path.

void penLineTo(float x, float y)


Add a line from the current point to x, y.

void penMoveTo(float x, float y)


Move the current point to x, y.

void penRectangle(float x, float y, float w, float h)


Append a complete rectangle to as a subpath.

void restoreState()
Restore the graphics state from the stack.

void saveState()
Save the current graphics state on a stack for later use.

void setExtendedState(COSName resourceName, PDExtGState gstate)


Set the dictionary as the new graphic state, creating a new PDResources entry if needed.

void setFlatnessTolerance(float flatness)


Set the flatness tolerance.

void setLineCap(int capStyle)


The line cap specifies the shape to be used at the ends of open subpaths.

void setLineDash(float[] pattern, float phase)


Define the pattern used to stroke paths.

void setLineJoin(int joinStyle)


The line join specifies the shape to be used at the connection points of two adjacent lines in
a path.

void setLineWidth(float lineWidth)


Set the thickness of the line used to stroke a path.

void setMiterLimit(float miterLimit)


The maximum ratio of MiterLength/LineWidth when connecting two lines with miter style.

void setNonStrokeColorCMYK(float c, float m, float y, float k)


Set the non stroking color space to /DeviceCMYK and set the color values c, m, y, K.

void setNonStrokeColorGray(float gray)


Set the non stroking color space to /DeviceGray and set the gray level to gray.

void setNonStrokeColorRGB(float r, float g, float b)


Set the non stroking color space to /DeviceRGB and set the color values r, g, b.

void setNonStrokeColorSpace(COSName resourceName, PDColorSpace colorSpace)


Set color space for non-stroking.

Page 170 of 1521


de.intarsys.pdf.content.ICSDevice

void setNonStrokeColorValues(float[] values)


Set the color used for non stroking operations, dependent on the currently selected color
spaces.

void setNonStrokeColorValues(float[] values, COSName resourceName, PDPattern


pattern)
Set the color used for non stroking operations, dependent on the currently selected special
color spaces.

void setRenderingIntent(COSName intent)


Set the color rendering intent.

void setStrokeColorCMYK(float c, float m, float y, float k)


Set the stroking color space to /DeviceCMYK and set the color values c, m, y, K.

void setStrokeColorGray(float gray)


Set the stroking color space to /DeviceGray and set the gray level to gray.

void setStrokeColorRGB(float r, float g, float b)


Set the stroking color space to /DeviceRGB and set the color values r, g, b.

void setStrokeColorSpace(COSName resourceName, PDColorSpace colorSpace)


Set color space for stroking.

void setStrokeColorValues(float[] values)


Set the color used for stroking operations, dependent on the currently selected color spaces.

void setStrokeColorValues(float[] values, COSName resourceName, PDPattern


pattern)
Set the color used for stroking operations, dependent on the currently selected special color
spaces.

void textBegin()
Begin text mode.

void textEnd()
End text mode.

void textLineMove(float dx, float dy)


Move the current lext line by dx, dy.

void textLineNew()
Move the current position to a new line.

void textMove(float dx, float dy)


Move the current text cursor by dx, dy.

void textMoveTo(float x, float y)


Move the current text cursor to x, y.

void textSetCharSpacing(float charSpacing)


Set the character spacing.

void textSetFont(COSName resourceName, PDFont font, float size)


Set the current font and size.

void textSetHorizontalScaling(float scale)


Set the horizontal scling factor.

Page 171 of 1521


de.intarsys.pdf.content.ICSDevice

void textSetLeading(float leading)


Set the text leading.

void textSetRenderingMode(int renderingMode)


Set the text rendering mode.

void textSetRise(float rise)


Set the text rise.

void textSetTransform(float a, float b, float c, float d, float e, float f)


Set the text transformation matrix.

void textSetWordSpacing(float wordSpacing)


Set the word spacing.

void textShow(byte[] text, int offset, int length)


Show a sequence of bytes as text.

void textShow(String text)


Show a string value as text, using the current font encoding.

void textT3SetGlyphWidth(float x, float y)


Set the glyph width for a type 3 font.

void textT3SetGlyphWidthBB(float x, float y, float llx, float lly, float


urx, float ury)
Set the glyph width and bounding box for a type 3 font.

void transform(float a, float b, float c, float d, float e, float f)


Modify the current transformation matrix by concatenating the transformations.

Methods
close
public void close()

Close the device after use.

doShading
public void doShading(COSName resourceName,
PDShading shading)

Paint shape and color shading according to shading dictionary.

PDF graphics operator "sh"

Parameters:
resourceName - The logical name of the resource in the PDResources
shading - The PDShading to be painted.

doXObject
public void doXObject(COSName resourceName,
PDXObject xObject)

Page 172 of 1521


de.intarsys.pdf.content.ICSDevice

(continued from last page)

Stroke a PDXObject. A PDXObject is a self contained graphical description, either a form, an image or a postscript
program.

PDF graphics operator "Do"

Parameters:
resourceName - The logical name of the resource in the PDResources
xObject - The PDXObject to be stroked.

inlineImage
public void inlineImage(PDImage img)

Stroke an inlined image.

PDF graphics operators "BI", "ID", "EI"

Parameters:
img - The inlined image. The image may use some special keys instead of the standard PDImage dictionary keys.

markedContentBegin
public void markedContentBegin(COSName tag)

Begin a marked content sequence.

PDF graphics operator "BMC"

Parameters:
tag - The tag indicating the role or significance.

compatibilityBegin
public void compatibilityBegin()

Begin a compatibility section.

PDF graphics operator "BX"

compatibilityEnd
public void compatibilityEnd()

End a compatibility section.

PDF graphics operator "EX"

markedContentBeginProperties
public void markedContentBeginProperties(COSName tag,
COSName resourceName,
COSDictionary properties)

Begin a marked content sequence with a property list.

PDF graphics operator "BDC"

Parameters:
tag - The tag indicating the role or significance.
resourceName - The logical name of the resource in the PDResources
properties - The properties for the marked content sequence.

Page 173 of 1521


de.intarsys.pdf.content.ICSDevice

markedContentEnd
public void markedContentEnd()

End marked content sequence started with "BMC" or "BDC".

PDF graphics operator "EMC"

markedContentPoint
public void markedContentPoint(COSName tag)

Set a marked point.

PDF graphics operator "MP"

Parameters:
tag - The tag indicating the role or significance.

markedContentPointProperties
public void markedContentPointProperties(COSName tag,
COSName resourceName,
COSDictionary properties)

Define a marked content point with a property list.

PDF graphics operator "DP"

Parameters:
tag - The tag indicating the role or significance.
resourceName - The logical name of the resource in the PDResources
properties - The properties for the marked content point.

open
public void open(ICSInterpreter interpreter)

Open the device for use by interpreter.

Parameters:
interpreter

pathClipEvenOdd
public void pathClipEvenOdd()

Intersect the current clipping path with the current path using the even/odd rule.

PDF graphics operator "W*"

pathClipNonZero
public void pathClipNonZero()

Intersect the current clipping path with the current path using the nonzero winding rule.

PDF graphics operator "W"

Page 174 of 1521


de.intarsys.pdf.content.ICSDevice

pathClose
public void pathClose()

Close the path and append a line segment from the current coordinate to the starting point of the path.

PDF graphics operator "h"

pathCloseFillStrokeEvenOdd
public void pathCloseFillStrokeEvenOdd()

Close, Fill and then stroke the path using the even/odd rule.

PDF graphics operator "b*"

pathCloseFillStrokeNonZero
public void pathCloseFillStrokeNonZero()

Close, Fill and then stroke the path using the non zero winding rule.

PDF graphics operator "b"

pathCloseStroke
public void pathCloseStroke()

Close and then stroke the path.

PDF graphics operator "s"

pathEnd
public void pathEnd()

End the path without filling or stroking.

This may for example be used to manipulate the clipping path without a painting operation.

PDF graphics operator "n"

pathFillEvenOdd
public void pathFillEvenOdd()

Fill the path using the even/odd rule.

PDF graphics operator "f*"

pathFillNonZero
public void pathFillNonZero()

Fill the path using the non-zero winding rule.

An open subpath is closed before filling.

PDF graphics operator "f"

Page 175 of 1521


de.intarsys.pdf.content.ICSDevice

pathFillStrokeEvenOdd
public void pathFillStrokeEvenOdd()

Fill and then stroke the path using the even/odd rule.

PDF graphics operator "B*"

pathFillStrokeNonZero
public void pathFillStrokeNonZero()

Fill and then stroke the path using the non-zero winding rule.

PDF graphics operator "B"

pathStroke
public void pathStroke()

Stroke the current path.

PDF graphics operator "S"

penCurveToC
public void penCurveToC(float x1,
float y1,
float x2,
float y2,
float x3,
float y3)

Append a cubic bezier curve to the path.


The curve extends from the current point to x3, y3, where x1,y1 and x2,y2 are the bezier control points. current +-----
----* x1/y1 . _ -. . *x2/y2 . . . + x3/y3

PDF graphics operator "c"

Parameters:
x1 - x coordinate of first control point
y1 - y coordinate of first control point
x2 - x coordinate of second control point
y2 - y coordinate of second control point
x3 - x coordinate of endpoint
y3 - y coordinate of endpoint

penCurveToV
public void penCurveToV(float x2,
float y2,
float x3,
float y3)

Append a cubic bezier curve to the path. The curve extends from the current point to x3, y3, where the first control point
coincides with the current point and x2,y2 is the second bezier control point. current + . _ -. . *x2/y2 . . . +
x3/y3

PDF graphics operator "v"

Parameters:

Page 176 of 1521


de.intarsys.pdf.content.ICSDevice

(continued from last page)

x2 - x coordinate of second control point


y2 - y coordinate of second control point
x3 - x coordinate of endpoint
y3 - y coordinate of endpoint

penCurveToY
public void penCurveToY(float x1,
float y1,
float x3,
float y3)

Append a cubic bezier curve to the path.

The curve extends from the current point to x3, y3, where x1,y1 and x3,y3 are the bezier control points. current +-----
----* x1/y1 . _ -. . . . . + x3/y3

PDF graphics operator "y"

Parameters:
x1 - x coordinate of first control point
y1 - y coordinate of first control point
x3 - x coordinate of endpoint
y3 - y coordinate of endpoint

penLineTo
public void penLineTo(float x,
float y)

Add a line from the current point to x, y. The new current point is x, y.

PDF graphics operator "l"

Parameters:
x - The new current x coordinate
y - The new current y coordinate

penMoveTo
public void penMoveTo(float x,
float y)

Move the current point to x, y. No line is added to the path, a new subpath is started.

PDF graphics operator "m"

Parameters:
x - The new current x coordinate
y - The new current y coordinate

penRectangle
public void penRectangle(float x,
float y,
float w,
float h)

Page 177 of 1521


de.intarsys.pdf.content.ICSDevice

(continued from last page)

Append a complete rectangle to as a subpath.

The lower left corner is at x, y, the dimensions are width and height. The numbers are defined in user space.

PDF graphics operator "re"

Parameters:
x - The x coordinate of the lower left corner in user space
y - The y coordinate of the lower left corner in user space
w - The width in user space
h - The height in user space

restoreState
public void restoreState()

Restore the graphics state from the stack.

PDF graphics operator "Q"

saveState
public void saveState()

Save the current graphics state on a stack for later use.

PDF graphics operator "q"

setExtendedState
public void setExtendedState(COSName resourceName,
PDExtGState gstate)

Set the dictionary as the new graphic state, creating a new PDResources entry if needed.

PDF graphics operator "gs"

Parameters:
resourceName - The logical name of the resource in the PDResources
gstate - The new PDExtGState

setFlatnessTolerance
public void setFlatnessTolerance(float flatness)

Set the flatness tolerance. flatness is a value between 0 and 100, with 0 defining the device's default flatness tolerance.

PDF graphics operator "i"

Parameters:
flatness - The flatness tolerance between 0 and 100.

setLineCap
public void setLineCap(int capStyle)

The line cap specifies the shape to be used at the ends of open subpaths. 0: Butt. The stroke is cut at the
endpoint. 1: Round. A circle is drawn with the diamter of the line width at the endpoint 2:
Square. A square is drawn with its center at the endpoint.

PDF graphics operator "J"

Page 178 of 1521


de.intarsys.pdf.content.ICSDevice

(continued from last page)

Parameters:
capStyle - The line cap style to use (0,1 or 2)

setLineDash
public void setLineDash(float[] pattern,
float phase)

Define the pattern used to stroke paths. unitsOn defines a length in user space where the line is drawn, unitsOff defines
a length in user space wher the line is not drawn. phase defines a "offset" in the pattern definition.

This is a simplified version that only allows for a two phase pattern.

PDF graphics operator "d"

Parameters:
pattern - The pattern array for the dash
phase - Offset in pattern

setLineJoin
public void setLineJoin(int joinStyle)

The line join specifies the shape to be used at the connection points of two adjacent lines in a path. 0: Miter Join, the
outer line boreders are extended until they meet. 1: Round join. A circle is drawn at the
meeting point with its diameter the same as the line width. 2: Bevel join. The segments are
cut at the endpoints as in the line cap style "Butt". The empty triangle is filled.

PDF graphics operator "j"

Parameters:
joinStyle - The line join style to use (one of 0,1,2)

setLineWidth
public void setLineWidth(float lineWidth)

Set the thickness of the line used to stroke a path. This is a number in user space units.

A width of zero denotes the thinest line that can be rendered.

PDF graphics operator "w"

Parameters:
lineWidth - The line width in user space.

setMiterLimit
public void setMiterLimit(float miterLimit)

The maximum ratio of MiterLength/LineWidth when connecting two lines with miter style.

PDF graphics operator "M"

Parameters:
miterLimit - The maximum ratio of MiterLength/LineWidth when connecting two lines with miter style.

Page 179 of 1521


de.intarsys.pdf.content.ICSDevice

(continued from last page)

setNonStrokeColorCMYK
public void setNonStrokeColorCMYK(float c,
float m,
float y,
float k)

Set the non stroking color space to /DeviceCMYK and set the color values c, m, y, K.

Parameters:
c - A number between 0 (minimum) and 1 (maximum)
m - A number between 0 (minimum) and 1 (maximum)
y - A number between 0 (minimum) and 1 (maximum)
k - A number between 0 (minimum) and 1 (maximum)

setNonStrokeColorGray
public void setNonStrokeColorGray(float gray)

Set the non stroking color space to /DeviceGray and set the gray level to gray.

Parameters:
gray - A number between 0 (black) and 1 (white)

setNonStrokeColorRGB
public void setNonStrokeColorRGB(float r,
float g,
float b)

Set the non stroking color space to /DeviceRGB and set the color values r, g, b.

Parameters:
r - A number between 0 (minimum) and 1 (maximum)
g - A number between 0 (minimum) and 1 (maximum)
b - A number between 0 (minimum) and 1 (maximum)

setNonStrokeColorSpace
public void setNonStrokeColorSpace(COSName resourceName,
PDColorSpace colorSpace)

Set color space for non-stroking.

PDF graphics operator "cs"

Parameters:
resourceName - The logical name of the resource in the PDResources
colorSpace - The new PDColorSpace

setNonStrokeColorValues
public void setNonStrokeColorValues(float[] values)

Set the color used for non stroking operations, dependent on the currently selected color spaces.

PDF graphics operator "sc" or "scn", dependen on the active color space.

Parameters:
values - The color values

Page 180 of 1521


de.intarsys.pdf.content.ICSDevice

setNonStrokeColorValues
public void setNonStrokeColorValues(float[] values,
COSName resourceName,
PDPattern pattern)

Set the color used for non stroking operations, dependent on the currently selected special color spaces.

PDF graphics operator "scn"

Parameters:
values - The color values.
resourceName - An optional logical name of the resource in the PDResources
pattern - An optional PDPattern

setRenderingIntent
public void setRenderingIntent(COSName intent)

Set the color rendering intent.

PDF graphics operator "ri"

Parameters:
intent - The name of the rendering intent.

setStrokeColorCMYK
public void setStrokeColorCMYK(float c,
float m,
float y,
float k)

Set the stroking color space to /DeviceCMYK and set the color values c, m, y, K.

Parameters:
c - A number between 0 (minimum) and 1 (maximum)
m - A number between 0 (minimum) and 1 (maximum)
y - A number between 0 (minimum) and 1 (maximum)
k - A number between 0 (minimum) and 1 (maximum)

setStrokeColorGray
public void setStrokeColorGray(float gray)

Set the stroking color space to /DeviceGray and set the gray level to gray.

Parameters:
gray - A number between 0 (black) and 1 (white)

setStrokeColorRGB
public void setStrokeColorRGB(float r,
float g,
float b)

Set the stroking color space to /DeviceRGB and set the color values r, g, b.

Parameters:

Page 181 of 1521


de.intarsys.pdf.content.ICSDevice

(continued from last page)

r - A number between 0 (minimum) and 1 (maximum)


g - A number between 0 (minimum) and 1 (maximum)
b - A number between 0 (minimum) and 1 (maximum)

setStrokeColorSpace
public void setStrokeColorSpace(COSName resourceName,
PDColorSpace colorSpace)

Set color space for stroking.

PDF graphics operator "CS"

Parameters:
resourceName - The logical name of the resource in the PDResources
colorSpace - The new PDColorSpace

setStrokeColorValues
public void setStrokeColorValues(float[] values)

Set the color used for stroking operations, dependent on the currently selected color spaces.

PDF graphics operator "SC" or "SCN", dependen on the active color space.

Parameters:
values - The color values.

setStrokeColorValues
public void setStrokeColorValues(float[] values,
COSName resourceName,
PDPattern pattern)

Set the color used for stroking operations, dependent on the currently selected special color spaces.

PDF graphics operator "SCN"

Parameters:
values - The color values.
resourceName - An optional logical name of the resource in the PDResources
pattern - An optional PDPattern

textBegin
public void textBegin()

Begin text mode.

PDF graphics operator "BT"

textEnd
public void textEnd()

End text mode.

PDF graphics operator "ET"

Page 182 of 1521


de.intarsys.pdf.content.ICSDevice

(continued from last page)

textLineMove
public void textLineMove(float dx,
float dy)

Move the current lext line by dx, dy.

PDF graphics operator "Td"

Parameters:
dx - The x offset for the new glyph starting point from the last text line starting point.
dy - The y offset for the new glyph starting point from the last text line starting point.

textMove
public void textMove(float dx,
float dy)

Move the current text cursor by dx, dy.

There is no graphics operator for this. It is implemented as a tool for the ease of creating a content stream.

Parameters:
dx - The x offset for the new glyph starting point from the current text cursor position.
dy - The x offset for the new glyph starting point from the current text cursor position.

textMoveTo
public void textMoveTo(float x,
float y)

Move the current text cursor to x, y.

There is no graphics operator for this. It is implemented as a tool for the ease of creating a content stream.

Parameters:
x - The x coordinate for the next glyph starting point .
y - The y coordinate for the next glyph starting point .

textLineNew
public void textLineNew()

Move the current position to a new line. y.

PDF graphics operator "T*"

textSetCharSpacing
public void textSetCharSpacing(float charSpacing)

Set the character spacing.

PDF graphics operator "Tc"

Parameters:
charSpacing - The character spacing

Page 183 of 1521


de.intarsys.pdf.content.ICSDevice

(continued from last page)

textSetFont
public void textSetFont(COSName resourceName,
PDFont font,
float size)

Set the current font and size.

PDF graphics operator "Tf"

Parameters:
resourceName - The logical name of the resource in the PDResources
font - The new PDFont
size - The new font size (scaling)

textSetHorizontalScaling
public void textSetHorizontalScaling(float scale)

Set the horizontal scling factor.

PDF graphics operator "Tz"

Parameters:
scale - The new horizontal scaling factor.

textSetLeading
public void textSetLeading(float leading)

Set the text leading.

PDF graphics operator "TL"

Parameters:
leading - The new leading

textSetRenderingMode
public void textSetRenderingMode(int renderingMode)

Set the text rendering mode.

PDF graphics operator "Tr"

Parameters:
renderingMode - The new rendering mode.

textSetRise
public void textSetRise(float rise)

Set the text rise.

PDF graphics operator "Ts"

Parameters:
rise - The new text rise (super/subscript) amount

Page 184 of 1521


de.intarsys.pdf.content.ICSDevice

(continued from last page)

textSetTransform
public void textSetTransform(float a,
float b,
float c,
float d,
float e,
float f)

Set the text transformation matrix. Both the text matrix anf the text line matrix are set to the new values.

PDF graphics operator "Tm"

Parameters:
a - operand 1,1 in the matrix
b - operand 1,2 in the matrix
c - operand 2,1 in the matrix
d - operand 2,2 in the matrix
e - operand 3,1 in the matrix
f - operand 3,2 in the matrix

textSetWordSpacing
public void textSetWordSpacing(float wordSpacing)

Set the word spacing.

PDF graphics operator "Tw"

Parameters:
wordSpacing - The new word spacing.

textShow
public void textShow(byte[] text,
int offset,
int length)

Show a sequence of bytes as text.

PDF graphics operator "Tj"

Parameters:
text - The bytes to be shown.
offset
length

textShow
public void textShow(String text)

Show a string value as text, using the current font encoding.

This is an optional operation from the viewpoint of an ICSInterpreter. It is called only "manually" in content creation
devices. This method may throw an java.lang.UnsupportedOperationException.

PDF graphics operator "Tj"

Parameters:
text - The text value to be shown using the current fonts encoding.

Page 185 of 1521


de.intarsys.pdf.content.ICSDevice

textT3SetGlyphWidth
public void textT3SetGlyphWidth(float x,
float y)

Set the glyph width for a type 3 font.

PDF graphics operator "d0"

Parameters:
x - The glyph width
y - must be 0

textT3SetGlyphWidthBB
public void textT3SetGlyphWidthBB(float x,
float y,
float llx,
float lly,
float urx,
float ury)

Set the glyph width and bounding box for a type 3 font.

PDF graphics operator "d1"

Parameters:
x - The glyph width.
y - must be 0
llx - lower left x of bounding box
lly - lower left y of bounding box
urx - upper right x of bounding box
ury - upper right y of bounding box

transform
public void transform(float a,
float b,
float c,
float d,
float e,
float f)

Modify the current transformation matrix by concatenating the transformations.

PDF graphics operator "cm"

Parameters:
a - operand 1,1 in the matrix
b - operand 1,2 in the matrix
c - operand 2,1 in the matrix
d - operand 2,2 in the matrix
e - operand 3,1 in the matrix
f - operand 3,2 in the matrix

getInterpreter
public ICSInterpreter getInterpreter()

The ICSInterpreter associated with this ICSDevice. The interpreter is associated with "open" and should be no longer
used after "close".

Page 186 of 1521


de.intarsys.pdf.content.ICSDevice

(continued from last page)

Returns:
The ICSInterpreter associated with this ICSDevice.

getGraphicsState
public ICSGraphicsState getGraphicsState()

The current ICSGraphicsState active.

This is a read only representation of the graphics state used when performing rendering operations in the device.

Returns:
The current ICSGraphicsState active.

Page 187 of 1521


de.intarsys.pdf.content.ICSExceptionHandler

de.intarsys.pdf.content
Interface ICSExceptionHandler

public interface ICSExceptionHandler


extends

An object able to handle exceptional conditions while processing a content stream. This one is plugged into an ICSInterpreter.

Method Summary
void error(CSError error)

void warning(CSWarning warning)

Methods
error
public void error(CSError error)
throws CSException

warning
public void warning(CSWarning warning)
throws CSException

Page 188 of 1521


de.intarsys.pdf.content.ICSGraphicsState

de.intarsys.pdf.content
Interface ICSGraphicsState

public interface ICSGraphicsState


extends

A read only object containing the actual context for rendering operations of an ICSDevice.

This is for completeness, but not yet implemented

Method Summary
ICSTextState getTextState()
The current ICSTextState active.

Methods
getTextState
public ICSTextState getTextState()

The current ICSTextState active.

This is a read only representation of the text state used when performing text rendering operations in the device.

Returns:
The current ICSTextState active.

Page 189 of 1521


de.intarsys.pdf.content.ICSInterpreter

de.intarsys.pdf.content
Interface ICSInterpreter
All Known Implementing Classes:
CSInterpreter

public interface ICSInterpreter


extends

An interpreter for CSContent PDF graphics streams. Indirect references are resolved using resources. resources may be null
if not needed.

Method Summary
ICSExceptionHandler getExceptionHandler()
The currently active ICSExceptionHandler for the interpreter.

java.util.Map getOptions()
Transparent options used by the interpreter implementation.

void process(CSContent content, PDResources resources)


Process content using resources if needed.

void setExceptionHandler(ICSExceptionHandler errorHandler)


Assign the ICSExceptionHandler for the interpreter.

Methods
process
public void process(CSContent content,
PDResources resources)

Process content using resources if needed.

This method may be called reentrant when a form XObject is encountered.

Parameters:
content - The PDF content stream to be interpreted.
resources - The PDResources repository for the content stream

getOptions
public java.util.Map getOptions()

Transparent options used by the interpreter implementation. The method may return null.

Returns:
Transparent options used by the interpreter implementation.

getExceptionHandler
public ICSExceptionHandler getExceptionHandler()

Page 190 of 1521


de.intarsys.pdf.content.ICSInterpreter

(continued from last page)

The currently active ICSExceptionHandler for the interpreter.

The ICSExceptionHandler is responsible for acting on the CSException instances thrwoed while processing a
CSContent.

Returns:
The currently active ICSExceptionHandler for the interpreter.

setExceptionHandler
public void setExceptionHandler(ICSExceptionHandler errorHandler)

Assign the ICSExceptionHandler for the interpreter.

Parameters:
errorHandler - The new ICSExceptionHandler.

Page 191 of 1521


de.intarsys.pdf.content.ICSTextState

de.intarsys.pdf.content
Interface ICSTextState

public interface ICSTextState


extends

A read only object containing the actual context for text rendering operations of an ICSDevice.

This is for completeness, but not yet implemented

Page 192 of 1521


de.intarsys.pdf.content.TextState

de.intarsys.pdf.content
Class TextState
java.lang.Object
|
+-de.intarsys.pdf.content.TextState

public class TextState


extends Object

This class summarizes all state information that is used to render characters in the current context, such as font, font size etc.

Field Summary
public static final RENDERING_MODE_CLIP

Value: 7

public static final RENDERING_MODE_FILL

Value: 0

public static final RENDERING_MODE_FILL_CLIP

Value: 4

public static final RENDERING_MODE_FILL_STROKE

Value: 2

public static final RENDERING_MODE_FILL_STROKE_CLIP

Value: 6

public static final RENDERING_MODE_NONE

Value: 3

public static final RENDERING_MODE_STROKE

Value: 1

public static final RENDERING_MODE_STROKE_CLIP

Value: 5

Constructor Summary
public TextState()

Method Summary
void begin()

TextState copy()

Page 193 of 1521


de.intarsys.pdf.content.TextState

void end()

float getCharSpacing()

PDFont getFont()

float getFontSize()

float getHorizontalScaling()

float getHorizontalScalingFactor()

float getLeading()

int getRenderingMode()

float getRise()

java.awt.geom.AffineT getTextLineMatrix()
ransform

java.awt.geom.AffineT getTextMatrix()
ransform

float getWordSpacing()

boolean isFont(PDFont queryFont, float queryFontSize)


Answer true if the actual font in the text state is equal to queryFont and
queryFontSize.

boolean isKnockout()

void setCharSpacing(float paramCharSpacing)

void setFont(PDFont paramFont, float size)

void setHorizontalScaling(float paramHorizontalScaling)

void setKnockout(boolean paramKnockout)

void setLeading(float paramLeading)

void setRenderingMode(int paramRenderingMode)

void setRise(float paramRise)

void setTransform(float a, float b, float c, float d, float e, float f)

void setWordSpacing(float paramWordSpacing)

Page 194 of 1521


de.intarsys.pdf.content.TextState

void tlmMove(float dx, float dy)

void tmMove(float dx, float dy)

void tmMoveTo(float x, float y)

Fields
RENDERING_MODE_CLIP
public static final int RENDERING_MODE_CLIP

Constant value: 7

RENDERING_MODE_FILL
public static final int RENDERING_MODE_FILL

Constant value: 0

RENDERING_MODE_FILL_CLIP
public static final int RENDERING_MODE_FILL_CLIP

Constant value: 4

RENDERING_MODE_FILL_STROKE
public static final int RENDERING_MODE_FILL_STROKE

Constant value: 2

RENDERING_MODE_FILL_STROKE_CLIP
public static final int RENDERING_MODE_FILL_STROKE_CLIP

Constant value: 6

RENDERING_MODE_NONE
public static final int RENDERING_MODE_NONE

Constant value: 3

RENDERING_MODE_STROKE
public static final int RENDERING_MODE_STROKE

Page 195 of 1521


de.intarsys.pdf.content.TextState

(continued from last page)

Constant value: 1

RENDERING_MODE_STROKE_CLIP
public static final int RENDERING_MODE_STROKE_CLIP

Constant value: 5

Constructors
TextState
public TextState()

Methods
begin
public void begin()

copy
public TextState copy()

end
public void end()

getCharSpacing
public float getCharSpacing()

getFont
public PDFont getFont()

getFontSize
public float getFontSize()

getHorizontalScaling
public float getHorizontalScaling()

Page 196 of 1521


de.intarsys.pdf.content.TextState

(continued from last page)

getHorizontalScalingFactor
public float getHorizontalScalingFactor()

getLeading
public float getLeading()

getRenderingMode
public int getRenderingMode()

getRise
public float getRise()

getTextMatrix
public java.awt.geom.AffineTransform getTextMatrix()

getTextLineMatrix
public java.awt.geom.AffineTransform getTextLineMatrix()

getWordSpacing
public float getWordSpacing()

isFont
public boolean isFont(PDFont queryFont,
float queryFontSize)

Answer true if the actual font in the text state is equal to queryFont and queryFontSize.

Parameters:
queryFont - the font to be compared
queryFontSize - the font size to be compared

Returns:
True if the actual font is equal.

Page 197 of 1521


de.intarsys.pdf.content.TextState

isKnockout
public boolean isKnockout()

tlmMove
public void tlmMove(float dx,
float dy)

tmMove
public void tmMove(float dx,
float dy)

tmMoveTo
public void tmMoveTo(float x,
float y)

setCharSpacing
public void setCharSpacing(float paramCharSpacing)

setFont
public void setFont(PDFont paramFont,
float size)

setHorizontalScaling
public void setHorizontalScaling(float paramHorizontalScaling)

setKnockout
public void setKnockout(boolean paramKnockout)

setLeading
public void setLeading(float paramLeading)

Page 198 of 1521


de.intarsys.pdf.content.TextState

setRenderingMode
public void setRenderingMode(int paramRenderingMode)

setRise
public void setRise(float paramRise)

setTransform
public void setTransform(float a,
float b,
float c,
float d,
float e,
float f)

setWordSpacing
public void setWordSpacing(float paramWordSpacing)

Page 199 of 1521


Package
de.intarsys.pdf.content.common
Some common implementations on PDF content stream.

This is not yet application level but also not pure "specification" level, so we put it here.

The most interesting class is PCContentStreamCreator, allowing to create CSContent via high level API calls. This class is used
througout the PDF implementation for clean content construction and even higher level tasks, for example when it comes to cross
rendering from HTML.

Page 200 of 1521


de.intarsys.pdf.content.common.CSBoundingBoxCollector

de.intarsys.pdf.content.common
Class CSBoundingBoxCollector
java.lang.Object
|
+-de.intarsys.pdf.content.CSDeviceAdapter
|
+-de.intarsys.pdf.content.CSShapeDevice
|
+-de.intarsys.pdf.content.common.CSBoundingBoxCollector
All Implemented Interfaces:
ICSDevice

public class CSBoundingBoxCollector


extends CSShapeDevice

Determine the bounding box of the content streams graphic primitives.

Usage
CSBoundingBoxCollector bbCollector = new CSBoundingBoxCollector(); CSDeviceBasedInterpreter
interpreter = new CSDeviceBasedInterpreter(null, bbCollector); interpreter.process(content,
getResources()); if (bbCollector.getBoundingBox() != null) { ... }ATTENTION: The
CSBoundingBoxCollector does not take care of text yet !!

Constructor Summary
public CSBoundingBoxCollector()

Method Summary
java.awt.geom.Rectang getBoundingBox()
le2D
The bounding box containing all graphics artifacts stemming from operations in the content
stream processed.

void open(ICSInterpreter pInterpreter)

void restoreState()

void saveState()

void transform(float a, float b, float c, float d, float e, float f)

Constructors
CSBoundingBoxCollector
public CSBoundingBoxCollector()

Methods

Page 201 of 1521


de.intarsys.pdf.content.common.CSBoundingBoxCollector

(continued from last page)

getBoundingBox
public java.awt.geom.Rectangle2D getBoundingBox()

The bounding box containing all graphics artifacts stemming from operations in the content stream processed.

Returns:
The bounding box containing all graphics artifacts stemming from operations in the content stream processed.

open
public void open(ICSInterpreter pInterpreter)

saveState
public void saveState()

restoreState
public void restoreState()

transform
public void transform(float a,
float b,
float c,
float d,
float e,
float f)

Page 202 of 1521


de.intarsys.pdf.content.common.CSContentTools

de.intarsys.pdf.content.common
Class CSContentTools
java.lang.Object
|
+-de.intarsys.pdf.content.common.CSContentTools

public class CSContentTools


extends Object

A collection of tools to work with page content.

Constructor Summary
public CSContentTools()

Method Summary
static getBoundingBoxClipped(PDPage page, double border)
java.awt.geom.Rectang
le2D Get the rectangle containing all graphics artifacts on the page (stemming from the content
stream).

static PDForm getFormClipped(PDPage page, double border)


Get a PDForm containing all graphics artifacts on the page (stemming from the content
stream).

Constructors
CSContentTools
public CSContentTools()

Methods
getBoundingBoxClipped
public static java.awt.geom.Rectangle2D getBoundingBoxClipped(PDPage page,
double border)

Get the rectangle containing all graphics artifacts on the page (stemming from the content stream).

Parameters:
page - The page whose content is evaluated.
border - A border width to be added to the clipping rectangle.

Returns:
Get the rectangle containing all graphics artifacts on the page (stemming from the content stream).

Page 203 of 1521


de.intarsys.pdf.content.common.CSContentTools

(continued from last page)

getFormClipped
public static PDForm getFormClipped(PDPage page,
double border)

Get a PDForm containing all graphics artifacts on the page (stemming from the content stream).

Parameters:
page - The page whose content is evaluated.
border - A border width to be added to the clipping rectangle.

Returns:
Get a PDForm containing all graphics artifacts on the page (stemming from the content stream).

Page 204 of 1521


de.intarsys.pdf.content.common.CSCreator

de.intarsys.pdf.content.common
Class CSCreator
java.lang.Object
|
+-de.intarsys.pdf.content.CSDeviceAdapter
|
+-de.intarsys.pdf.content.CSVirtualDevice
|
+-de.intarsys.pdf.content.common.CSCreator
All Implemented Interfaces:
ICSDevice

public class CSCreator


extends CSVirtualDevice

An implementation helping to create a PDF content stream using higher level abstractions than the PDF operators.

This object deals with two abstractions:

The CSContent, a sequence of PDF operators. The CSContent can be read from an existing object like a PDPage or a PDForm or
can be newly created, suing the factory methods in CSContent.

The second abstraction is the IResourcesProvider for the PDResources like Fonts, XObjects, ... that are referenced in the
CSContent. The resources of the provider are not accessed until a resource relevant operation is created.

This implementation is (nearly, see AffineTransform) independent of AWT or any other window toolkit.

Field Summary
public static final KAPPA
a constant for the ease of circle creation with beziers
Value: 0.5522848

public static final VALUE_COLOR_PRECISION

Value: 3

public static final VALUE_COORDINATE_PRECISION

Value: 3

public static final VALUE_DASH_PRECISION

Value: 2

public static final VALUE_FACTOR_PRECISION

Value: 4

public static final VALUE_FLATNESS_PRECISION

Value: 3

public static final VALUE_FONT_PRECISION

Value: 2

Page 205 of 1521


de.intarsys.pdf.content.common.CSCreator

public static final VALUE_GRAY_PRECISION

Value: 3

public static final VALUE_WIDTH_PRECISION

Value: 3

Method Summary
void close()

void compatibilityBegin()

void compatibilityEnd()

void copy(CSContent otherContent)


Copy all operations from otherContent to this.

static CSCreator createFromContent(CSContent content, IResourcesProvider


resourcesProvider)
Create a CSCreator on an existing CSContent.

static CSCreator createFromProvider(IContentStreamProvider provider)


Create a CSCreator on an existing CSContent that will be read from the
IContentStreamProvider.

static CSCreator createNew(IContentStreamProvider provider)


Create a CSCreator on a newly created CSContent.

static CSCreator createNewDetached(IResourcesProvider provider)


Create a CSCreator on a newly created CSContent.

void doShading(COSName name, PDShading shading)

void doXObject(COSName name, PDXObject xObject)

void flush()
Flush all pending operations on the stream.

CSContent getContent()
The CSContent we are working on.

IContentStreamProvide getContentStreamProvider()
r

IResourcesProvider getResourcesProvider()
The IResourcesProvider associated with this.

void inlineImage(PDImage img)

void markedContentBegin(COSName tag)

void markedContentBeginProperties(COSName tag, COSName resourceName,


COSDictionary properties)

Page 206 of 1521


de.intarsys.pdf.content.common.CSCreator

void markedContentEnd()

void markedContentPoint(COSName tag)

void markedContentPointProperties(COSName tag, COSName resourceName,


COSDictionary properties)

void open(ICSInterpreter pInterpreter)

void pathClipEvenOdd()

void pathClipNonZero()

void pathClose()

void pathCloseFillStrokeEvenOdd()

void pathCloseFillStrokeNonZero()

void pathCloseStroke()

void pathEnd()

void pathFillEvenOdd()

void pathFillNonZero()

void pathFillStrokeEvenOdd()

void pathFillStrokeNonZero()

void pathStroke()

void penCircle(float x, float y, float r)


Draw a circle.

void penCurveToC(float x1, float y1, float x2, float y2, float x3, float y3)

void penCurveToV(float x2, float y2, float x3, float y3)

void penCurveToY(float x1, float y1, float x3, float y3)

void penEllipse(float x, float y, float rx, float ry)


Draw an ellipse.

void penLineTo(float x, float y)

void penMoveTo(float x, float y)

Page 207 of 1521


de.intarsys.pdf.content.common.CSCreator

void penRectangle(float x, float y, float w, float h)

void restoreState()

void saveState()

void setExtendedState(COSName name, PDExtGState gstate)

void setFlatnessTolerance(float flatness)

void setLineCap(int style)

void setLineDash(float[] pattern, float phase)

void setLineDash(float unitsOn, float unitsOff, float phase)


Convenience method to access "setLineDash".

void setLineJoin(int style)

void setLineWidth(float w)

void setMiterLimit(float miterLimit)

void setNonStrokeColorCMYK(float c, float m, float y, float k)

void setNonStrokeColorGray(float gray)

void setNonStrokeColorRGB(float red, float green, float blue)

void setNonStrokeColorSpace(COSName name, PDColorSpace colorSpace)

void setNonStrokeColorValues(float[] values)

void setNonStrokeColorValues(float[] values, COSName name, PDPattern


pattern)

void setRenderingIntent(COSName intent)

void setStrokeColorCMYK(float cyan, float magenta, float yellow, float key)

void setStrokeColorGray(float gray)

void setStrokeColorRGB(float red, float green, float blue)

void setStrokeColorSpace(COSName name, PDColorSpace colorSpace)

void setStrokeColorValues(float[] values)

void setStrokeColorValues(float[] values, COSName name, PDPattern pattern)

Page 208 of 1521


de.intarsys.pdf.content.common.CSCreator

void textBegin()

void textEnd()

void textLineMove(float dx, float dy)

void textLineMoveSetLeading(float dx, float dy)


Move the current text line by dx, dy.

void textLineMoveTo(float x, float y)


Move the current text line to absolute position x, y.

void textLineNew()

void textMove(float dx, float dy)

void textMoveTo(float x, float y)

void textSetCharSpacing(float charSpace)

void textSetFont(COSName name, PDFont font, float size)

void textSetHorizontalScaling(float scale)

void textSetLeading(float leading)

void textSetRenderingMode(int rendering)

void textSetRise(float rise)

void textSetTransform(float a, float b, float c, float d, float e, float f)

void textSetWordSpacing(float wordSpace)

void textShow(byte[] text, int offset, int length)

void textT3SetGlyphWidth(float x, float y)

void textT3SetGlyphWidthBB(float x, float y, float llx, float lly, float


urx, float ury)

void transform(float a, float b, float c, float d, float e, float f)

Fields
KAPPA
public static final float KAPPA

Page 209 of 1521


de.intarsys.pdf.content.common.CSCreator

(continued from last page)

a constant for the ease of circle creation with beziers


Constant value: 0.5522848

VALUE_COLOR_PRECISION
public static final int VALUE_COLOR_PRECISION

Constant value: 3

VALUE_COORDINATE_PRECISION
public static final int VALUE_COORDINATE_PRECISION

Constant value: 3

VALUE_DASH_PRECISION
public static final int VALUE_DASH_PRECISION

Constant value: 2

VALUE_FACTOR_PRECISION
public static final int VALUE_FACTOR_PRECISION

Constant value: 4

VALUE_FLATNESS_PRECISION
public static final int VALUE_FLATNESS_PRECISION

Constant value: 3

VALUE_FONT_PRECISION
public static final int VALUE_FONT_PRECISION

Constant value: 2

VALUE_GRAY_PRECISION
public static final int VALUE_GRAY_PRECISION

Constant value: 3

VALUE_WIDTH_PRECISION
public static final int VALUE_WIDTH_PRECISION

Constant value: 3

Page 210 of 1521


de.intarsys.pdf.content.common.CSCreator

(continued from last page)

Methods
createFromContent
public static CSCreator createFromContent(CSContent content,
IResourcesProvider resourcesProvider)

Create a CSCreator on an existing CSContent. The content may be read from a PDPage or a PDForm or can be
completely new.

This is the most basic factory method where you have the freedom to decide where the content comes from, where the
resources come frome and wher the content will be used.

Parameters:
content - The content stream to write to.
resourcesProvider - The provider for the PDResources that contain the resources referenced in the CSContent.

Returns:
The new CSCreator

createNew
public static CSCreator createNew(IContentStreamProvider provider)

Create a CSCreator on a newly created CSContent. The content is linked with the IContentStreamProvider and
flushed to it when calling "flush".

Parameters:
provider - The provider whose content stream will be replaced with the result of this CSCreator

Returns:
The new CSCreator

createNewDetached
public static CSCreator createNewDetached(IResourcesProvider provider)

Create a CSCreator on a newly created CSContent. The content is not linked with the provider, which is only used the a
IResourcesProvider. The resulting content can be accessed using "getContent".

Parameters:
provider - The provider for resources within the new CSContent.

Returns:
The new CSCreator

createFromProvider
public static CSCreator createFromProvider(IContentStreamProvider provider)

Create a CSCreator on an existing CSContent that will be read from the IContentStreamProvider. The old contents
will be preserved, all operations are concatenated. The content is linked with the IContentStreamProvider and flushed
to it when calling "flush".

Parameters:
provider - The provider whose content stream will be replaced with the result of this CSCreator

Returns:
The new CSCreator

Page 211 of 1521


de.intarsys.pdf.content.common.CSCreator

open
public void open(ICSInterpreter pInterpreter)

compatibilityBegin
public void compatibilityBegin()

compatibilityEnd
public void compatibilityEnd()

copy
public void copy(CSContent otherContent)

Copy all operations from otherContent to this.

Currently no resources are copied for otherContent

Parameters:
otherContent - The source of the graphic operations.

doShading
public void doShading(COSName name,
PDShading shading)

doXObject
public void doXObject(COSName name,
PDXObject xObject)

flush
public void flush()

Flush all pending operations on the stream.

This must be called before the getContent operation is valid.

close
public void close()

Page 212 of 1521


de.intarsys.pdf.content.common.CSCreator

(continued from last page)

getContent
public CSContent getContent()

The CSContent we are working on. After calling flush the CSContent contains all operations stemming from calls to
this.

Returns:
The CSContent we are working on.

getResourcesProvider
public IResourcesProvider getResourcesProvider()

The IResourcesProvider associated with this.

Returns:
The IResourcesProvider associated with this.

inlineImage
public void inlineImage(PDImage img)

markedContentBegin
public void markedContentBegin(COSName tag)

markedContentBeginProperties
public void markedContentBeginProperties(COSName tag,
COSName resourceName,
COSDictionary properties)

markedContentEnd
public void markedContentEnd()

markedContentPoint
public void markedContentPoint(COSName tag)

markedContentPointProperties
public void markedContentPointProperties(COSName tag,
COSName resourceName,
COSDictionary properties)

Page 213 of 1521


de.intarsys.pdf.content.common.CSCreator

pathClipEvenOdd
public void pathClipEvenOdd()

pathClipNonZero
public void pathClipNonZero()

pathClose
public void pathClose()

pathCloseFillStrokeEvenOdd
public void pathCloseFillStrokeEvenOdd()

pathCloseFillStrokeNonZero
public void pathCloseFillStrokeNonZero()

pathCloseStroke
public void pathCloseStroke()

pathEnd
public void pathEnd()

pathFillEvenOdd
public void pathFillEvenOdd()

pathFillNonZero
public void pathFillNonZero()

pathFillStrokeEvenOdd
public void pathFillStrokeEvenOdd()

Page 214 of 1521


de.intarsys.pdf.content.common.CSCreator

(continued from last page)

pathFillStrokeNonZero
public void pathFillStrokeNonZero()

pathStroke
public void pathStroke()

penCircle
public void penCircle(float x,
float y,
float r)

Draw a circle. The center of the circle is at x, y in user space. r defines the radius.

Parameters:
x - The x coordinate of the center.
y - The y coordinate of the center.
r - The radius

penCurveToC
public void penCurveToC(float x1,
float y1,
float x2,
float y2,
float x3,
float y3)

penCurveToV
public void penCurveToV(float x2,
float y2,
float x3,
float y3)

penCurveToY
public void penCurveToY(float x1,
float y1,
float x3,
float y3)

Page 215 of 1521


de.intarsys.pdf.content.common.CSCreator

(continued from last page)

penEllipse
public void penEllipse(float x,
float y,
float rx,
float ry)

Draw an ellipse. The center of the ellipse is at x, y in user space. rx and ry define the radius in x and y direction
respectively.

Parameters:
x - The x coordinate of the center.
y - The y coordinate of the center.
rx - The radius in x direction
ry - The radius in y direction

penLineTo
public void penLineTo(float x,
float y)

penMoveTo
public void penMoveTo(float x,
float y)

penRectangle
public void penRectangle(float x,
float y,
float w,
float h)

restoreState
public void restoreState()

saveState
public void saveState()

setLineDash
public void setLineDash(float unitsOn,
float unitsOff,
float phase)

Convenience method to access "setLineDash".

Parameters:

Page 216 of 1521


de.intarsys.pdf.content.common.CSCreator

(continued from last page)


unitsOn
unitsOff
phase

setExtendedState
public void setExtendedState(COSName name,
PDExtGState gstate)

setFlatnessTolerance
public void setFlatnessTolerance(float flatness)

setLineCap
public void setLineCap(int style)

setLineDash
public void setLineDash(float[] pattern,
float phase)

setLineJoin
public void setLineJoin(int style)

setLineWidth
public void setLineWidth(float w)

setMiterLimit
public void setMiterLimit(float miterLimit)

setNonStrokeColorCMYK
public void setNonStrokeColorCMYK(float c,
float m,
float y,
float k)

Page 217 of 1521


de.intarsys.pdf.content.common.CSCreator

(continued from last page)

setNonStrokeColorGray
public void setNonStrokeColorGray(float gray)

setNonStrokeColorRGB
public void setNonStrokeColorRGB(float red,
float green,
float blue)

setNonStrokeColorSpace
public void setNonStrokeColorSpace(COSName name,
PDColorSpace colorSpace)

setNonStrokeColorValues
public void setNonStrokeColorValues(float[] values)

setNonStrokeColorValues
public void setNonStrokeColorValues(float[] values,
COSName name,
PDPattern pattern)

setRenderingIntent
public void setRenderingIntent(COSName intent)

setStrokeColorCMYK
public void setStrokeColorCMYK(float cyan,
float magenta,
float yellow,
float key)

setStrokeColorGray
public void setStrokeColorGray(float gray)

Page 218 of 1521


de.intarsys.pdf.content.common.CSCreator

(continued from last page)

setStrokeColorRGB
public void setStrokeColorRGB(float red,
float green,
float blue)

setStrokeColorSpace
public void setStrokeColorSpace(COSName name,
PDColorSpace colorSpace)

setStrokeColorValues
public void setStrokeColorValues(float[] values)

setStrokeColorValues
public void setStrokeColorValues(float[] values,
COSName name,
PDPattern pattern)

textMoveTo
public void textMoveTo(float x,
float y)

textMove
public void textMove(float dx,
float dy)

textShow
public void textShow(byte[] text,
int offset,
int length)

textBegin
public void textBegin()

Page 219 of 1521


de.intarsys.pdf.content.common.CSCreator

(continued from last page)

textEnd
public void textEnd()

textLineMove
public void textLineMove(float dx,
float dy)

textLineMoveSetLeading
public void textLineMoveSetLeading(float dx,
float dy)

Move the current text line by dx, dy. Set the current leading to the dy offset.

PDF graphics operator "TD"

Parameters:
dx - The x offset for the new glyph starting point.
dy - The y offset for the new glyph starting point.

textLineMoveTo
public void textLineMoveTo(float x,
float y)

Move the current text line to absolute position x, y.

PDF graphics operator "Td"

textLineNew
public void textLineNew()

textSetCharSpacing
public void textSetCharSpacing(float charSpace)

textSetFont
public void textSetFont(COSName name,
PDFont font,
float size)

textSetHorizontalScaling
public void textSetHorizontalScaling(float scale)

Page 220 of 1521


de.intarsys.pdf.content.common.CSCreator

textSetLeading
public void textSetLeading(float leading)

textSetRenderingMode
public void textSetRenderingMode(int rendering)

textSetRise
public void textSetRise(float rise)

textSetTransform
public void textSetTransform(float a,
float b,
float c,
float d,
float e,
float f)

textSetWordSpacing
public void textSetWordSpacing(float wordSpace)

textT3SetGlyphWidth
public void textT3SetGlyphWidth(float x,
float y)

textT3SetGlyphWidthBB
public void textT3SetGlyphWidthBB(float x,
float y,
float llx,
float lly,
float urx,
float ury)

Page 221 of 1521


de.intarsys.pdf.content.common.CSCreator

(continued from last page)

transform
public void transform(float a,
float b,
float c,
float d,
float e,
float f)

getContentStreamProvider
public IContentStreamProvider getContentStreamProvider()

Page 222 of 1521


de.intarsys.pdf.content.common.CSDeviceTools

de.intarsys.pdf.content.common
Class CSDeviceTools
java.lang.Object
|
+-de.intarsys.pdf.content.common.CSDeviceTools

public class CSDeviceTools


extends Object

A tool class for handling with ICSDevice.

Constructor Summary
public CSDeviceTools()

Method Summary
static void setNonStrokeColor(ICSDevice device, float[] color)

static void setStrokeColor(ICSDevice device, float[] color)

Constructors
CSDeviceTools
public CSDeviceTools()

Methods
setNonStrokeColor
public static void setNonStrokeColor(ICSDevice device,
float[] color)

setStrokeColor
public static void setStrokeColor(ICSDevice device,
float[] color)

Page 223 of 1521


de.intarsys.pdf.content.common.CSPrettyPrinter

de.intarsys.pdf.content.common
Class CSPrettyPrinter
java.lang.Object
|
+-de.intarsys.pdf.content.common.CSPrettyPrinter

public class CSPrettyPrinter


extends Object

A simple pretty printer for content streams.

Constructor Summary
public CSPrettyPrinter()

Method Summary
String getValue()

boolean isCreateComment()

boolean isCreateIndent()

boolean isCreateLineSeparator()

void print(CSContent content)

void setCreateComment(boolean createComment)

void setCreateIndent(boolean createIndent)

void setCreateLineSeparator(boolean separateLines)

Constructors
CSPrettyPrinter
public CSPrettyPrinter()

Methods
getValue
public String getValue()

Page 224 of 1521


de.intarsys.pdf.content.common.CSPrettyPrinter

(continued from last page)

print
public void print(CSContent content)

isCreateComment
public boolean isCreateComment()

setCreateComment
public void setCreateComment(boolean createComment)

isCreateLineSeparator
public boolean isCreateLineSeparator()

setCreateLineSeparator
public void setCreateLineSeparator(boolean separateLines)

isCreateIndent
public boolean isCreateIndent()

setCreateIndent
public void setCreateIndent(boolean createIndent)

Page 225 of 1521


Package
de.intarsys.pdf.cos
This package implements the low level document and its datatypes according to the pdf specification.

Every PDF document is finally composed using COS primitive and composite objects. These objects are aggregated to a
COSDocument. The available primitives are

• Boolean: true or false


• Name: A special unique string like object, most often used as a key for dictionaries.
• Fixed: A fixed point real number.
• Integer: An integer number
• String: A string object
COS objects are composed using

• Array: A dynamic indexed collection implementation.


• Dictionary: A associative (Map) data structure.
Kind of hybrid structure is a

• Stream: A sequence of bytes, combined with a dictionary with additional information about the stream itself.

This implementation uses a special object representing "null", COSNull. A lookup in a composite will never return an ordinary
Java null, always COSNull, so you are never forced to check (obj == null || obj.isFoo()). Another useful convention is the
"marshalling" using the "as" flavor of methods. This methods will return either Java "null" or an instance of the requested type.
These conventions help around the sometimes lazy implemented data structures of the PDF documents available out there.

In a COS structure, other standalone objects and substructures can be referenced. This is represented using COSIndirectObject. An
indirect object is not returned by the standard accessors or iterators from composite COS objects, you will always receive the
dereferenced COS object. To access the reference itself, you have to use the "basic" flavor of methods.

Based on these purely technical objects without PDF domain specific behavior the meaningful data types like "Rectangle", "Page"
and so on are defined. This is reflected in the framework provided by COSBasedObject, the super class for all PDF domain objects.
Only a few are defined directly in the COS level itself, the most of them are found in the "pd" package.

While this seems not to be too complicated, this implementation is a quite complex and powerful one, supporting things like

• update propagation
• lazy reading
• swapping
• state management (for example for simple undo)
• preserve COS invariants that in most implementations lead to failures in the resulting documents that are hard to debug, like
constraints on containement, identity etc.

Page 226 of 1521


de.intarsys.pdf.cos.COSArray

de.intarsys.pdf.cos
Class COSArray
java.lang.Object
|
+-de.intarsys.pdf.cos.COSDocumentElement
|
+-de.intarsys.pdf.cos.COSObject
|
+-de.intarsys.pdf.cos.COSCompositeObject
|
+-de.intarsys.pdf.cos.COSArray
All Implemented Interfaces:
ICOSExceptionHandler, de.intarsys.tools.component.ISaveStateSupport, IAttributeSupport, ICOSContainer

public class COSArray


extends COSCompositeObject

A COSArray represents an indexed collection of COSDocumentElement instances.

Using the standard access methods, always "dereferenced" COSObject instances are returned. Use the "basic" falvor of methods to
access the optional COSIndirectObject.

Method Summary
Object accept(ICOSObjectVisitor visitor)

COSArray add(COSObject object)


Add a COSObject to the collection.

COSArray add(int index, COSObject object)


Add a COSObject to the collection.

COSArray asArray()

COSArray basicAddSilent(COSDocumentElement element)


Add a document element (an object or a reference) to the collection.

COSDocumentElement basicGet(int index)


Get the COSDocumentElement (an object or a reference) from this at the specified index.

java.util.Iterator basicIterator()
An iterator that returns all contained COSDocumentElement instances without
dereferencing.

void clear()
Remove all elements from this.

COSObject copyDeep(java.util.Map copied)

COSObject copyShallow()

static COSArray create()


Create an empty COSArray.

Page 227 of 1521


de.intarsys.pdf.cos.COSArray

static COSArray create(int size)


Create an empty COSArray with a preallocated size.

static COSArray createWith(float a, float b, float c, float d)


Shortcut for fast creation of rectangle arrays

static COSArray createWith(float a, float b, float c, float d, float e, float f)


Shortcut for fast creation of matrix arrays

boolean equals(Object o)

COSObject get(int index)


The COSObject at the given index.

java.util.List getObjects()
A copy of all COSObject's in this.

int hashCode()
ATTENTION: this implementation returns a hash code that does not remain constant when
manipulating the arrays content

int indexOf(COSObject object)


The index of object within this or -1 if not found.

boolean isEmpty()
true if this.size() == 0.

java.util.Iterator iterator()

COSIndirectObject referenceIndirect(COSObject object)

boolean remove(COSObject object)


Remove object from this.

COSObject remove(int index)


Remove the object at index from the collection.

void restoreState(Object object)

Object saveState()

COSObject set(int i, COSObject object)


Replace the object at index i with object.

int size()
The number of elements in this.

Methods
create
public static COSArray create()

Create an empty COSArray.

Page 228 of 1521


de.intarsys.pdf.cos.COSArray

(continued from last page)

Returns:
Create an empty COSArray.

create
public static COSArray create(int size)

Create an empty COSArray with a preallocated size.

Returns:
Create an empty COSArray.

createWith
public static COSArray createWith(float a,
float b,
float c,
float d)

Shortcut for fast creation of rectangle arrays

Parameters:
a
b
c
d

Returns:
a new COSArray

createWith
public static COSArray createWith(float a,
float b,
float c,
float d,
float e,
float f)

Shortcut for fast creation of matrix arrays

Parameters:
a
b
c
d
e
f

Returns:
a new COSArray

getObjects
public java.util.List getObjects()

A copy of all COSObject's in this.

Indirect objects and dangling references are handled by this method.

Page 229 of 1521


de.intarsys.pdf.cos.COSArray

(continued from last page)

Returns:
A copy of all COSObject's in this.

accept
public Object accept(ICOSObjectVisitor visitor)
throws COSVisitorException

Accept a visitor object. The receiver selects the correct implementation in the visitor by "double dispatching".

add
public COSArray add(COSObject object)

Add a COSObject to the collection.

This method takes care of change propagation for incremental writing.

this method should be used by the application level programmer to ensure he deals not with references.

Parameters:
object - the object to be added

Returns:
this

add
public COSArray add(int index,
COSObject object)

Add a COSObject to the collection.

This method takes care of change propagation for incremental writing.

this method should be used by the application level programmer to ensure he deals not with references.

Parameters:
index - The index where to insert object
object - the object to be added

Returns:
this

basicAddSilent
public COSArray basicAddSilent(COSDocumentElement element)

Add a document element (an object or a reference) to the collection.

The change is not propagated.This should not be used by the application level programmer. It is public for package
visibility reasons.

Parameters:
element - the element to be added

Returns:
The receiver.

Page 230 of 1521


de.intarsys.pdf.cos.COSArray

(continued from last page)

basicGet
public COSDocumentElement basicGet(int index)

Get the COSDocumentElement (an object or a reference) from this at the specified index.

This method should only be used for low level programming.

Parameters:
index - The index into this

Returns:
Get the COSDocumentElement (an object or a reference) from this at the specified index.

basicIterator
public java.util.Iterator basicIterator()

An iterator that returns all contained COSDocumentElement instances without dereferencing.

This should be used in low level programming.

Returns:
An iterator that returns all contained COSDocumentElement instances without dereferencing.

clear
public void clear()

Remove all elements from this.

copyShallow
public COSObject copyShallow()

Make a copy of the receiver.

A copy is made of the receiver and after this recursively of all not indirect objects.

Be careful when copying objects, as there are semantics that may NOT be recognized by this method.

equals
public boolean equals(Object o)

get
public COSObject get(int index)

The COSObject at the given index. Any index outisde the valid array range results in COSNull (compare Adobe Core ApI
Reference).

Parameters:
index - The index of the COSObject to select from this.

Returns:
The COSObject at the given index or COSNull.

Page 231 of 1521


de.intarsys.pdf.cos.COSArray

hashCode
public int hashCode()

ATTENTION: this implementation returns a hash code that does not remain constant when manipulating the arrays content

See Also:
Object.hashCode()

indexOf
public int indexOf(COSObject object)

The index of object within this or -1 if not found.

Parameters:
object - The object to be searched within this.

Returns:
The index of object within this or -1 if not found.

iterator
public java.util.Iterator iterator()

An iterator over contained objects. The iterator is an empty iterator if this is not a container.

This iterator returns only COSObject instances, references are dereferenced.

referenceIndirect
public COSIndirectObject referenceIndirect(COSObject object)

Change the reference to the object contained in this to an indirect one via reference.

This method must be redefined by all containers to reflect the new reference type in their child references.

This event is delegated to the document to create the correct state for a new indirect object. If a document is not yet present,
the state is changed when the COSObject (s) are added to the document finally. This can happen when constructing a
COSObject graph "offline" and later add it to the document.

From the COS invariants you can be sure that the object referenced by ref is contained in this at most once

remove
public boolean remove(COSObject object)

Remove object from this. If object is not contained, nothing happens.

This method cycles all elements wich may cause heavy lazy loading.

Parameters:
object - The object to remove from this.

Returns:
true if object was removed.

Page 232 of 1521


de.intarsys.pdf.cos.COSArray

(continued from last page)

remove
public COSObject remove(int index)

Remove the object at index from the collection.

Parameters:
index - The index of the object to remove from the collection.

Returns:
The object previously stored at the index.

set
public COSObject set(int i,
COSObject object)

Replace the object at index i with object.

Parameters:
i - The index
object - The object to put at the specified index

Returns:
The previuosly referenced object

size
public int size()

The number of elements in this.

Returns:
The number of elements in this.

isEmpty
public boolean isEmpty()

true if this.size() == 0.

Returns:
true if this.size() == 0.

copyDeep
public COSObject copyDeep(java.util.Map copied)

Make a deep copy of the receiver within the same document. The result is a "PDF semantic" deep copy, implementation
artifacts as "attributes" and listeners are NOT copied.

The copied map is used to identify objects copied in earlier runs of this method to avoid duplicating resources used in
different copy targets (for example the pages of a document). copied is modified while executing copyDeep and contains
a mapping from indirect objects in the original document to copied objects.

The algorithm copies this along with all outgoing references (recursively).

Object identity is preserved.

Be careful when copying objects, as there are semantics that may NOT be recognized by this method.

Page 233 of 1521


de.intarsys.pdf.cos.COSArray

restoreState
public void restoreState(Object object)

saveState
public Object saveState()

asArray
public COSArray asArray()

this as a COSArray or null

Page 234 of 1521


de.intarsys.pdf.cos.COSBasedObject

de.intarsys.pdf.cos
Class COSBasedObject
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


COSObjectStream, PDObject, CIDSystemInfo, CIDToGIDMap, CMap, FDObject, COSEncryption,
COSCatalog, COSInfoDict, COSTrailer, CDSBase

public abstract class COSBasedObject


extends Object
implements IAttributeSupport, ICOSObjectListener

The abstract superclass for all objects/data structures that are build on the basic COSObject types.

The base COSObject will represent the state while this wrapper will provide the behavior.

The COSBasedObject and its base COSObject are always closely related, all changes are immediately reflected in both objects.

The COSBasedObject uses a META framework that ensures identity (you will always get the identical COSBasedObject for a
COSObject created via META) and defines the lifecycle of the COSBasedObject. A COSBasedObject should always be created
using META.createNew or META.createFromCos.

A COSBasedObject based on a COSDictionary can use some convenience methods for generic access to its fields. As a
convention, filed names are always declared with the associated COSBasedObject as public static final COSName DK_.

The COSBasedObject implements IAttributeSupport. Client code can use this feature to transparently associate objects with
objects from client code, for example for caching or client defined relationships.

Nested Class Summary


class COSBasedObject.MetaClass
COSBasedObject.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
void changed(COSObject pObject, Object slot, Object oldValue, Object
newValue)

COSArray cosGetArray()
Get the base object as a COSArray.

COSDictionary cosGetDict()
Get the base object as a COSDictionary.

Page 235 of 1521


de.intarsys.pdf.cos.COSBasedObject

COSDocument cosGetDoc()
The COSDocument for this.

COSObject cosGetField(COSName name)


The COSObject associated with name in the receiver or COSNull.

COSObject cosGetObject()
The base COSObject for this.

COSStream cosGetStream()
Get the base object as a COSStream.

boolean cosHasField(COSName name)


Answer true if this has a field named name.

COSObject cosRemoveField(COSName name)


Remove a field in this.

COSObject cosSetField(COSName name, COSObject cosObj)


Set a field value in this.

Object getAttribute(Object key)

boolean getFieldBoolean(COSName name, boolean defaultValue)


The value of a field within this as a boolean or the defaultValue if not found or not a
COSBoolean.

CDSDate getFieldDate(COSName name, CDSDate defaultValue)


The value of a field within this as a CDSDate or the defaultValue if not found or not a
COSString.

float getFieldFixed(COSName name, float defaultValue)


The value of a field within this as a float or the defaultValue if not found or not a
COSNumber.

float[] getFieldFixedArray(COSName name, float[] defaultValue)


The value of a field within this as a float[] or the defaultValue if not found or not a
COSArray.

int getFieldInt(COSName name, int defaultValue)


The value of a field within this as a int or the defaultValue if not found or not a
COSNumber.

String getFieldMLString(COSName name, String defaultValue)


The value of a field within this as a String or the defaultValue if not found or not a
COSString.

String getFieldString(COSName name, String defaultValue)


The value of a field within this as a String or the defaultValue if not found or not a
COSString.

void invalidateCaches()
Invalidate all local caches as the base object may have changed.

Object removeAttribute(Object key)

Object setAttribute(Object key, Object value)

Page 236 of 1521


de.intarsys.pdf.cos.COSBasedObject

void setFieldBoolean(COSName name, boolean value)


Set the value of field namewithin this.

void setFieldFixed(COSName name, float value)


Set the value of field namewithin this.

void setFieldInt(COSName name, int value)


Set the value of field namewithin this.

void setFieldMLString(COSName name, String value)


Set the value of field namewithin this.

void setFieldName(COSName name, String value)


Set the value of field namewithin this.

void setFieldObject(COSName name, COSBasedObject value)


Set the value of field namewithin this.

void setFieldString(COSName name, String value)


Set the value of field namewithin this.

String toString()

Fields
META
public static final de.intarsys.pdf.cos.COSBasedObject.MetaClass META

The meta class instance

Methods
changed
public void changed(COSObject pObject,
Object slot,
Object oldValue,
Object newValue)

cosGetArray
public COSArray cosGetArray()

Get the base object as a COSArray.

This will throw a java.lang.ClassCastException if the base type is not appropriate!

Returns:
Get the base object as a COSArray.

cosGetDict
public COSDictionary cosGetDict()

Page 237 of 1521


de.intarsys.pdf.cos.COSBasedObject

(continued from last page)

Get the base object as a COSDictionary.

This will throw a java.lang.ClassCastException if the base type is not appropriate!

Returns:
Get the base object as a COSDictionary.

cosGetDoc
public COSDocument cosGetDoc()

The COSDocument for this.

Returns:
The COSDocument for this.

cosGetField
public COSObject cosGetField(COSName name)

The COSObject associated with name in the receiver or COSNull.

This method requires the base object to be a COSDictionary.

Parameters:
name - The COSDictionary field to read

Returns:
The COSObject associated with name in the receiver or COSNull.

cosGetObject
public COSObject cosGetObject()

The base COSObject for this.

Returns:
The base COSObject for this.

cosGetStream
public COSStream cosGetStream()

Get the base object as a COSStream.

This will throw a java.lang.ClassCastException if the base type is not appropriate!

Returns:
Get the base object as a COSStream.

cosHasField
public boolean cosHasField(COSName name)

Answer true if this has a field named name.

This method requires the base object to be a COSDictionary.

Parameters:

Page 238 of 1521


de.intarsys.pdf.cos.COSBasedObject

(continued from last page)

name - the field to check

Returns:
Answer true if this has a field named name.

cosRemoveField
public COSObject cosRemoveField(COSName name)

Remove a field in this. The previously associated object is returned.

This method requires the base object to be a COSDictionary.

Parameters:
name - the field to remove from the receiver

Returns:
The previously associated object is returned.

cosSetField
public COSObject cosSetField(COSName name,
COSObject cosObj)

Set a field value in this. The previously associated object is returned.

This method requires the base object to be a COSDictionary.

Parameters:
name - The field to set
cosObj - The object to set in the field

Returns:
The previously associated object is returned.

getAttribute
public Object getAttribute(Object key)

getFieldBoolean
public boolean getFieldBoolean(COSName name,
boolean defaultValue)

The value of a field within this as a boolean or the defaultValue if not found or not a COSBoolean.

This method requires the base object to be a COSDictionary.

Parameters:
name - The name of the field.
defaultValue - The default value to return if field is not found or not of appropriate type.

Returns:
The value of a field within this as a boolean

Page 239 of 1521


de.intarsys.pdf.cos.COSBasedObject

(continued from last page)

getFieldDate
public CDSDate getFieldDate(COSName name,
CDSDate defaultValue)

The value of a field within this as a CDSDate or the defaultValue if not found or not a COSString.

This method requires the base object to be a COSDictionary.

Parameters:
name - The name of the field.
defaultValue - The default value to return if field is not found or not of appropriate type.

Returns:
The value of a field within this as a CDSDate

getFieldFixed
public float getFieldFixed(COSName name,
float defaultValue)

The value of a field within this as a float or the defaultValue if not found or not a COSNumber.

This method requires the base object to be a COSDictionary.

Parameters:
name - The name of the field.
defaultValue - The default value to return if field is not found or not of appropriate type.

Returns:
The value of a field within this as a float

getFieldFixedArray
public float[] getFieldFixedArray(COSName name,
float[] defaultValue)

The value of a field within this as a float[] or the defaultValue if not found or not a COSArray.

This method requires the base object to be a COSDictionary.

Parameters:
name - The name of the field.
defaultValue - The default value to return if field is not found or not of appropriate type.

Returns:
The value of a field within this as a float[]

getFieldInt
public int getFieldInt(COSName name,
int defaultValue)

The value of a field within this as a int or the defaultValue if not found or not a COSNumber.

This method requires the base object to be a COSDictionary.

Parameters:
name - The name of the field.
defaultValue - The default value to return if field is not found or not of appropriate type.

Page 240 of 1521


de.intarsys.pdf.cos.COSBasedObject

(continued from last page)

Returns:
The value of a field within this as a int

getFieldMLString
public String getFieldMLString(COSName name,
String defaultValue)

The value of a field within this as a String or the defaultValue if not found or not a COSString. The String is
"expanded" to containn the correct new line characters.

This method requires the base object to be a COSDictionary.

Parameters:
name - The name of the field.
defaultValue - The default value to return if field is not found or not of appropriate type.

Returns:
The value of a field within this as a String

getFieldString
public String getFieldString(COSName name,
String defaultValue)

The value of a field within this as a String or the defaultValue if not found or not a COSString.

This method requires the base object to be a COSDictionary.

Parameters:
name - The name of the field.
defaultValue - The default value to return if field is not found or not of appropriate type.

Returns:
The value of a field within this as a String

invalidateCaches
public void invalidateCaches()

Invalidate all local caches as the base object may have changed.

removeAttribute
public Object removeAttribute(Object key)

setAttribute
public Object setAttribute(Object key,
Object value)

setFieldBoolean
public void setFieldBoolean(COSName name,
boolean value)

Page 241 of 1521


de.intarsys.pdf.cos.COSBasedObject

(continued from last page)

Set the value of field namewithin this.

This method requires the base object to be a COSDictionary.

Parameters:
name - The name of the field.
value - The new value of the field.

setFieldFixed
public void setFieldFixed(COSName name,
float value)

Set the value of field namewithin this.

This method requires the base object to be a COSDictionary.

Parameters:
name - The name of the field.
value - The new value of the field.

setFieldInt
public void setFieldInt(COSName name,
int value)

Set the value of field namewithin this.

This method requires the base object to be a COSDictionary.

Parameters:
name - The name of the field.
value - The new value of the field.

setFieldMLString
public void setFieldMLString(COSName name,
String value)

Set the value of field namewithin this.

This method requires the base object to be a COSDictionary.

Parameters:
name - The name of the field.
value - The new value of the field.

setFieldName
public void setFieldName(COSName name,
String value)

Set the value of field namewithin this.

This method requires the base object to be a COSDictionary.

Parameters:
name - The name of the field.
value - The new value of the field.

Page 242 of 1521


de.intarsys.pdf.cos.COSBasedObject

(continued from last page)

setFieldString
public void setFieldString(COSName name,
String value)

Set the value of field namewithin this.

This method requires the base object to be a COSDictionary.

Parameters:
name - The name of the field.
value - The new value of the field.

setFieldObject
public void setFieldObject(COSName name,
COSBasedObject value)

Set the value of field namewithin this.

This method requires the base object to be a COSDictionary.

Parameters:
name - The name of the field.
value - The new value of the field.

toString
public String toString()

Page 243 of 1521


de.intarsys.pdf.cos.COSBasedObject.MetaClass

de.intarsys.pdf.cos
Class COSBasedObject.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass, MetaClass, MetaClass, MetaClass, MetaClass, MetaClass, MetaClass, MetaClass,
MetaClass

public static class COSBasedObject.MetaClass


extends MetaClass

The meta class implementation

Method Summary
COSBasedObject createFromCos(COSObject object)

COSBasedObject createNew()

Methods
createFromCos
public COSBasedObject createFromCos(COSObject object)

createNew
public COSBasedObject createNew()

Page 244 of 1521


de.intarsys.pdf.cos.COSBoolean

de.intarsys.pdf.cos
Class COSBoolean
java.lang.Object
|
+-de.intarsys.pdf.cos.COSDocumentElement
|
+-de.intarsys.pdf.cos.COSObject
|
+-de.intarsys.pdf.cos.COSPrimitiveObject
|
+-de.intarsys.pdf.cos.COSBoolean
All Implemented Interfaces:
ICOSExceptionHandler, de.intarsys.tools.component.ISaveStateSupport

Direct Known Subclasses:


COSFalse, COSTrue

public abstract class COSBoolean


extends COSPrimitiveObject

Abstract class for the representation of boolean values

Field Summary
public static final FALSE

public static final TRUE

Method Summary
Object accept(ICOSObjectVisitor visitor)

COSBoolean asBoolean()

abstract boolean booleanValue()


The boolean value for this.

static COSBoolean create(boolean value)

Fields
TRUE
public static final de.intarsys.pdf.cos.COSBoolean TRUE

Page 245 of 1521


de.intarsys.pdf.cos.COSBoolean

(continued from last page)

FALSE
public static final de.intarsys.pdf.cos.COSBoolean FALSE

Methods
create
public static COSBoolean create(boolean value)

accept
public Object accept(ICOSObjectVisitor visitor)
throws COSVisitorException

Accept a visitor object. The receiver selects the correct implementation in the visitor by "double dispatching".

booleanValue
public abstract boolean booleanValue()

The boolean value for this.

Returns:
The boolean value for this.

asBoolean
public COSBoolean asBoolean()

Page 246 of 1521


de.intarsys.pdf.cos.COSCatalog

de.intarsys.pdf.cos
Class COSCatalog
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.cos.COSCatalog
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class COSCatalog


extends COSBasedObject

The document catalog object of the PDF document.

Nested Class Summary


class COSCatalog.MetaClass
COSCatalog.MetaClass

Field Summary
public static final CN_Type_Catalog

public static final CN_Version_1_4


Well known attribute names

public static final DK_AcroForm

public static final DK_Dests

public static final DK_FDF

public static final DK_Metadata

public static final DK_Names

public static final DK_OpenAction

public static final DK_Outlines

public static final DK_OutputIntents

public static final DK_PageMode

public static final DK_Pages

public static final DK_PieceInfo

Page 247 of 1521


de.intarsys.pdf.cos.COSCatalog

public static final DK_Sig

public static final DK_Type

public static final DK_URI

public static final DK_Version

public static final META


The meta class instance

Method Summary
COSDictionary cosGetDests()
The /Dests field in the document catalog.

COSDictionary cosGetFDF()
The /FDF field in the document catalog.

COSDictionary cosGetNames()
The /Names field in the document catalog.

COSObject cosGetOpenAction()
The object defining the open action for the document.

COSDictionary cosGetOutline()
The /Outlines field in the document catalog.

COSDictionary cosGetSig()
The /Sig field in the document catalog.

COSDictionary cosSetDests(COSDictionary pDests)


Set the /Dests field in the document catalog.

COSDictionary cosSetFDF(COSDictionary fdfDict)


Set the /FDF field in the document catalog.

COSDictionary cosSetNames(COSDictionary pNames)


Set the /Names field in the document catalog.

COSDictionary cosSetOutline(COSDictionary dict)


Set the /Outlines field in the document catalog.

COSDictionary cosSetSig(COSDictionary sigDict)


Set the /Sig field in the document catalog.

String getPageMode()
The /PageMode field in the document catalog.

String getVersion()
The /Version field in the document catalog.

void setPageMode(String value)


Set the /PageMode field in the document catalog.

void setVersion(String value)


Set the /Version field in the document catalog.

Page 248 of 1521


de.intarsys.pdf.cos.COSCatalog

Fields
DK_AcroForm
public static final de.intarsys.pdf.cos.COSName DK_AcroForm

DK_Dests
public static final de.intarsys.pdf.cos.COSName DK_Dests

DK_FDF
public static final de.intarsys.pdf.cos.COSName DK_FDF

DK_Names
public static final de.intarsys.pdf.cos.COSName DK_Names

DK_OpenAction
public static final de.intarsys.pdf.cos.COSName DK_OpenAction

DK_Outlines
public static final de.intarsys.pdf.cos.COSName DK_Outlines

DK_Sig
public static final de.intarsys.pdf.cos.COSName DK_Sig

DK_Type
public static final de.intarsys.pdf.cos.COSName DK_Type

DK_Metadata
public static final de.intarsys.pdf.cos.COSName DK_Metadata

Page 249 of 1521


de.intarsys.pdf.cos.COSCatalog

DK_OutputIntents
public static final de.intarsys.pdf.cos.COSName DK_OutputIntents

DK_PageMode
public static final de.intarsys.pdf.cos.COSName DK_PageMode

DK_Pages
public static final de.intarsys.pdf.cos.COSName DK_Pages

DK_PieceInfo
public static final de.intarsys.pdf.cos.COSName DK_PieceInfo

CN_Type_Catalog
public static final de.intarsys.pdf.cos.COSName CN_Type_Catalog

DK_URI
public static final de.intarsys.pdf.cos.COSName DK_URI

DK_Version
public static final de.intarsys.pdf.cos.COSName DK_Version

CN_Version_1_4
public static final de.intarsys.pdf.cos.COSName CN_Version_1_4

Well known attribute names

META
public static final de.intarsys.pdf.cos.COSCatalog.MetaClass META

The meta class instance

Methods

Page 250 of 1521


de.intarsys.pdf.cos.COSCatalog

(continued from last page)

cosGetDests
public COSDictionary cosGetDests()

The /Dests field in the document catalog.

Returns:
The /Dests field in the document catalog.

cosGetFDF
public COSDictionary cosGetFDF()

The /FDF field in the document catalog.

Returns:
The /FDF field in the document catalog.

cosGetNames
public COSDictionary cosGetNames()

The /Names field in the document catalog.

Returns:
The /Names field in the document catalog.

cosSetNames
public COSDictionary cosSetNames(COSDictionary pNames)

Set the /Names field in the document catalog.

cosGetOpenAction
public COSObject cosGetOpenAction()

The object defining the open action for the document.

Returns:
COSDictionary or COSArray or COSNull if no entry defined.

cosGetOutline
public COSDictionary cosGetOutline()

The /Outlines field in the document catalog.

Returns:
The /Outlines field in the document catalog.

cosGetSig
public COSDictionary cosGetSig()

The /Sig field in the document catalog.

Returns:

Page 251 of 1521


de.intarsys.pdf.cos.COSCatalog

(continued from last page)

The /Sig field in the document catalog.

cosSetFDF
public COSDictionary cosSetFDF(COSDictionary fdfDict)

Set the /FDF field in the document catalog.

cosSetOutline
public COSDictionary cosSetOutline(COSDictionary dict)

Set the /Outlines field in the document catalog.

cosSetSig
public COSDictionary cosSetSig(COSDictionary sigDict)

Set the /Sig field in the document catalog.

getPageMode
public String getPageMode()

The /PageMode field in the document catalog.

Returns:
The /PageMode field in the document catalog.

getVersion
public String getVersion()

The /Version field in the document catalog.

Returns:
The /Version field in the document catalog.

setPageMode
public void setPageMode(String value)

Set the /PageMode field in the document catalog.

setVersion
public void setVersion(String value)

Set the /Version field in the document catalog.

cosSetDests
public COSDictionary cosSetDests(COSDictionary pDests)

Set the /Dests field in the document catalog.

Page 252 of 1521


de.intarsys.pdf.cos.COSCatalog.MetaClass

de.intarsys.pdf.cos
Class COSCatalog.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.cos.COSCatalog.MetaClass

public static class COSCatalog.MetaClass


extends COSBasedObject.MetaClass

The meta class implementation

Page 253 of 1521


de.intarsys.pdf.cos.COSCompositeObject

de.intarsys.pdf.cos
Class COSCompositeObject
java.lang.Object
|
+-de.intarsys.pdf.cos.COSDocumentElement
|
+-de.intarsys.pdf.cos.COSObject
|
+-de.intarsys.pdf.cos.COSCompositeObject
All Implemented Interfaces:
IAttributeSupport, ICOSContainer, ICOSExceptionHandler, de.intarsys.tools.component.ISaveStateSupport

Direct Known Subclasses:


COSArray, COSDictionary, COSObjectProxy, COSStream

public abstract class COSCompositeObject


extends COSObject
implements de.intarsys.tools.component.ISaveStateSupport, ICOSExceptionHandler, ICOSContainer,
IAttributeSupport

A superclass implementation for all containers of other COSObject instances.

Method Summary
void addObjectListener(ICOSObjectListener listener)

ICOSContainer associate(ICOSContainer newContainer, COSObject object)

COSDocumentElement containable(COSObject object)

COSObject copyDeep()

COSObject copyDeep(java.util.Map copied)

ICOSContainer disassociate(ICOSContainer oldContainer, COSObject object)

Object getAttribute(Object key)

boolean isObjectListenerAvailable()

boolean isPrimitive()

int referenceCount()

COSIndirectObject referenceIndirect(COSObject object)


Change the reference to the object contained in this to an indirect one via reference.

void register(COSDocumentElement object)

Page 254 of 1521


de.intarsys.pdf.cos.COSCompositeObject

Object removeAttribute(Object key)

void removeObjectListener(ICOSObjectListener listener)

ICOSContainer restoreStateContainer(ICOSContainer pContainer)

ICOSContainer saveStateContainer()

Object setAttribute(Object key, Object value)

void willChange(COSObject change)

Methods
setAttribute
public Object setAttribute(Object key,
Object value)

referenceIndirect
public COSIndirectObject referenceIndirect(COSObject object)

Change the reference to the object contained in this to an indirect one via reference.

This method must be redefined by all containers to reflect the new reference type in their child references.

This event is delegated to the document to create the correct state for a new indirect object. If a document is not yet present,
the state is changed when the COSObject (s) are added to the document finally. This can happen when constructing a
COSObject graph "offline" and later add it to the document.

From the COS invariants you can be sure that the object referenced by ref is contained in this at most once

Parameters:
object

willChange
public void willChange(COSObject change)

isPrimitive
public boolean isPrimitive()

Answer true if this object is of a primitive type

getAttribute
public Object getAttribute(Object key)

Page 255 of 1521


de.intarsys.pdf.cos.COSCompositeObject

removeAttribute
public Object removeAttribute(Object key)

addObjectListener
public void addObjectListener(ICOSObjectListener listener)

Add a listener for object changes.

isObjectListenerAvailable
public boolean isObjectListenerAvailable()

true if an ICOSObjectListener is registered. This is for test purposes.

removeObjectListener
public void removeObjectListener(ICOSObjectListener listener)

Remove a listener for object changes.

associate
public ICOSContainer associate(ICOSContainer newContainer,
COSObject object)

disassociate
public ICOSContainer disassociate(ICOSContainer oldContainer,
COSObject object)

containable
public COSDocumentElement containable(COSObject object)

copyDeep
public final COSObject copyDeep()

Make a deep copy of the receiver within the same document. The result is a "PDF semantic" deep copy, implementation
artifacts as "attributes" and listeners are NOT copied.

The algorithm copies this along with all outgoing references (recursively).

Object identity is preserved.

Be careful when copying objects, as there are semantics that may NOT be recognized by this method.

Page 256 of 1521


de.intarsys.pdf.cos.COSCompositeObject

(continued from last page)

copyDeep
public COSObject copyDeep(java.util.Map copied)

Make a deep copy of the receiver within the same document. The result is a "PDF semantic" deep copy, implementation
artifacts as "attributes" and listeners are NOT copied.

The copied map is used to identify objects copied in earlier runs of this method to avoid duplicating resources used in
different copy targets (for example the pages of a document). copied is modified while executing copyDeep and contains
a mapping from indirect objects in the original document to copied objects.

The algorithm copies this along with all outgoing references (recursively).

Object identity is preserved.

Be careful when copying objects, as there are semantics that may NOT be recognized by this method.

register
public void register(COSDocumentElement object)

referenceCount
public int referenceCount()

saveStateContainer
public ICOSContainer saveStateContainer()

restoreStateContainer
public ICOSContainer restoreStateContainer(ICOSContainer pContainer)

Page 257 of 1521


de.intarsys.pdf.cos.COSDictionary

de.intarsys.pdf.cos
Class COSDictionary
java.lang.Object
|
+-de.intarsys.pdf.cos.COSDocumentElement
|
+-de.intarsys.pdf.cos.COSObject
|
+-de.intarsys.pdf.cos.COSCompositeObject
|
+-de.intarsys.pdf.cos.COSDictionary
All Implemented Interfaces:
ICOSExceptionHandler, de.intarsys.tools.component.ISaveStateSupport, IAttributeSupport, ICOSContainer

public class COSDictionary


extends COSCompositeObject

Represents a collection of associations (Map).

The keys of the association are COSName objects, the value may be any COSDocumentElement

Nested Class Summary


class COSDictionary.Entry
COSDictionary.Entry

Method Summary
Object accept(ICOSObjectVisitor visitor)

void addAll(COSDictionary dict)


Add all objects from dict.

void addIfAbsent(COSDictionary dict)


Add all values from dict that are not yet defined in the receiver.

COSDictionary asDictionary()

java.util.Iterator basicEntryIterator()
An iterator over all entries.

COSDocumentElement basicGet(COSName key)


The COSDocumentElement associated with key.

java.util.Iterator basicIterator()
An iterator over all values.

COSDocumentElement basicPutSilent(COSName key, COSDocumentElement element)


Add a document element to the collection.

void clear()
Remove all associations from the receiver.

Page 258 of 1521


de.intarsys.pdf.cos.COSDictionary

boolean containsKey(COSName key)


Answer true if key is a valid key in the collection .

boolean containsValue(COSObject obj)


Answer true if obj is contained in the collection

COSObject copyDeep(java.util.Map copied)

COSObject copyShallow()

static COSDictionary create()


Create an empty COSDictionary.

static COSDictionary create(int size)


Create an empty COSDictionary with an initial capacity.

java.util.Iterator entryIterator()
An iterator over all entries, returning dereferenced entries ( COSObject).

COSObject get(COSName key)


The COSObject associated with key.

java.util.Iterator iterator()

COSObject keyOf(COSObject obj)


The key of obj when it is contained in this or COSNull.

java.util.Set keySet()
The set of keys.

COSObject put(COSName key, COSObject object)


Add an association to the collection.

COSIndirectObject referenceIndirect(COSObject object)

COSObject remove(COSName key)


Remove the element from the collection associated with key.

void restoreState(Object object)

Object saveState()

int size()
The number of elements in this.

java.util.List values()
A list of COSObject instances within this.

Methods
create
public static COSDictionary create()

Create an empty COSDictionary.

Page 259 of 1521


de.intarsys.pdf.cos.COSDictionary

(continued from last page)

Returns:
Create an empty COSDictionary.

create
public static COSDictionary create(int size)

Create an empty COSDictionary with an initial capacity.

Returns:
Create an empty COSDictionary with an initial capacity.

accept
public Object accept(ICOSObjectVisitor visitor)
throws COSVisitorException

Accept a visitor object. The receiver selects the correct implementation in the visitor by "double dispatching".

addAll
public void addAll(COSDictionary dict)

Add all objects from dict. Associations already available in this are replaced with new content .

Parameters:
dict - The collection of associations to add to this.

addIfAbsent
public void addIfAbsent(COSDictionary dict)

Add all values from dict that are not yet defined in the receiver.

Parameters:
dict - The dictionary with the associations to add.

asDictionary
public COSDictionary asDictionary()

basicEntryIterator
public java.util.Iterator basicEntryIterator()

An iterator over all entries. The value of the entries returned are the not - dereferenced elements.

Returns:
An interator over all entries.

basicGet
public COSDocumentElement basicGet(COSName key)

The COSDocumentElement associated with key.

Page 260 of 1521


de.intarsys.pdf.cos.COSDictionary

(continued from last page)

Parameters:
key - The name to lookup

Returns:
The COSDocumentElement associated with key.

basicIterator
public java.util.Iterator basicIterator()

An iterator over all values. The objects returned are not dereferenced.

Returns:
An iterator over all values.

basicPutSilent
public COSDocumentElement basicPutSilent(COSName key,
COSDocumentElement element)

Add a document element to the collection.

The element is inserted without change propagation.

This should not be used by the application level programmer. It is public for package visibility reasons.

Parameters:
key - The key where to store the new element.
element - The COSDocumentElement to store.

Returns:
The COSDocumentElement associated with key so far.

clear
public void clear()

Remove all associations from the receiver.

containsKey
public boolean containsKey(COSName key)

Answer true if key is a valid key in the collection .

Parameters:
key - The key whose existence is to be checked.

Returns:
Answer true if key is a valid key in the collection .

containsValue
public boolean containsValue(COSObject obj)

Answer true if obj is contained in the collection

Parameters:

Page 261 of 1521


de.intarsys.pdf.cos.COSDictionary

(continued from last page)

obj - The object to look up in the collection

Returns:
Answer true if obj is contained in the collection

copyDeep
public COSObject copyDeep(java.util.Map copied)

Make a deep copy of the receiver within the same document. The result is a "PDF semantic" deep copy, implementation
artifacts as "attributes" and listeners are NOT copied.

The copied map is used to identify objects copied in earlier runs of this method to avoid duplicating resources used in
different copy targets (for example the pages of a document). copied is modified while executing copyDeep and contains
a mapping from indirect objects in the original document to copied objects.

The algorithm copies this along with all outgoing references (recursively).

Object identity is preserved.

Be careful when copying objects, as there are semantics that may NOT be recognized by this method.

copyShallow
public COSObject copyShallow()

Make a copy of the receiver.

A copy is made of the receiver and after this recursively of all not indirect objects.

Be careful when copying objects, as there are semantics that may NOT be recognized by this method.

entryIterator
public java.util.Iterator entryIterator()

An iterator over all entries, returning dereferenced entries ( COSObject).

Returns:
An interator over all entries, returning dereferenced entries.

get
public COSObject get(COSName key)

The COSObject associated with key.

Parameters:
key - The key to lookup

Returns:
The COSObject associated with key.

iterator
public java.util.Iterator iterator()

An iterator over contained objects. The iterator is an empty iterator if this is not a container.

This iterator returns only COSObject instances, references are dereferenced.

Page 262 of 1521


de.intarsys.pdf.cos.COSDictionary

keyOf
public COSObject keyOf(COSObject obj)

The key of obj when it is contained in this or COSNull.

Parameters:
obj - The object to look up in the collection

Returns:
The key of obj when it is contained in this or COSNull.

keySet
public java.util.Set keySet()

The set of keys. Keys are COSName instances.

Returns:
The set of keys .

put
public COSObject put(COSName key,
COSObject object)

Add an association to the collection.

Parameters:
key - The key where to store the object
object - The object to store in the collection

Returns:
The COSObject associated with key so far.

referenceIndirect
public COSIndirectObject referenceIndirect(COSObject object)

Change the reference to the object contained in this to an indirect one via reference.

This method must be redefined by all containers to reflect the new reference type in their child references.

This event is delegated to the document to create the correct state for a new indirect object. If a document is not yet present,
the state is changed when the COSObject (s) are added to the document finally. This can happen when constructing a
COSObject graph "offline" and later add it to the document.

From the COS invariants you can be sure that the object referenced by ref is contained in this at most once

remove
public COSObject remove(COSName key)

Remove the element from the collection associated with key.

Parameters:
key - The key of the object to remove

Returns:

Page 263 of 1521


de.intarsys.pdf.cos.COSDictionary

(continued from last page)

The COSObject removed or null.

restoreState
public void restoreState(Object object)

saveState
public Object saveState()

size
public int size()

The number of elements in this.

Returns:
The number of elements in this.

values
public java.util.List values()

A list of COSObject instances within this.

Returns:
A list of COSObject instances within this.

Page 264 of 1521


de.intarsys.pdf.cos.COSDictionary.Entry

de.intarsys.pdf.cos
Class COSDictionary.Entry
java.lang.Object
|
+-de.intarsys.pdf.cos.COSDictionary.Entry
All Implemented Interfaces:
java.util.Map.Entry

public static class COSDictionary.Entry


extends Object
implements java.util.Map.Entry

Constructor Summary
public COSDictionary.Entry(COSName key, COSDocumentElement value)

Method Summary
Object getKey()

Object getValue()

Object setValue(Object newValue)

Constructors
COSDictionary.Entry
public COSDictionary.Entry(COSName key,
COSDocumentElement value)

Methods
getKey
public Object getKey()

getValue
public Object getValue()

Page 265 of 1521


de.intarsys.pdf.cos.COSDictionary.Entry

setValue
public Object setValue(Object newValue)

Page 266 of 1521


de.intarsys.pdf.cos.COSDocument

de.intarsys.pdf.cos
Class COSDocument
java.lang.Object
|
+-de.intarsys.pdf.cos.COSDocument
All Implemented Interfaces:
ILocatorSupport, IAttributeSupport, ICOSExceptionHandler, ICOSContainer

public class COSDocument


extends Object
implements ICOSContainer, ICOSExceptionHandler, IAttributeSupport, ILocatorSupport

This is a COS level representation of a pdf document. A COS document is made up of a collection of COSObject instances. These
objects are arranged according to the PDF file format specification.

See PDF File Format Specification [PDF].

Field Summary
public static final SLOT_DIRTY

public static final SLOT_LOCATOR

public static final SLOT_TRAILER

Method Summary
void add(COSDocumentElement element)
This should not be used by the application programmer.

void addDocumentListener(ICOSDocumentListener listener)


Add an ICOSDocumentListener to be informed about the documents events.

void addMonitor(ICOSMonitor listener)

ICOSContainer associate(ICOSContainer newContainer, COSObject object)


This method should not be used by the application programmer.

void close()
Close the document.

COSDocumentElement containable(COSObject object)


This method should not be used by the application programmer.

COSDocument copyDeep()
Make a deep copy of the receiver.

static COSDocument createFromLocator(ILocator locator)


Create a COSDocument based on a Locator.

Page 267 of 1521


de.intarsys.pdf.cos.COSDocument

static COSDocument createFromST(STDocument doc)


Create a COSDocument based on a STDocument.

static COSDocument createNew()


Create a new empty pdf COSDocument.

static COSDocument createNew(STDocType docType)


Create a new empty COSDocument.

ICOSContainer disassociate(ICOSContainer oldContainer, COSObject object)


This method should not be used by the application programmer.

IAccessPermissions getAccessPermissions()
If a document contains a permissions dictionary, it is "pushed" to this by the parser.

Object getAttribute(Object key)

COSCatalog getCatalog()
Get the root object (the catalog) for the document.

COSDocument getDoc()
This method should not be used by the application programmer.

int getIncrementalCount()
The number of versions created for this document so far.

COSInfoDict getInfoDict()
Get the info dictionary containing metadata.

ILocator getLocator()
The ILocator for this document.

String getName()
The document name.

EnumWriteMode getWriteModeHint()
The write mode to be used when the document is written the next time.

void handleException(COSRuntimeException ex)

boolean isDirty()
Answer true if the document has changes to be commited.

boolean isEncrypted()
Answer true if the document is encrypted.

boolean isNew()
Answer true if the document is new, i.e. not yet written.

boolean isReadOnly()
Answer true if the document is read only.

java.util.Iterator objects()
An iterator on all COSObject instances of this that are managed as indirect objects in the
storage layer.

int referenceCount()
This method should not be used by the application programmer.

Page 268 of 1521


de.intarsys.pdf.cos.COSDocument

COSIndirectObject referenceIndirect(COSObject object)


This method should not be used by the application programmer.

void register(COSDocumentElement object)


This method should not be used by the application programmer.

Object removeAttribute(Object key)

void removeDocumentListener(ICOSDocumentListener listener)


Remove an ICOSDocumentListener.

void removeMonitor(ICOSMonitor monitor)

void restore(ILocator locator)


Restore this from a locator.

ICOSContainer restoreStateContainer(ICOSContainer container)


This method should not be used by the application programmer.

void save()
Save the document to its current ILocator.

void save(ILocator locator)


Save the document nto a new ILocator.

void save(ILocator locator, java.util.Map options)


Save the document to an optional new ILocator using the options to control specific
serializing behavior such as "incremental writing".

ICOSContainer saveStateContainer()
This method should not be used by the application programmer.

Object setAttribute(Object key, Object value)

void setInfoDict(COSInfoDict infoDict)


Set the info dictionary containing metadata.

void setName(String name)


Assign a new name to the document.

void setWriteModeHint(EnumWriteMode writeMode)


The write mode to be used when the document is written the next time.

STDocument stGetDoc()
The storage layer document.

void triggerChangedAll()
This method should not be used by the application programmer.

void willChange(COSObject change)


This method should not be used by the application programmer.

Fields

Page 269 of 1521


de.intarsys.pdf.cos.COSDocument

(continued from last page)

SLOT_DIRTY
public static final java.lang.Object SLOT_DIRTY

SLOT_TRAILER
public static final java.lang.Object SLOT_TRAILER

SLOT_LOCATOR
public static final java.lang.Object SLOT_LOCATOR

Methods
createFromLocator
public static COSDocument createFromLocator(ILocator locator)
throws java.io.IOException,
COSLoadException

Create a COSDocument based on a Locator.

Parameters:
locator - The ILocater referencing the documents data stream.

Returns:
A new COSDocument.

Throws:
COSLoadException
IOException

createFromST
public static COSDocument createFromST(STDocument doc)
throws COSLoadException

Create a COSDocument based on a STDocument.

Parameters:
doc - The storage layer document.

Returns:
A new COSDocument.

Throws:
COSLoadException

createNew
public static COSDocument createNew()

Page 270 of 1521


de.intarsys.pdf.cos.COSDocument

(continued from last page)

Create a new empty pdf COSDocument.

Returns:
A new empty pdf COSDocument

createNew
public static COSDocument createNew(STDocType docType)

Create a new empty COSDocument.

Returns:
A new empty COSDocument

add
public void add(COSDocumentElement element)

This should not be used by the application programmer. public for package visibility reasons.

Parameters:
element

addMonitor
public void addMonitor(ICOSMonitor listener)

addDocumentListener
public void addDocumentListener(ICOSDocumentListener listener)

Add an ICOSDocumentListener to be informed about the documents events.

Parameters:
listener - THe new listener

associate
public ICOSContainer associate(ICOSContainer newContainer,
COSObject object)

This method should not be used by the application programmer. This is called in the COSObject lifecycle to ensure
internal consistency.

close
public void close()
throws java.io.IOException

Close the document. Accessing a documents content is undefined after close.

Throws:
IOException

Page 271 of 1521


de.intarsys.pdf.cos.COSDocument

(continued from last page)

containable
public COSDocumentElement containable(COSObject object)

This method should not be used by the application programmer. This is called in the COSObject lifecycle to ensure
internal consistency.

copyDeep
public COSDocument copyDeep()

Make a deep copy of the receiver. The newly created document has the same content as this, but does not share any object.
The structure of the ST level is built from scratch.

Returns:
A deep copy of this.

disassociate
public ICOSContainer disassociate(ICOSContainer oldContainer,
COSObject object)

This method should not be used by the application programmer. This is called in the COSObject lifecycle to ensure
internal consistency.

getAccessPermissions
public IAccessPermissions getAccessPermissions()

If a document contains a permissions dictionary, it is "pushed" to this by the parser. Otherwise the document will have full
permissions set.

Returns:
The document access permissions

getAttribute
public Object getAttribute(Object key)

getCatalog
public COSCatalog getCatalog()

Get the root object (the catalog) for the document.

Returns:
The root object (the catalog) for the document.

getDoc
public COSDocument getDoc()

This method should not be used by the application programmer. This is called in the COSObject lifecycle to ensure
internal consistency.

Page 272 of 1521


de.intarsys.pdf.cos.COSDocument

(continued from last page)

getIncrementalCount
public int getIncrementalCount()

The number of versions created for this document so far.

Returns:
The number of versions created for this document so far.

getInfoDict
public COSInfoDict getInfoDict()

Get the info dictionary containing metadata.

Returns:
The info dictionary containing metadata.

getLocator
public ILocator getLocator()

The ILocator for this document. The ILocator designates the physical storage for the PDF data.

Returns:
The ILocator for this document.

getName
public String getName()

The document name. This is derived from the associated ILocator.

Returns:
The document name.

getWriteModeHint
public EnumWriteMode getWriteModeHint()

The write mode to be used when the document is written the next time. If defined this overrides any hint that is used when
saving the document. The write mode is reset after each "save".

Returns:
The write mode to be used when the document is written.

handleException
public void handleException(COSRuntimeException ex)
throws COSRuntimeException

isDirty
public boolean isDirty()

Answer true if the document has changes to be commited.

Page 273 of 1521


de.intarsys.pdf.cos.COSDocument

(continued from last page)

Returns:
Answer true if the document has changes to be commited.

isEncrypted
public boolean isEncrypted()

Answer true if the document is encrypted.

Returns:
Answer true if the document is encrypted.

isNew
public boolean isNew()

Answer true if the document is new, i.e. not yet written.

Returns:
Answer true if the document is new, i.e. not yet written.

isReadOnly
public boolean isReadOnly()

Answer true if the document is read only. To save the document and its changes you have to define another ILocator
when saving.

Returns:
Answer true if the document is read only.

objects
public java.util.Iterator objects()

An iterator on all COSObject instances of this that are managed as indirect objects in the storage layer.

ATTENTION: This iterator may (and on incremental documents most often will) return objects that are no longer used
(referenced) in the document.

Returns:
An iterator on all COSObject instances od this that are managed as indirect objects in the storage layer.

referenceCount
public int referenceCount()

This method should not be used by the application programmer. This is called in the COSObject lifecycle to ensure
internal consistency.

referenceIndirect
public COSIndirectObject referenceIndirect(COSObject object)

This method should not be used by the application programmer. This is called in the COSObject lifecycle to ensure
internal consistency.

Page 274 of 1521


de.intarsys.pdf.cos.COSDocument

(continued from last page)

register
public void register(COSDocumentElement object)

This method should not be used by the application programmer. This is called in the COSObject lifecycle to ensure
internal consistency.

removeAttribute
public Object removeAttribute(Object key)

removeMonitor
public void removeMonitor(ICOSMonitor monitor)

removeDocumentListener
public void removeDocumentListener(ICOSDocumentListener listener)

Remove an ICOSDocumentListener.

Parameters:
listener - The listener to be removed

restore
public void restore(ILocator locator)
throws java.io.IOException,
COSLoadException

Restore this from a locator. The ILocator must reference a data stream that was previously used to parse the document.

Parameters:
locator - The ILocator defining the new physical content.

Throws:
IOException
COSLoadException

restoreStateContainer
public ICOSContainer restoreStateContainer(ICOSContainer container)

This method should not be used by the application programmer. This is called in the COSObject lifecycle to ensure
internal consistency.

save
public void save()
throws java.io.IOException

Save the document to its current ILocator.

Throws:
IOException

Page 275 of 1521


de.intarsys.pdf.cos.COSDocument

save
public void save(ILocator locator)
throws java.io.IOException

Save the document nto a new ILocator.

Parameters:
locator - The ILocator defining the new data location.

Throws:
IOException

save
public void save(ILocator locator,
java.util.Map options)
throws java.io.IOException

Save the document to an optional new ILocator using the options to control specific serializing behavior such as
"incremental writing".

Parameters:
locator
options

Throws:
IOException

saveStateContainer
public ICOSContainer saveStateContainer()

This method should not be used by the application programmer. This is called in the COSObject lifecycle to ensure
internal consistency.

setAttribute
public Object setAttribute(Object key,
Object value)

setInfoDict
public void setInfoDict(COSInfoDict infoDict)

Set the info dictionary containing metadata.

Parameters:
infoDict - The info dictionary containing metadata.

setName
public void setName(String name)

Assign a new name to the document.

Page 276 of 1521


de.intarsys.pdf.cos.COSDocument

(continued from last page)

Parameters:
name - The new name.

setWriteModeHint
public void setWriteModeHint(EnumWriteMode writeMode)

The write mode to be used when the document is written the next time. If defined this overrides any hint that is used when
saving the document. The write mode is reset after each "save".

Parameters:
writeMode - The write mode to be used when the document is written.

stGetDoc
public STDocument stGetDoc()

The storage layer document.

Returns:
The storage layer document.

triggerChangedAll
public void triggerChangedAll()

This method should not be used by the application programmer. This is called in the COSObject lifecycle to ensure
internal consistency.

willChange
public void willChange(COSObject change)

This method should not be used by the application programmer. This is called in the COSObject lifecycle to ensure
internal consistency.

Page 277 of 1521


de.intarsys.pdf.cos.COSDocumentElement

de.intarsys.pdf.cos
Class COSDocumentElement
java.lang.Object
|
+-de.intarsys.pdf.cos.COSDocumentElement
All Implemented Interfaces:
ICOSExceptionHandler

Direct Known Subclasses:


COSIndirectObject, COSObject

public abstract class COSDocumentElement


extends Object
implements ICOSExceptionHandler

This is a cos level representation of the elements that may be contained in a cos container. An element may be either a COSObject
or a COSIndirectObject to a COSObject. A COSIndirectObject is never seen by an application level programmer, this is an
internal construct only.

Method Summary
abstract Object accept(ICOSObjectVisitor visitor)
Accept a visitor object.

abstract containable()
COSDocumentElement
The COSDocumentElement suitable for use in an ICOSContainer.

abstract COSObject dereference()


Return the real object.

abstract COSDocument getDoc()


The document where this is contained or null.

void handleException(COSRuntimeException ex)

boolean isReference()
Answer true if this element is a reference (a COSIndirectObject.

boolean isSwapped()
Answer true if this elements content is swapped to a persistent store.

Methods
isReference
public boolean isReference()

Answer true if this element is a reference (a COSIndirectObject.

Returns:
Answer true if this element is a reference.

Page 278 of 1521


de.intarsys.pdf.cos.COSDocumentElement

isSwapped
public boolean isSwapped()

Answer true if this elements content is swapped to a persistent store.

Returns:
Answer true if this elements content is swapped to a persistent store.

dereference
public abstract COSObject dereference()

Return the real object. This is either the object itself or the object referenced by a reference object (COSIndirectObject).

Returns:
The real object.

accept
public abstract Object accept(ICOSObjectVisitor visitor)
throws COSVisitorException

Accept a visitor object. The receiver selects the correct implementation in the visitor by "double dispatching".

Parameters:
visitor - The object visiting the receiver.

Returns:
Object An object depending on the visitor semantics.

Throws:
COSVisitorException - An exception depending on the visitor semantics.

getDoc
public abstract COSDocument getDoc()

The document where this is contained or null. A COSDocumentElement is at most contained in a single COSDocument.

Returns:
The document where this is contained.

containable
public abstract COSDocumentElement containable()

The COSDocumentElement suitable for use in an ICOSContainer. This may be a COSIndirectObject or the
COSObject itself if not indirect.

This method should not be used by the application programmer. This is called in the COSObject lifecycle to ensure
internal consistency.

handleException
public void handleException(COSRuntimeException ex)
throws COSRuntimeException

Page 279 of 1521


de.intarsys.pdf.cos.COSDocumentElement

(continued from last page)

Page 280 of 1521


de.intarsys.pdf.cos.COSDocumentFactory

de.intarsys.pdf.cos
Class COSDocumentFactory
java.lang.Object
|
+-de.intarsys.pdf.cos.COSDocumentFactory

public class COSDocumentFactory


extends Object

The VM singleton for accessing a ICOSDocumentFactory.

Constructor Summary
public COSDocumentFactory()

Method Summary
static get()
ICOSDocumentFactory

static void set(ICOSDocumentFactory factory)

Constructors
COSDocumentFactory
public COSDocumentFactory()

Methods
get
public static ICOSDocumentFactory get()

set
public static void set(ICOSDocumentFactory factory)

Page 281 of 1521


de.intarsys.pdf.cos.COSFalse

de.intarsys.pdf.cos
Class COSFalse
java.lang.Object
|
+-de.intarsys.pdf.cos.COSDocumentElement
|
+-de.intarsys.pdf.cos.COSObject
|
+-de.intarsys.pdf.cos.COSPrimitiveObject
|
+-de.intarsys.pdf.cos.COSBoolean
|
+-de.intarsys.pdf.cos.COSFalse
All Implemented Interfaces:
ICOSExceptionHandler, de.intarsys.tools.component.ISaveStateSupport

public class COSFalse


extends COSBoolean

Represents the boolean value "false".

Method Summary
boolean booleanValue()

static COSFalse create()

boolean equals(Object o)

int hashCode()
Returns an arbitrary number to avoid collisions

Object saveState()

Methods
create
public static COSFalse create()

booleanValue
public boolean booleanValue()

The boolean value for this.

equals
public boolean equals(Object o)

Page 282 of 1521


de.intarsys.pdf.cos.COSFalse

(continued from last page)

hashCode
public int hashCode()

Returns an arbitrary number to avoid collisions

Returns:
17

See Also:
Object.hashCode()

saveState
public Object saveState()

Page 283 of 1521


de.intarsys.pdf.cos.COSFixed

de.intarsys.pdf.cos
Class COSFixed
java.lang.Object
|
+-de.intarsys.pdf.cos.COSDocumentElement
|
+-de.intarsys.pdf.cos.COSObject
|
+-de.intarsys.pdf.cos.COSPrimitiveObject
|
+-de.intarsys.pdf.cos.COSNumber
|
+-de.intarsys.pdf.cos.COSFixed
All Implemented Interfaces:
ICOSExceptionHandler, de.intarsys.tools.component.ISaveStateSupport

public class COSFixed


extends COSNumber

Represents floating point numbers in pdf.

Field Summary
public static final DEFAULT_PRECISION

Value: 5

Method Summary
Object accept(ICOSObjectVisitor visitor)

COSFixed asFixed()

static COSFixed create(byte[] bytes, int start, int length)

static COSFixed create(double value)

static COSFixed create(double value, int precision)

static COSFixed create(float value)

static COSFixed create(float value, int precision)

boolean equals(Object o)

float floatValue()

int getPrecision()
The precision (digits after period) for this.

int hashCode()

Page 284 of 1521


de.intarsys.pdf.cos.COSFixed

int intValue()

void restoreState(Object object)

Object saveState()

void setPrecision(int precision)


Assign the precision for this.

Fields
DEFAULT_PRECISION
public static final int DEFAULT_PRECISION

Constant value: 5

Methods
create
public static COSFixed create(byte[] bytes,
int start,
int length)

create
public static COSFixed create(double value)

create
public static COSFixed create(double value,
int precision)

create
public static COSFixed create(float value)

create
public static COSFixed create(float value,
int precision)

Page 285 of 1521


de.intarsys.pdf.cos.COSFixed

(continued from last page)

accept
public Object accept(ICOSObjectVisitor visitor)
throws COSVisitorException

Accept a visitor object. The receiver selects the correct implementation in the visitor by "double dispatching".

asFixed
public COSFixed asFixed()

equals
public boolean equals(Object o)

floatValue
public float floatValue()

Answer the value of the receiver as a float

getPrecision
public int getPrecision()

The precision (digits after period) for this.

Returns:
The precision (digits after period) for this.

hashCode
public int hashCode()

intValue
public int intValue()

Answer the value of the receiver as a int

restoreState
public void restoreState(Object object)

saveState
public Object saveState()

Page 286 of 1521


de.intarsys.pdf.cos.COSFixed

setPrecision
public void setPrecision(int precision)

Assign the precision for this.

Parameters:
precision - The new precision.

Page 287 of 1521


de.intarsys.pdf.cos.COSIndirectObject

de.intarsys.pdf.cos
Class COSIndirectObject
java.lang.Object
|
+-de.intarsys.pdf.cos.COSDocumentElement
|
+-de.intarsys.pdf.cos.COSIndirectObject
All Implemented Interfaces:
ICOSContainer, ICOSExceptionHandler

public class COSIndirectObject


extends COSDocumentElement
implements ICOSExceptionHandler, ICOSContainer

An object representing an indirect object within a COSDocument.

Actually you should not override equals or hash without really knowing what you do. Portions of the implementation depend on
indirect objects being real unique.

Method Summary
Object accept(ICOSObjectVisitor visitor)

ICOSContainer associate(ICOSContainer newContainer, COSObject pObject)

COSDocumentElement containable()

COSDocumentElement containable(COSObject pObject)

static create(COSObject object)


COSIndirectObject
Create an indirection for object.

static create(STDocument stDoc, COSObjectKey key)


COSIndirectObject

COSObject dereference()

ICOSContainer disassociate(ICOSContainer oldContainer, COSObject pObject)

COSDocument getDoc()

COSObjectKey getKey()
The key for this.

COSObject getObject()
The object represented by this.

boolean isDirty()
true if the object graph referenced by this is changed.

boolean isEncryptOnWrite()

Page 288 of 1521


de.intarsys.pdf.cos.COSIndirectObject

boolean isReference()

boolean isSwapped()

int referenceCount()

COSIndirectObject referenceIndirect(COSObject pObject)

void register(COSDocumentElement pObject)

void registerWith(STDocument pSTDoc)

ICOSContainer restoreStateContainer(ICOSContainer container)

ICOSContainer saveStateContainer()

void setDirty(boolean pDirty)


Set the dirty state of the indirect object

void setEncryptOnWrite(boolean encryptOnWrite)


Flag the referenced object to be encrypted, if the document itself is encrypted.

void setKey(COSObjectKey key)


Assign a COSObjectKey to this.

void setObject(COSObject newObject)


Set the object for this reference.

STDocument stGetDoc()
The ST level document.

String toString()

void willChange(COSObject change)

Methods
create
public static COSIndirectObject create(STDocument stDoc,
COSObjectKey key)

create
public static COSIndirectObject create(COSObject object)

Create an indirection for object.

Parameters:
object - The object that should be indirect.

Page 289 of 1521


de.intarsys.pdf.cos.COSIndirectObject

(continued from last page)

Returns:
The new indirect object.

getDoc
public COSDocument getDoc()

The document where this is contained or null. A COSDocumentElement is at most contained in a single COSDocument.

getKey
public COSObjectKey getKey()

The key for this.

Returns:
The key for this.

setObject
public void setObject(COSObject newObject)

Set the object for this reference. The reference is already registered with the document, the object is provided "lazy" by the
storage.

Parameters:
newObject - the new object to set

getObject
public COSObject getObject()

The object represented by this.

Returns:
The object represented by this.

isReference
public boolean isReference()

Answer true if this element is a reference (a COSIndirectObject.

willChange
public void willChange(COSObject change)

setDirty
public void setDirty(boolean pDirty)

Set the dirty state of the indirect object

Page 290 of 1521


de.intarsys.pdf.cos.COSIndirectObject

(continued from last page)

isDirty
public boolean isDirty()

true if the object graph referenced by this is changed.

Returns:
true if the object graph referenced by this is changed.

dereference
public COSObject dereference()

Return the real object. This is either the object itself or the object referenced by a reference object (COSIndirectObject).

isSwapped
public boolean isSwapped()

Answer true if this elements content is swapped to a persistent store.

toString
public String toString()

register
public void register(COSDocumentElement pObject)

setKey
public void setKey(COSObjectKey key)

Assign a COSObjectKey to this.

Parameters:
key - The new key.

accept
public Object accept(ICOSObjectVisitor visitor)
throws COSVisitorException

Accept a visitor object. The receiver selects the correct implementation in the visitor by "double dispatching".

isEncryptOnWrite
public boolean isEncryptOnWrite()

Returns:
true if the referenced object should be encrypted. The default is true;

Page 291 of 1521


de.intarsys.pdf.cos.COSIndirectObject

setEncryptOnWrite
public void setEncryptOnWrite(boolean encryptOnWrite)

Flag the referenced object to be encrypted, if the document itself is encrypted. The default is true.

Parameters:
encryptOnWrite

stGetDoc
public STDocument stGetDoc()

The ST level document.

Returns:
The ST level document.

registerWith
public void registerWith(STDocument pSTDoc)

Parameters:
pSTDoc

referenceIndirect
public COSIndirectObject referenceIndirect(COSObject pObject)

associate
public ICOSContainer associate(ICOSContainer newContainer,
COSObject pObject)

disassociate
public ICOSContainer disassociate(ICOSContainer oldContainer,
COSObject pObject)

containable
public COSDocumentElement containable()

The COSDocumentElement suitable for use in an ICOSContainer. This may be a COSIndirectObject or the
COSObject itself if not indirect.

This method should not be used by the application programmer. This is called in the COSObject lifecycle to ensure
internal consistency.

Page 292 of 1521


de.intarsys.pdf.cos.COSIndirectObject

(continued from last page)

containable
public COSDocumentElement containable(COSObject pObject)

referenceCount
public int referenceCount()

saveStateContainer
public ICOSContainer saveStateContainer()

restoreStateContainer
public ICOSContainer restoreStateContainer(ICOSContainer container)

Page 293 of 1521


de.intarsys.pdf.cos.COSInfoDict

de.intarsys.pdf.cos
Class COSInfoDict
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.cos.COSInfoDict
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class COSInfoDict


extends COSBasedObject

The document information dictionary..

Nested Class Summary


class COSInfoDict.MetaClass
COSInfoDict.MetaClass

Field Summary
public static final DK_Author

public static final DK_CreationDate


Well known attributes

public static final DK_Creator

public static final DK_Keywords

public static final DK_ModDate

public static final DK_Producer

public static final DK_Subject

public static final DK_Title

public static final DK_Trapped

public static final META


The meta class instance

Method Summary
String getAuthor()
The /Author field in the info dictionary.

Page 294 of 1521


de.intarsys.pdf.cos.COSInfoDict

CDSDate getCreationDate()
The /CreationDate field in the info dictionary.

String getCreationDateString()
The /CreationDate field in the info dictionary as a java.lang.String.

String getCreator()
The /Creator field in the info dictionary.

String getKeywords()
The /Keywords field in the info dictionary.

CDSDate getModDate()
The /ModDate field in the info dictionary.

String getModDateString()
The /ModDate field in the info dictionary as a java.lang.String.

String getProducer()
The /Producer field in the info dictionary.

String getSubject()
The /Subject field in the info dictionary.

String getTitle()
The /Title field in the info dictionary.

String getTrapped()
The /Trapped field in the info dictionary.

void setAuthor(String value)


Set the /Author field in the info dictionary.

void setCreationDate(String value)


Set the /CreationDate field in the info dictionary.

void setCreator(String value)


Set the /Creator field in the info dictionary.

void setKeywords(String value)


Set the /Keywords field in the info dictionary.

void setModDate(String value)


Set the /ModDate field in the info dictionary.

void setProducer(String value)


Set the /Producer field in the info dictionary.

void setSubject(String value)


Set the /Subject field in the info dictionary.

void setTitle(String value)


Set the /Title field in the info dictionary.

void setTrapped(String value)


Set the /Trapped field in the info dictionary.

Page 295 of 1521


de.intarsys.pdf.cos.COSInfoDict

(continued from last page)

Fields
DK_CreationDate
public static final de.intarsys.pdf.cos.COSName DK_CreationDate

Well known attributes

DK_Creator
public static final de.intarsys.pdf.cos.COSName DK_Creator

DK_ModDate
public static final de.intarsys.pdf.cos.COSName DK_ModDate

DK_Producer
public static final de.intarsys.pdf.cos.COSName DK_Producer

DK_Title
public static final de.intarsys.pdf.cos.COSName DK_Title

DK_Author
public static final de.intarsys.pdf.cos.COSName DK_Author

DK_Subject
public static final de.intarsys.pdf.cos.COSName DK_Subject

DK_Keywords
public static final de.intarsys.pdf.cos.COSName DK_Keywords

DK_Trapped
public static final de.intarsys.pdf.cos.COSName DK_Trapped

Page 296 of 1521


de.intarsys.pdf.cos.COSInfoDict

(continued from last page)

META
public static final de.intarsys.pdf.cos.COSInfoDict.MetaClass META

The meta class instance

Methods
getAuthor
public String getAuthor()

The /Author field in the info dictionary.

getCreationDate
public CDSDate getCreationDate()

The /CreationDate field in the info dictionary.

getCreationDateString
public String getCreationDateString()

The /CreationDate field in the info dictionary as a java.lang.String.

getCreator
public String getCreator()

The /Creator field in the info dictionary.

getKeywords
public String getKeywords()

The /Keywords field in the info dictionary.

getModDate
public CDSDate getModDate()

The /ModDate field in the info dictionary.

getModDateString
public String getModDateString()

The /ModDate field in the info dictionary as a java.lang.String.

getProducer
public String getProducer()

The /Producer field in the info dictionary.

Page 297 of 1521


de.intarsys.pdf.cos.COSInfoDict

(continued from last page)

getSubject
public String getSubject()

The /Subject field in the info dictionary.

getTitle
public String getTitle()

The /Title field in the info dictionary.

getTrapped
public String getTrapped()

The /Trapped field in the info dictionary.

setAuthor
public void setAuthor(String value)

Set the /Author field in the info dictionary.

setCreationDate
public void setCreationDate(String value)

Set the /CreationDate field in the info dictionary.

setCreator
public void setCreator(String value)

Set the /Creator field in the info dictionary.

setKeywords
public void setKeywords(String value)

Set the /Keywords field in the info dictionary.

setModDate
public void setModDate(String value)

Set the /ModDate field in the info dictionary.

setProducer
public void setProducer(String value)

Set the /Producer field in the info dictionary.

setSubject
public void setSubject(String value)

Page 298 of 1521


de.intarsys.pdf.cos.COSInfoDict

(continued from last page)

Set the /Subject field in the info dictionary.

setTitle
public void setTitle(String value)

Set the /Title field in the info dictionary.

setTrapped
public void setTrapped(String value)

Set the /Trapped field in the info dictionary.

Page 299 of 1521


de.intarsys.pdf.cos.COSInfoDict.MetaClass

de.intarsys.pdf.cos
Class COSInfoDict.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.cos.COSInfoDict.MetaClass

public static class COSInfoDict.MetaClass


extends COSBasedObject.MetaClass

The meta class implementation

Page 300 of 1521


de.intarsys.pdf.cos.COSInteger

de.intarsys.pdf.cos
Class COSInteger
java.lang.Object
|
+-de.intarsys.pdf.cos.COSDocumentElement
|
+-de.intarsys.pdf.cos.COSObject
|
+-de.intarsys.pdf.cos.COSPrimitiveObject
|
+-de.intarsys.pdf.cos.COSNumber
|
+-de.intarsys.pdf.cos.COSInteger
All Implemented Interfaces:
ICOSExceptionHandler, de.intarsys.tools.component.ISaveStateSupport

public class COSInteger


extends COSNumber

This class represents integer numbers in pdf

Method Summary
Object accept(ICOSObjectVisitor visitor)

COSInteger asInteger()

static COSInteger create(byte[] bytes, int start, int length)

static COSInteger create(int value)

boolean equals(Object o)

float floatValue()

int hashCode()

int intValue()

Object saveState()

Methods
create
public static COSInteger create(byte[] bytes,
int start,
int length)

Page 301 of 1521


de.intarsys.pdf.cos.COSInteger

create
public static COSInteger create(int value)

accept
public Object accept(ICOSObjectVisitor visitor)
throws COSVisitorException

Accept a visitor object. The receiver selects the correct implementation in the visitor by "double dispatching".

asInteger
public COSInteger asInteger()

equals
public boolean equals(Object o)

floatValue
public float floatValue()

Answer the value of the receiver as a float

hashCode
public int hashCode()

intValue
public int intValue()

Answer the value of the receiver as a int

saveState
public Object saveState()

Page 302 of 1521


de.intarsys.pdf.cos.COSName

de.intarsys.pdf.cos
Class COSName
java.lang.Object
|
+-de.intarsys.pdf.cos.COSDocumentElement
|
+-de.intarsys.pdf.cos.COSObject
|
+-de.intarsys.pdf.cos.COSPrimitiveObject
|
+-de.intarsys.pdf.cos.COSName
All Implemented Interfaces:
ICOSExceptionHandler, de.intarsys.tools.component.ISaveStateSupport

public class COSName


extends COSPrimitiveObject

A name object.

Method Summary
Object accept(ICOSObjectVisitor visitor)

COSName asName()

byte[] byteValue()
The bytes that make up this name (without "/")

static COSName constant(String name)

static COSName create(byte[] bytes)

static COSName create(String name)

boolean equals(Object o)

int hashCode()

void restoreState(Object object)

Object saveState()

String stringValue()
The string value that makes up this name (without "/")

Methods

Page 303 of 1521


de.intarsys.pdf.cos.COSName

(continued from last page)

constant
public static COSName constant(String name)

create
public static COSName create(byte[] bytes)

create
public static COSName create(String name)

accept
public Object accept(ICOSObjectVisitor visitor)
throws COSVisitorException

Accept a visitor object. The receiver selects the correct implementation in the visitor by "double dispatching".

asName
public COSName asName()

byteValue
public byte[] byteValue()

The bytes that make up this name (without "/")

Returns:
The bytes that make up this name (without "/")

equals
public boolean equals(Object o)

hashCode
public int hashCode()

restoreState
public void restoreState(Object object)

Page 304 of 1521


de.intarsys.pdf.cos.COSName

saveState
public Object saveState()

stringValue
public String stringValue()

The string value that makes up this name (without "/")

Returns:
The string value that makes up this name (without "/")

Page 305 of 1521


de.intarsys.pdf.cos.COSNull

de.intarsys.pdf.cos
Class COSNull
java.lang.Object
|
+-de.intarsys.pdf.cos.COSDocumentElement
|
+-de.intarsys.pdf.cos.COSObject
|
+-de.intarsys.pdf.cos.COSPrimitiveObject
|
+-de.intarsys.pdf.cos.COSNull
All Implemented Interfaces:
ICOSExceptionHandler, de.intarsys.tools.component.ISaveStateSupport

public class COSNull


extends COSPrimitiveObject

The null object

Field Summary
public static final NULL

Method Summary
Object accept(ICOSObjectVisitor visitor)

static COSNull create()

boolean equals(Object o)

int hashCode()

boolean isNull()

Object saveState()

Fields
NULL
public static final de.intarsys.pdf.cos.COSNull NULL

Methods

Page 306 of 1521


de.intarsys.pdf.cos.COSNull

(continued from last page)

create
public static COSNull create()

accept
public Object accept(ICOSObjectVisitor visitor)
throws COSVisitorException

Accept a visitor object. The receiver selects the correct implementation in the visitor by "double dispatching".

equals
public boolean equals(Object o)

hashCode
public int hashCode()

isNull
public boolean isNull()

answer true if receiver is the null object

saveState
public Object saveState()

Page 307 of 1521


de.intarsys.pdf.cos.COSNumber

de.intarsys.pdf.cos
Class COSNumber
java.lang.Object
|
+-de.intarsys.pdf.cos.COSDocumentElement
|
+-de.intarsys.pdf.cos.COSObject
|
+-de.intarsys.pdf.cos.COSPrimitiveObject
|
+-de.intarsys.pdf.cos.COSNumber
All Implemented Interfaces:
ICOSExceptionHandler, de.intarsys.tools.component.ISaveStateSupport

Direct Known Subclasses:


COSFixed, COSInteger

public abstract class COSNumber


extends COSPrimitiveObject

Abstract superclass for numeric objects in a pdf document

Method Summary
COSNumber asNumber()

abstract float floatValue()


Answer the value of the receiver as a float

abstract int intValue()


Answer the value of the receiver as a int

boolean isNumber()

Methods
asNumber
public COSNumber asNumber()

floatValue
public abstract float floatValue()

Answer the value of the receiver as a float

Returns:
Answer the value of the receiver as a float

Page 308 of 1521


de.intarsys.pdf.cos.COSNumber

(continued from last page)

intValue
public abstract int intValue()

Answer the value of the receiver as a int

Returns:
Answer the value of the receiver as a int

isNumber
public boolean isNumber()

answer true if receiver is a number

Page 309 of 1521


de.intarsys.pdf.cos.COSObject

de.intarsys.pdf.cos
Class COSObject
java.lang.Object
|
+-de.intarsys.pdf.cos.COSDocumentElement
|
+-de.intarsys.pdf.cos.COSObject
All Implemented Interfaces:
de.intarsys.tools.component.ISaveStateSupport, ICOSExceptionHandler

Direct Known Subclasses:


COSCompositeObject, COSPrimitiveObject

public abstract class COSObject


extends COSDocumentElement
implements ICOSExceptionHandler, de.intarsys.tools.component.ISaveStateSupport

Abstract superclass for all COS level object types

Field Summary
public static final CONSTANT_CONTAINER
This is the container for template objects.

public static final NULL_CONTAINER


This is the default container for non - contained objects.

public static final SLOT_CONTAINER

Method Summary
abstract void addObjectListener(ICOSObjectListener listener)
Add a listener for object changes.

COSArray asArray()
this as a COSArray or null

COSBoolean asBoolean()

COSDictionary asDictionary()

COSFixed asFixed()

COSInteger asInteger()

COSName asName()

COSNull asNull()

COSNumber asNumber()

Page 310 of 1521


de.intarsys.pdf.cos.COSObject

COSStream asStream()

COSString asString()

abstract basicIterator()
java.util.Iterator
An iterator over contained objects and references.

COSObject beConstant()
Declare this to be a constant.

COSIndirectObject beIndirect()
Make an indirect object out of a direct one.

COSDocumentElement containable()

abstract COSObject copyDeep()


Make a deep copy of the receiver within the same document.

abstract COSObject copyDeep(java.util.Map copied)


Make a deep copy of the receiver within the same document.

COSObject copyOptional()
Make a copy of the receiver within the same document.

COSObject copyShallow()
Make a copy of the receiver.

COSObject copySubGraph()
Make a copy of the receiver within the same document.

COSObject dereference()
return the real object. this is needed for polymorphic handling of document elements. at
application programming level only COSObject, never COSReference is seen.

ICOSContainer getContainer()
Answer the object that contains this.

COSDocument getDoc()
The document that contains this.

COSIndirectObject getIndirectObject()
return the indirect object for the receiver. application level programmers should not use this
method. this is needed for creating a physical representation of the document (serializing)

boolean isDangling()
true if this object is not contained in a document directly or indirectly.

boolean isIndirect()
Answer true if this object is an indirect one.

boolean isNull()
answer true if receiver is the null object

boolean isNumber()
answer true if receiver is a number

abstract boolean isObjectListenerAvailable()


true if an ICOSObjectListener is registered.

Page 311 of 1521


de.intarsys.pdf.cos.COSObject

abstract boolean isPrimitive()


Answer true if this object is of a primitive type

boolean isSwapped()

abstract iterator()
java.util.Iterator
An iterator over contained objects.

abstract void removeObjectListener(ICOSObjectListener listener)


Remove a listener for object changes.

void restoreState(Object saveState)

String stringValue()
A string representation for the receiver.

String toString()

Fields
CONSTANT_CONTAINER
public static final de.intarsys.pdf.cos.ICOSContainer CONSTANT_CONTAINER

This is the container for template objects. Template objects can be created static in the application and are copied behind
the scenes when integrated in a document.

NULL_CONTAINER
public static final de.intarsys.pdf.cos.ICOSContainer NULL_CONTAINER

This is the default container for non - contained objects.

SLOT_CONTAINER
public static final java.lang.Object SLOT_CONTAINER

Methods
addObjectListener
public abstract void addObjectListener(ICOSObjectListener listener)

Add a listener for object changes.

Parameters:
listener - The listener to be informed about changes.

isObjectListenerAvailable
public abstract boolean isObjectListenerAvailable()

true if an ICOSObjectListener is registered. This is for test purposes.

Page 312 of 1521


de.intarsys.pdf.cos.COSObject

basicIterator
public abstract java.util.Iterator basicIterator()

An iterator over contained objects and references. The iterator is an empty iterator if this is not a container.

This iterator returns COSDocumentElements, leaving references alone.

Returns:
Iterator over contained objects and references.

beConstant
public COSObject beConstant()

Declare this to be a constant. This declaration ensures, that when using this in a document context a copy will be made.

Returns:
The receiver.

beIndirect
public COSIndirectObject beIndirect()

Make an indirect object out of a direct one. An object can always be changed to an indirect one.

It is possible to morph existing objects into indirect ones, the objects in the hierarchy (container/document) are informed
and will reflect the change.

containable
public COSDocumentElement containable()

The COSDocumentElement suitable for use in an ICOSContainer. This may be a COSIndirectObject or the
COSObject itself if not indirect.

This method should not be used by the application programmer. This is called in the COSObject lifecycle to ensure
internal consistency.

copyDeep
public abstract COSObject copyDeep()

Make a deep copy of the receiver within the same document. The result is a "PDF semantic" deep copy, implementation
artifacts as "attributes" and listeners are NOT copied.

The algorithm copies this along with all outgoing references (recursively).

Object identity is preserved.

Be careful when copying objects, as there are semantics that may NOT be recognized by this method.

Returns:
the object copied recursively

copyDeep
public abstract COSObject copyDeep(java.util.Map copied)

Page 313 of 1521


de.intarsys.pdf.cos.COSObject

(continued from last page)

Make a deep copy of the receiver within the same document. The result is a "PDF semantic" deep copy, implementation
artifacts as "attributes" and listeners are NOT copied.

The copied map is used to identify objects copied in earlier runs of this method to avoid duplicating resources used in
different copy targets (for example the pages of a document). copied is modified while executing copyDeep and contains
a mapping from indirect objects in the original document to copied objects.

The algorithm copies this along with all outgoing references (recursively).

Object identity is preserved.

Be careful when copying objects, as there are semantics that may NOT be recognized by this method.

Returns:
the object copied recursively

copyOptional
public final COSObject copyOptional()

Make a copy of the receiver within the same document. A copy is made only if we have an object that may not be inserted
in multiple containers. This means all direct objects are (recursively) copied, all indirect objects return the receiver.

Be careful when copying objects, as there are semantics that may NOT be recognized by this method.

Returns:
The optional copy.

copyShallow
public COSObject copyShallow()

Make a copy of the receiver.

A copy is made of the receiver and after this recursively of all not indirect objects.

Be careful when copying objects, as there are semantics that may NOT be recognized by this method.

Returns:
The object copied

copySubGraph
public final COSObject copySubGraph()

Make a copy of the receiver within the same document.

The algorithm copies this along with all outgoing references (recursively) that themselve have a navigation path to this.
The result is a new subgraph extending from the copy of this where no navigation path leads back to this.

Object identity is preserved.

Be careful when copying objects, as there are semantics that may NOT be recognized by this method.

Returns:
the object copied recursively

dereference
public COSObject dereference()

return the real object. this is needed for polymorphic handling of document elements. at application programming level
only COSObject, never COSReference is seen.

Page 314 of 1521


de.intarsys.pdf.cos.COSObject

(continued from last page)

Returns:
de.intarsys.pdf.cos.COSObject

getContainer
public ICOSContainer getContainer()

Answer the object that contains this. The container is never null.

Returns:
Answer the object that contains this.

getDoc
public COSDocument getDoc()

The document that contains this.

This may return null, as COSObject graphs may be created "offline" and add to the document as a whole.

The document is evaluated via the COSObject graph hierarchy that finally must be contained within a document.

Returns:
The document that contains this.

getIndirectObject
public COSIndirectObject getIndirectObject()

return the indirect object for the receiver. application level programmers should not use this method. this is needed for
creating a physical representation of the document (serializing)

Returns:
the indirect object for the receiver

isDangling
public boolean isDangling()

true if this object is not contained in a document directly or indirectly. This is especially true when an object is new (or
reset to this state when an undo happend). Remember that an object can still be garbage, even if it is not dangling.

Returns:
true if this object is not contained in a document directly or indirectly.

isIndirect
public boolean isIndirect()

Answer true if this object is an indirect one.

Returns:
true if this object is an indirect one.

isNull
public boolean isNull()

Page 315 of 1521


de.intarsys.pdf.cos.COSObject

(continued from last page)

answer true if receiver is the null object

Returns:
true if receiver is the null object

isNumber
public boolean isNumber()

answer true if receiver is a number

Returns:
answer true if receiver is a number

isPrimitive
public abstract boolean isPrimitive()

Answer true if this object is of a primitive type

Returns:
Answer true if this object is of a primitive type

isSwapped
public boolean isSwapped()

Answer true if this elements content is swapped to a persistent store.

iterator
public abstract java.util.Iterator iterator()

An iterator over contained objects. The iterator is an empty iterator if this is not a container.

This iterator returns only COSObject instances, references are dereferenced.

Returns:
Iterator over contained objects.

removeObjectListener
public abstract void removeObjectListener(ICOSObjectListener listener)

Remove a listener for object changes.

Parameters:
listener - The listener to be removed.

restoreState
public void restoreState(Object saveState)

stringValue
public String stringValue()

Page 316 of 1521


de.intarsys.pdf.cos.COSObject

(continued from last page)

A string representation for the receiver.

Returns:
A string representation for the receiver.

toString
public String toString()

asBoolean
public COSBoolean asBoolean()

Returns:
a COSBoolean or null

asName
public COSName asName()

Returns:
a COSName or null

asNull
public COSNull asNull()

Returns:
a COSNull or null

asString
public COSString asString()

Returns:
a COSString or null

asFixed
public COSFixed asFixed()

Returns:
a COSFixed or null

Page 317 of 1521


de.intarsys.pdf.cos.COSObject

(continued from last page)

asInteger
public COSInteger asInteger()

Returns:
a COSInteger or null

asNumber
public COSNumber asNumber()

Returns:
a COSNumber or null

asArray
public COSArray asArray()

this as a COSArray or null

Returns:
a COSArray or null

asDictionary
public COSDictionary asDictionary()

Returns:
a COSDictionary or null

asStream
public COSStream asStream()

Returns:
a COSStream or null

Page 318 of 1521


de.intarsys.pdf.cos.COSObjectKey

de.intarsys.pdf.cos
Class COSObjectKey
java.lang.Object
|
+-de.intarsys.pdf.cos.COSObjectKey

public class COSObjectKey


extends Object

An object that is used as a lookup key for COS objects.

Constructor Summary
public COSObjectKey(int objectNumber, int generationNumber)

Method Summary
COSObjectKey createNextKey()
The next key after this.

boolean equals(Object obj)

int getGenerationNumber()
The keys generation number.

int getObjectNumber()
The keys object number.

int hashCode()

String toString()

Constructors
COSObjectKey
public COSObjectKey(int objectNumber,
int generationNumber)

Methods
createNextKey
public COSObjectKey createNextKey()

The next key after this.

Returns:

Page 319 of 1521


de.intarsys.pdf.cos.COSObjectKey

(continued from last page)

The next key after this.

equals
public boolean equals(Object obj)

getGenerationNumber
public int getGenerationNumber()

The keys generation number.

Returns:
The keys generation number.

getObjectNumber
public int getObjectNumber()

The keys object number.

Returns:
The keys object number.

hashCode
public int hashCode()

toString
public String toString()

Page 320 of 1521


de.intarsys.pdf.cos.COSObjectProxy

de.intarsys.pdf.cos
Class COSObjectProxy
java.lang.Object
|
+-de.intarsys.pdf.cos.COSDocumentElement
|
+-de.intarsys.pdf.cos.COSObject
|
+-de.intarsys.pdf.cos.COSCompositeObject
|
+-de.intarsys.pdf.cos.COSObjectProxy
All Implemented Interfaces:
Cloneable, ICOSExceptionHandler, de.intarsys.tools.component.ISaveStateSupport, IAttributeSupport,
ICOSContainer

public abstract class COSObjectProxy


extends COSCompositeObject
implements ICOSContainer, IAttributeSupport, de.intarsys.tools.component.ISaveStateSupport,
ICOSExceptionHandler, Cloneable

A "proxy object" used to intercept the visitor callback from the serializer.

Constructor Summary
public COSObjectProxy()
Create a COSObjectProxy

Method Summary
Object accept(ICOSObjectVisitor visitor)

java.util.Iterator basicIterator()

COSObject copyDeep(java.util.Map copied)

COSObject copyShallow()

COSObject dereference()

void ended(COSWriter writer)


Attention: The user must handle encryption by himself.

int getLength()
The length within the data stream for the serialization of this.

COSObject getObject()
The object represented by this.

long getPosition()
The position within the data stream for the serialization of this.

java.util.Iterator iterator()

Page 321 of 1521


de.intarsys.pdf.cos.COSObjectProxy

void reserveData(int pLength)


Reserve length bytes for the serialization of this.

Object saveState()

void setPosition(long position)


Assign the position within the data stream.

Constructors
COSObjectProxy
public COSObjectProxy()

Create a COSObjectProxy

Methods
accept
public Object accept(ICOSObjectVisitor visitor)
throws COSVisitorException

Accept a visitor object. The receiver selects the correct implementation in the visitor by "double dispatching".

basicIterator
public java.util.Iterator basicIterator()

An iterator over contained objects and references. The iterator is an empty iterator if this is not a container.

This iterator returns COSDocumentElements, leaving references alone.

copyDeep
public COSObject copyDeep(java.util.Map copied)

Make a deep copy of the receiver within the same document. The result is a "PDF semantic" deep copy, implementation
artifacts as "attributes" and listeners are NOT copied.

The copied map is used to identify objects copied in earlier runs of this method to avoid duplicating resources used in
different copy targets (for example the pages of a document). copied is modified while executing copyDeep and contains
a mapping from indirect objects in the original document to copied objects.

The algorithm copies this along with all outgoing references (recursively).

Object identity is preserved.

Be careful when copying objects, as there are semantics that may NOT be recognized by this method.

copyShallow
public COSObject copyShallow()

Page 322 of 1521


de.intarsys.pdf.cos.COSObjectProxy

(continued from last page)

Make a copy of the receiver.

A copy is made of the receiver and after this recursively of all not indirect objects.

Be careful when copying objects, as there are semantics that may NOT be recognized by this method.

dereference
public COSObject dereference()

return the real object. this is needed for polymorphic handling of document elements. at application programming level
only COSObject, never COSReference is seen.

ended
public void ended(COSWriter writer)
throws java.io.IOException

Attention: The user must handle encryption by himself. The COSWriter doesn't handle encryption in this state.

Parameters:
writer

Throws:
IOException

getLength
public int getLength()

The length within the data stream for the serialization of this.

Returns:
The length within the data stream for the serialization of this.

getObject
public COSObject getObject()

The object represented by this.

Returns:
The object represented by this.

getPosition
public long getPosition()

The position within the data stream for the serialization of this.

Returns:
The position within the data stream for the serialization of this.

iterator
public java.util.Iterator iterator()

An iterator over contained objects. The iterator is an empty iterator if this is not a container.

This iterator returns only COSObject instances, references are dereferenced.

Page 323 of 1521


de.intarsys.pdf.cos.COSObjectProxy

reserveData
public void reserveData(int pLength)

Reserve length bytes for the serialization of this.

Parameters:
pLength - Number of bytes to be reserved.

saveState
public Object saveState()

setPosition
public void setPosition(long position)

Assign the position within the data stream.

Parameters:
position - The position within the data stream.

Page 324 of 1521


de.intarsys.pdf.cos.COSObjectWalkerDeep

de.intarsys.pdf.cos
Class COSObjectWalkerDeep
java.lang.Object
|
+-de.intarsys.pdf.cos.COSObjectWalkerShallow
|
+-de.intarsys.pdf.cos.COSObjectWalkerDeep
All Implemented Interfaces:
ICOSObjectVisitor

public class COSObjectWalkerDeep


extends COSObjectWalkerShallow

Adapter implementation for visiting a COS object structure, including indirect references.

Every object in the potential cyclic data structure is visited exactly once.

Constructor Summary
public COSObjectWalkerDeep()

public COSObjectWalkerDeep(boolean swap)

Method Summary
java.util.Set getVisited()

Object visitFromIndirectObject(COSIndirectObject io)

Constructors
COSObjectWalkerDeep
public COSObjectWalkerDeep()

COSObjectWalkerDeep
public COSObjectWalkerDeep(boolean swap)

Methods
getVisited
public java.util.Set getVisited()

Page 325 of 1521


de.intarsys.pdf.cos.COSObjectWalkerDeep

(continued from last page)

visitFromIndirectObject
public Object visitFromIndirectObject(COSIndirectObject io)
throws COSVisitorException

Page 326 of 1521


de.intarsys.pdf.cos.COSObjectWalkerShallow

de.intarsys.pdf.cos
Class COSObjectWalkerShallow
java.lang.Object
|
+-de.intarsys.pdf.cos.COSObjectWalkerShallow
All Implemented Interfaces:
ICOSObjectVisitor

Direct Known Subclasses:


COSObjectWalkerDeep

public class COSObjectWalkerShallow


extends Object
implements ICOSObjectVisitor

Adapter implementation for visiting a COS object structure without navigating the indirect references.

More precise, this one will visit the directed acyclic data structure originating from a COS object.

Constructor Summary
public COSObjectWalkerShallow()

Method Summary
Object visitFromArray(COSArray array)

Object visitFromBoolean(COSBoolean bool)

Object visitFromDictionary(COSDictionary dict)

Object visitFromFixed(COSFixed fixed)

Object visitFromIndirectObject(COSIndirectObject io)

Object visitFromInteger(COSInteger integer)

Object visitFromName(COSName name)

Object visitFromNull(COSNull nullObj)

Object visitFromStream(COSStream stream)

Object visitFromString(COSString string)

Constructors

Page 327 of 1521


de.intarsys.pdf.cos.COSObjectWalkerShallow

(continued from last page)

COSObjectWalkerShallow
public COSObjectWalkerShallow()

Methods
visitFromArray
public Object visitFromArray(COSArray array)
throws COSVisitorException

visitFromBoolean
public Object visitFromBoolean(COSBoolean bool)
throws COSVisitorException

visitFromDictionary
public Object visitFromDictionary(COSDictionary dict)
throws COSVisitorException

visitFromFixed
public Object visitFromFixed(COSFixed fixed)
throws COSVisitorException

visitFromInteger
public Object visitFromInteger(COSInteger integer)
throws COSVisitorException

visitFromName
public Object visitFromName(COSName name)
throws COSVisitorException

visitFromNull
public Object visitFromNull(COSNull nullObj)
throws COSVisitorException

Page 328 of 1521


de.intarsys.pdf.cos.COSObjectWalkerShallow

(continued from last page)

visitFromStream
public Object visitFromStream(COSStream stream)
throws COSVisitorException

visitFromString
public Object visitFromString(COSString string)
throws COSVisitorException

visitFromIndirectObject
public Object visitFromIndirectObject(COSIndirectObject io)
throws COSVisitorException

Page 329 of 1521


de.intarsys.pdf.cos.COSPrimitiveObject

de.intarsys.pdf.cos
Class COSPrimitiveObject
java.lang.Object
|
+-de.intarsys.pdf.cos.COSDocumentElement
|
+-de.intarsys.pdf.cos.COSObject
|
+-de.intarsys.pdf.cos.COSPrimitiveObject
All Implemented Interfaces:
ICOSExceptionHandler, de.intarsys.tools.component.ISaveStateSupport

Direct Known Subclasses:


COSBoolean, COSName, COSNull, COSNumber, COSString

public abstract class COSPrimitiveObject


extends COSObject

Primitive COS datatypes. These objects are "immutable" in their PDF semantics. The container may change!

Method Summary
void addObjectListener(ICOSObjectListener listener)

java.util.Iterator basicIterator()

COSObject copyDeep()

COSObject copyDeep(java.util.Map copied)

boolean isDangling()

boolean isObjectListenerAvailable()

boolean isPrimitive()

java.util.Iterator iterator()

void removeObjectListener(ICOSObjectListener listener)

Methods
addObjectListener
public void addObjectListener(ICOSObjectListener listener)

Add a listener for object changes.

Page 330 of 1521


de.intarsys.pdf.cos.COSPrimitiveObject

basicIterator
public java.util.Iterator basicIterator()

An iterator over contained objects and references. The iterator is an empty iterator if this is not a container.

This iterator returns COSDocumentElements, leaving references alone.

copyDeep
public COSObject copyDeep()

Make a deep copy of the receiver within the same document. The result is a "PDF semantic" deep copy, implementation
artifacts as "attributes" and listeners are NOT copied.

The algorithm copies this along with all outgoing references (recursively).

Object identity is preserved.

Be careful when copying objects, as there are semantics that may NOT be recognized by this method.

copyDeep
public COSObject copyDeep(java.util.Map copied)

Make a deep copy of the receiver within the same document. The result is a "PDF semantic" deep copy, implementation
artifacts as "attributes" and listeners are NOT copied.

The copied map is used to identify objects copied in earlier runs of this method to avoid duplicating resources used in
different copy targets (for example the pages of a document). copied is modified while executing copyDeep and contains
a mapping from indirect objects in the original document to copied objects.

The algorithm copies this along with all outgoing references (recursively).

Object identity is preserved.

Be careful when copying objects, as there are semantics that may NOT be recognized by this method.

isDangling
public boolean isDangling()

true if this object is not contained in a document directly or indirectly. This is especially true when an object is new (or
reset to this state when an undo happend). Remember that an object can still be garbage, even if it is not dangling.

isPrimitive
public boolean isPrimitive()

Answer true if this object is of a primitive type

iterator
public java.util.Iterator iterator()

An iterator over contained objects. The iterator is an empty iterator if this is not a container.

This iterator returns only COSObject instances, references are dereferenced.

Page 331 of 1521


de.intarsys.pdf.cos.COSPrimitiveObject

(continued from last page)

removeObjectListener
public void removeObjectListener(ICOSObjectListener listener)

Remove a listener for object changes.

isObjectListenerAvailable
public boolean isObjectListenerAvailable()

true if an ICOSObjectListener is registered. This is for test purposes.

Page 332 of 1521


de.intarsys.pdf.cos.COSRuntimeException

de.intarsys.pdf.cos
Class COSRuntimeException
java.lang.Object
|
+-java.lang.Throwable
|
+-java.lang.Exception
|
+-java.lang.RuntimeException
|
+-de.intarsys.pdf.cos.COSRuntimeException
All Implemented Interfaces:
java.io.Serializable

Direct Known Subclasses:


COSSwapException

public class COSRuntimeException


extends RuntimeException

An exception indicating an unexpected COS related error at runtime.

Constructor Summary
public COSRuntimeException()

public COSRuntimeException(String message, Throwable cause)

public COSRuntimeException(String message)

public COSRuntimeException(Throwable cause)

Constructors
COSRuntimeException
public COSRuntimeException()

COSRuntimeException
public COSRuntimeException(String message,
Throwable cause)

COSRuntimeException
public COSRuntimeException(String message)

Page 333 of 1521


de.intarsys.pdf.cos.COSRuntimeException

(continued from last page)

COSRuntimeException
public COSRuntimeException(Throwable cause)

Page 334 of 1521


de.intarsys.pdf.cos.COSStream

de.intarsys.pdf.cos
Class COSStream
java.lang.Object
|
+-de.intarsys.pdf.cos.COSDocumentElement
|
+-de.intarsys.pdf.cos.COSObject
|
+-de.intarsys.pdf.cos.COSCompositeObject
|
+-de.intarsys.pdf.cos.COSStream
All Implemented Interfaces:
ICOSExceptionHandler, de.intarsys.tools.component.ISaveStateSupport, IAttributeSupport, ICOSContainer

public class COSStream


extends COSCompositeObject

An object representing stream data in a PDF document. Unlike a string, stream data is not restricted in length. Stream data may be
encoded with the filter implementation.

Field Summary
public static final DK_DecodeParms

public static final DK_DP

public static final DK_F

public static final DK_FDecodeParams

public static final DK_FFilter

public static final DK_Filter

public static final DK_Length

public static final DK_Resources

public static final SLOT_BYTES

Method Summary
Object accept(ICOSObjectVisitor visitor)

void addFilter(COSName name)


Add a new filter to this.

void addObjectListener(ICOSObjectListener listener)

Page 335 of 1521


de.intarsys.pdf.cos.COSStream

COSStream asStream()

java.util.Iterator basicIterator()

void basicSetDecodedBytes(byte[] newBytes)


Set the streams logical content.

void basicSetEncodedBytes(byte[] newBytes)


Set the streams physical content.

COSStream copyDecodeFirst()
A copy of this, bytes decoded.

COSObject copyDeep(java.util.Map copied)

COSObject copyShallow()

static COSStream create(COSDictionary dict)


Create a new COSStream.

int getAnyLength()
The declared or real length for this.

byte[] getDecodedBytes()
The unfiltered (logical) stream content.

byte[] getDecodedBytesWritable()
The unfiltered content as in getDecodedBytes, but allow the caller to manipulate the result
by copying/not caching the returned bytes

COSObject getDecodeParams()
The options or an array of options for filtering.

static COSObject getDecodeParams(COSDictionary dict)


The options or an array of options for filtering.

static COSDictionary getDecodeParams(COSDictionary dict, COSName name)


The options corresponding to the first occurence of the filter name.

COSObject getDecodeParams(COSName name)


The options corresponding to the first occurence of the filter name.

COSDictionary getDict()
The stream dictionary

byte[] getEncodedBytes()
The filtered (physical) stream content.

COSObject getFilters()
Return the filter or the collection of filters for the stream.

static COSObject getFilters(COSDictionary dict)


Return the filter or the collection of filters for the stream.

COSDictionary getFirstDecodeParam()
A dictionary with filter options or the first element of an array of such dictionaries for each
filter.

Page 336 of 1521


de.intarsys.pdf.cos.COSStream

COSName getFirstFilter()
The filter or the first element of the collection of filters for the stream.

int getLength()
The length of the filtered content

static boolean hasFilter(COSDictionary dict, COSName name)


true if the stream hs declared a filter name.

boolean hasFilter(COSName name)


true if the stream hs declared a filter name.

boolean isExternal()
true if the stream dictionary contains the F key.

static boolean isExternal(COSDictionary dict)


true if the stream dictionary contains the F key.

java.util.Iterator iterator()

void removeFilters()
Remove all filters from this.

void removeObjectListener(ICOSObjectListener listener)

void restoreState(Object object)

Object saveState()

void setDecodedBytes(byte[] newBytes)


Set the streams logical content

void setEncodedBytes(byte[] newBytes)


Set the stream physical content.

Fields
SLOT_BYTES
public static final java.lang.Object SLOT_BYTES

DK_DecodeParms
public static final de.intarsys.pdf.cos.COSName DK_DecodeParms

DK_DP
public static final de.intarsys.pdf.cos.COSName DK_DP

Page 337 of 1521


de.intarsys.pdf.cos.COSStream

DK_F
public static final de.intarsys.pdf.cos.COSName DK_F

DK_FDecodeParams
public static final de.intarsys.pdf.cos.COSName DK_FDecodeParams

DK_FFilter
public static final de.intarsys.pdf.cos.COSName DK_FFilter

DK_Filter
public static final de.intarsys.pdf.cos.COSName DK_Filter

DK_Length
public static final de.intarsys.pdf.cos.COSName DK_Length

DK_Resources
public static final de.intarsys.pdf.cos.COSName DK_Resources

Methods
create
public static COSStream create(COSDictionary dict)

Create a new COSStream.

Parameters:
dict - An optional dictionary to be used as the streams dictionary.

Returns:
Create a new COSStream.

getDecodeParams
public static COSObject getDecodeParams(COSDictionary dict)

The options or an array of options for filtering.

Returns:

Page 338 of 1521


de.intarsys.pdf.cos.COSStream

(continued from last page)

The options or an array of options for filtering.

getDecodeParams
public static COSDictionary getDecodeParams(COSDictionary dict,
COSName name)

The options corresponding to the first occurence of the filter name.

Returns:
The options corresponding to the first occurence of the filter name.

getFilters
public static COSObject getFilters(COSDictionary dict)

Return the filter or the collection of filters for the stream.

Returns:
The filter or the collection of filters for the stream.

hasFilter
public static boolean hasFilter(COSDictionary dict,
COSName name)

true if the stream hs declared a filter name.

Parameters:
name - The name of the filter.

Returns:
true if the stream hs declared a filter name.

isExternal
public static boolean isExternal(COSDictionary dict)

true if the stream dictionary contains the F key.

Returns:
true if the stream dictionary contains the F key.

accept
public Object accept(ICOSObjectVisitor visitor)
throws COSVisitorException

Accept a visitor object. The receiver selects the correct implementation in the visitor by "double dispatching".

addFilter
public void addFilter(COSName name)

Add a new filter to this.

Parameters:
name - The logical naem of the filter.

Page 339 of 1521


de.intarsys.pdf.cos.COSStream

addObjectListener
public void addObjectListener(ICOSObjectListener listener)

Add a listener for object changes.

asStream
public COSStream asStream()

basicIterator
public java.util.Iterator basicIterator()

An iterator over contained objects and references. The iterator is an empty iterator if this is not a container.

This iterator returns COSDocumentElements, leaving references alone.

basicSetDecodedBytes
public void basicSetDecodedBytes(byte[] newBytes)

Set the streams logical content.

Parameters:
newBytes - the logical content for the stream

basicSetEncodedBytes
public void basicSetEncodedBytes(byte[] newBytes)

Set the streams physical content.

Parameters:
newBytes - the physical content for the stream

copyDecodeFirst
public COSStream copyDecodeFirst()
throws java.io.IOException

A copy of this, bytes decoded.

Returns:
A copy of this, bytes decoded.

Throws:
IOException

copyDeep
public COSObject copyDeep(java.util.Map copied)

Page 340 of 1521


de.intarsys.pdf.cos.COSStream

(continued from last page)

Make a deep copy of the receiver within the same document. The result is a "PDF semantic" deep copy, implementation
artifacts as "attributes" and listeners are NOT copied.

The copied map is used to identify objects copied in earlier runs of this method to avoid duplicating resources used in
different copy targets (for example the pages of a document). copied is modified while executing copyDeep and contains
a mapping from indirect objects in the original document to copied objects.

The algorithm copies this along with all outgoing references (recursively).

Object identity is preserved.

Be careful when copying objects, as there are semantics that may NOT be recognized by this method.

copyShallow
public COSObject copyShallow()

Make a copy of the receiver.

A copy is made of the receiver and after this recursively of all not indirect objects.

Be careful when copying objects, as there are semantics that may NOT be recognized by this method.

getAnyLength
public int getAnyLength()

The declared or real length for this.

Returns:
The declared or real length for this.

getDecodedBytes
public byte[] getDecodedBytes()

The unfiltered (logical) stream content. It is not intended to manipulate the byte array directly.

Returns:
The unfiltered (logical) stream content

Throws:
IOException

getDecodedBytesWritable
public byte[] getDecodedBytesWritable()

The unfiltered content as in getDecodedBytes, but allow the caller to manipulate the result by copying/not caching the
returned bytes

Returns:
The unfiltered content as in getDecodedBytes

getDecodeParams
public COSObject getDecodeParams()

The options or an array of options for filtering.

Returns:

Page 341 of 1521


de.intarsys.pdf.cos.COSStream

(continued from last page)

The options or an array of options for filtering.

getDecodeParams
public COSObject getDecodeParams(COSName name)

The options corresponding to the first occurence of the filter name.

Returns:
The options corresponding to the first occurence of the filter name.

getDict
public COSDictionary getDict()

The stream dictionary

Returns:
The stream dictionary

getEncodedBytes
public byte[] getEncodedBytes()

The filtered (physical) stream content. If it must be generated first, then the content length is adjusted as a side effect. It is
not intended to manipulate the byte array directly.

Returns:
The filtered (physical) stream content

getFilters
public COSObject getFilters()

Return the filter or the collection of filters for the stream.

Returns:
The filter or the collection of filters for the stream.

getFirstDecodeParam
public COSDictionary getFirstDecodeParam()

A dictionary with filter options or the first element of an array of such dictionaries for each filter.

Returns:
A dictionary with filter options or the first element of an array of such dictionaries for each filter.

getFirstFilter
public COSName getFirstFilter()

The filter or the first element of the collection of filters for the stream.

Returns:
The filter or the first element of the collection of filters for the stream.

Page 342 of 1521


de.intarsys.pdf.cos.COSStream

(continued from last page)

getLength
public int getLength()

The length of the filtered content

Returns:
The length of the filtered content

hasFilter
public boolean hasFilter(COSName name)

true if the stream hs declared a filter name.

Parameters:
name - The name of the filter.

Returns:
true if the stream hs declared a filter name.

isExternal
public boolean isExternal()

true if the stream dictionary contains the F key.

Returns:
true if the stream dictionary contains the F key.

iterator
public java.util.Iterator iterator()

An iterator over contained objects. The iterator is an empty iterator if this is not a container.

This iterator returns only COSObject instances, references are dereferenced.

removeFilters
public void removeFilters()

Remove all filters from this.

removeObjectListener
public void removeObjectListener(ICOSObjectListener listener)

Remove a listener for object changes.

restoreState
public void restoreState(Object object)

Page 343 of 1521


de.intarsys.pdf.cos.COSStream

(continued from last page)

saveState
public Object saveState()

setDecodedBytes
public void setDecodedBytes(byte[] newBytes)

Set the streams logical content

Parameters:
newBytes - The logical content for the stream

setEncodedBytes
public void setEncodedBytes(byte[] newBytes)

Set the stream physical content.

Parameters:
newBytes - the physical content for the stream

Page 344 of 1521


de.intarsys.pdf.cos.COSString

de.intarsys.pdf.cos
Class COSString
java.lang.Object
|
+-de.intarsys.pdf.cos.COSDocumentElement
|
+-de.intarsys.pdf.cos.COSObject
|
+-de.intarsys.pdf.cos.COSPrimitiveObject
|
+-de.intarsys.pdf.cos.COSString
All Implemented Interfaces:
Comparable, ICOSExceptionHandler, de.intarsys.tools.component.ISaveStateSupport

public class COSString


extends COSPrimitiveObject
implements de.intarsys.tools.component.ISaveStateSupport, ICOSExceptionHandler, Comparable

The string representation for a pdf document

Method Summary
Object accept(ICOSObjectVisitor visitor)

COSString asString()

byte[] byteValue()
The bytes that make up this string.

int compareTo(Object o)

static COSString create(byte[] bytes)


Create a COSString from bytes.

static COSString create(String string)


Create a COSString from string.

static COSString createHex(byte[] bytes)


Create a COSString from bytes in hex representation.

static COSString createHex(String string)


Create a COSString from string in hex representation.

static COSString createMultiLine(String string)


Create a COSString from string, escaoing all newlines.

boolean equals(Object o)

int hashCode()

String hexStringValue()
Show a hex encoded representation of the strings content.

Page 345 of 1521


de.intarsys.pdf.cos.COSString

boolean isHexMode()
true if this string has to be saved as hex representation

String multiLineStringValue()
A Java java.lang.String with correctly expanded newlines.

void restoreState(Object object)

Object saveState()

void setHexMode(boolean newHexMode)


Set the flag if this is written in hex representation

String stringValue()
The Java java.lang.String representation of the receiver

Methods
create
public static COSString create(byte[] bytes)

Create a COSString from bytes.

Parameters:
bytes

Returns:
The new COSString

create
public static COSString create(String string)

Create a COSString from string.

Parameters:
string

Returns:
The new COSString

createHex
public static COSString createHex(byte[] bytes)

Create a COSString from bytes in hex representation.

Parameters:
bytes

Returns:
The new COSString

Page 346 of 1521


de.intarsys.pdf.cos.COSString

(continued from last page)

createHex
public static COSString createHex(String string)

Create a COSString from string in hex representation.

Parameters:
string

Returns:
The new COSString

createMultiLine
public static COSString createMultiLine(String string)

Create a COSString from string, escaoing all newlines.

Parameters:
string

Returns:
The new COSString

accept
public Object accept(ICOSObjectVisitor visitor)
throws COSVisitorException

Accept a visitor object. The receiver selects the correct implementation in the visitor by "double dispatching".

asString
public COSString asString()

hexStringValue
public String hexStringValue()

Show a hex encoded representation of the strings content.

Returns:
Show a hex encoded representation of the strings content.

byteValue
public byte[] byteValue()

The bytes that make up this string.

Returns:
The bytes that make up this string.

compareTo
public int compareTo(Object o)

Page 347 of 1521


de.intarsys.pdf.cos.COSString

(continued from last page)

equals
public boolean equals(Object o)

hashCode
public int hashCode()

isHexMode
public boolean isHexMode()

true if this string has to be saved as hex representation

Returns:
true if this string has to be saved as hex representation

multiLineStringValue
public String multiLineStringValue()

A Java java.lang.String with correctly expanded newlines.

Returns:
A Java java.lang.String with correctly expanded newlines.

restoreState
public void restoreState(Object object)

saveState
public Object saveState()

setHexMode
public void setHexMode(boolean newHexMode)

Set the flag if this is written in hex representation

Parameters:
newHexMode - true if this is written in hex representation

stringValue
public String stringValue()

The Java java.lang.String representation of the receiver

Page 348 of 1521


de.intarsys.pdf.cos.COSString

(continued from last page)

Returns:
The Java java.lang.String representation of the receiver

Page 349 of 1521


de.intarsys.pdf.cos.COSSwapException

de.intarsys.pdf.cos
Class COSSwapException
java.lang.Object
|
+-java.lang.Throwable
|
+-java.lang.Exception
|
+-java.lang.RuntimeException
|
+-de.intarsys.pdf.cos.COSRuntimeException
|
+-de.intarsys.pdf.cos.COSSwapException
All Implemented Interfaces:
java.io.Serializable

public class COSSwapException


extends COSRuntimeException

An exception while swapping a COSObject.

Constructor Summary
public COSSwapException()

public COSSwapException(String message)

public COSSwapException(Throwable cause)

public COSSwapException(String message, Throwable cause)

Constructors
COSSwapException
public COSSwapException()

COSSwapException
public COSSwapException(String message)

COSSwapException
public COSSwapException(Throwable cause)

Page 350 of 1521


de.intarsys.pdf.cos.COSSwapException

COSSwapException
public COSSwapException(String message,
Throwable cause)

Page 351 of 1521


de.intarsys.pdf.cos.COSTools

de.intarsys.pdf.cos
Class COSTools
java.lang.Object
|
+-de.intarsys.pdf.cos.COSTools

public class COSTools


extends Object

Some tools to ease life with COS.

Method Summary
static COSObject createObject(Object javaObject)
Try the best in marshalling java objects directly to COSObject.

static java.util.List getVersions(COSDocument doc)


A collection of ILocator instances, representing the versions created when writing
incrementally.

static COSDictionary toDictionary(COSObject object)


Tries to force a dictionary out of the COSObject.

Methods
toDictionary
public static COSDictionary toDictionary(COSObject object)

Tries to force a dictionary out of the COSObject.

Parameters:
object - The object to be cast to a COSDictionary

Returns:
COSDictionary or null

createObject
public static COSObject createObject(Object javaObject)

Try the best in marshalling java objects directly to COSObject. Collections will be marshalled recursively.

Parameters:
javaObject - the java object to be marshalled

Returns:
The resulting COSObject

Page 352 of 1521


de.intarsys.pdf.cos.COSTools

(continued from last page)

getVersions
public static java.util.List getVersions(COSDocument doc)
throws java.io.IOException,
COSLoadException

A collection of ILocator instances, representing the versions created when writing incrementally.

Parameters:
doc - The original document.

Returns:
A collection of ILocator instances, representing the versions created when writing incrementally.

Throws:
IOException
COSLoadException

Page 353 of 1521


de.intarsys.pdf.cos.COSTrailer

de.intarsys.pdf.cos
Class COSTrailer
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.cos.COSTrailer
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class COSTrailer


extends COSBasedObject

The document trailer.

Nested Class Summary


class COSTrailer.MetaClass
COSTrailer.MetaClass

Field Summary
public static final DK_Encrypt

public static final DK_ID

public static final DK_Info


The well known attribute names

public static final DK_Prev

public static final DK_Root

public static final DK_Size

public static final DK_XRefStm

public static final META


The meta class instance

Method Summary
COSDictionary cosGetEncryption()
The /Encrypt field of the trailer.

COSArray cosGetID()
The /ID field of the trailer.

void cosSetEncryption(COSDictionary encryption)


Set the /Encrypt field of the trailer.

Page 354 of 1521


de.intarsys.pdf.cos.COSTrailer

COSInfoDict getInfoDict()
The COSInfoDict containing metadata.

int getPrev()

COSCatalog getRoot()
Get the root object (the catalog) for the document.

int getSize()

void invalidateCaches()

void setInfoDict(COSInfoDict infoDict)


Set the info dictionary containing metadata.

void setRoot(COSCatalog root)


Set the catalog.

void updateFileID()
Generates a unique file ID array (10.3).

Fields
DK_Info
public static final de.intarsys.pdf.cos.COSName DK_Info

The well known attribute names

DK_Prev
public static final de.intarsys.pdf.cos.COSName DK_Prev

DK_Root
public static final de.intarsys.pdf.cos.COSName DK_Root

DK_Size
public static final de.intarsys.pdf.cos.COSName DK_Size

DK_Encrypt
public static final de.intarsys.pdf.cos.COSName DK_Encrypt

Page 355 of 1521


de.intarsys.pdf.cos.COSTrailer

(continued from last page)

DK_ID
public static final de.intarsys.pdf.cos.COSName DK_ID

DK_XRefStm
public static final de.intarsys.pdf.cos.COSName DK_XRefStm

META
public static final de.intarsys.pdf.cos.COSTrailer.MetaClass META

The meta class instance

Methods
setInfoDict
public void setInfoDict(COSInfoDict infoDict)

Set the info dictionary containing metadata.

Parameters:
infoDict - The info dictionary containing metadata.

getInfoDict
public COSInfoDict getInfoDict()

The COSInfoDict containing metadata.

Returns:
The COSInfoDict containing metadata.

getPrev
public int getPrev()

Returns:
Offset of previous trailer dict or -1 if none exists

getSize
public int getSize()

Returns:
Total number of indirect objects in the document

Page 356 of 1521


de.intarsys.pdf.cos.COSTrailer

(continued from last page)

setRoot
public void setRoot(COSCatalog root)

Set the catalog.

Parameters:
root - The document catalog

getRoot
public COSCatalog getRoot()

Get the root object (the catalog) for the document.

Returns:
The root object (the catalog) for the document.

cosGetID
public COSArray cosGetID()

The /ID field of the trailer.

Returns:
The /ID field of the trailer.

updateFileID
public void updateFileID()

Generates a unique file ID array (10.3).

cosSetEncryption
public void cosSetEncryption(COSDictionary encryption)

Set the /Encrypt field of the trailer.

Parameters:
encryption - The new encryption dictionary

cosGetEncryption
public COSDictionary cosGetEncryption()

The /Encrypt field of the trailer.

Returns:
The /Encrypt field of the trailer.

invalidateCaches
public void invalidateCaches()

Invalidate all local caches as the base object may have changed.

Page 357 of 1521


de.intarsys.pdf.cos.COSTrailer.MetaClass

de.intarsys.pdf.cos
Class COSTrailer.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.cos.COSTrailer.MetaClass

public static class COSTrailer.MetaClass


extends COSBasedObject.MetaClass

The meta class implementation

Page 358 of 1521


de.intarsys.pdf.cos.COSTrue

de.intarsys.pdf.cos
Class COSTrue
java.lang.Object
|
+-de.intarsys.pdf.cos.COSDocumentElement
|
+-de.intarsys.pdf.cos.COSObject
|
+-de.intarsys.pdf.cos.COSPrimitiveObject
|
+-de.intarsys.pdf.cos.COSBoolean
|
+-de.intarsys.pdf.cos.COSTrue
All Implemented Interfaces:
ICOSExceptionHandler, de.intarsys.tools.component.ISaveStateSupport

public class COSTrue


extends COSBoolean

Represents the boolean value "true"

Method Summary
boolean booleanValue()

static COSTrue create()

boolean equals(Object o)

int hashCode()
Returns an arbitrary number to avoid collisions

Object saveState()

Methods
create
public static COSTrue create()

booleanValue
public boolean booleanValue()

The boolean value for this.

equals
public boolean equals(Object o)

Page 359 of 1521


de.intarsys.pdf.cos.COSTrue

(continued from last page)

hashCode
public int hashCode()

Returns an arbitrary number to avoid collisions

Returns:
19

See Also:
Object.hashCode()

saveState
public Object saveState()

Page 360 of 1521


de.intarsys.pdf.cos.COSVisitorException

de.intarsys.pdf.cos
Class COSVisitorException
java.lang.Object
|
+-java.lang.Throwable
|
+-java.lang.Exception
|
+-de.intarsys.pdf.cos.COSVisitorException
All Implemented Interfaces:
java.io.Serializable

public class COSVisitorException


extends Exception

An exceptional condition while performing an ICOSObjectVisitor.

Constructor Summary
public COSVisitorException()

public COSVisitorException(String message, Throwable cause)

public COSVisitorException(String message)

public COSVisitorException(Throwable cause)

Constructors
COSVisitorException
public COSVisitorException()

COSVisitorException
public COSVisitorException(String message,
Throwable cause)

COSVisitorException
public COSVisitorException(String message)

Page 361 of 1521


de.intarsys.pdf.cos.COSVisitorException

(continued from last page)

COSVisitorException
public COSVisitorException(Throwable cause)

Page 362 of 1521


de.intarsys.pdf.cos.ICOSContainer

de.intarsys.pdf.cos
Interface ICOSContainer
All Known Implementing Classes:
COSCompositeObject, COSDocument, COSIndirectObject

public interface ICOSContainer


extends

A low level interface for polymorphic access to an object containing a COSObject.

This is implemented for example by COSArray.

Method Summary
ICOSContainer associate(ICOSContainer newContainer, COSObject object)
It is the responsibility of the current container to create the association with the new one.

COSDocumentElement containable(COSObject object)


The stand-in to be used when object should be contained in a container.

ICOSContainer disassociate(ICOSContainer oldContainer, COSObject object)


It is the responsibility of the current container to remove the association from the old one.

COSDocument getDoc()
The COSDocument instance where the ICOSContainer is contained.

int referenceCount()
The number of references to the contained object.

COSIndirectObject referenceIndirect(COSObject object)


Switch a contained object to an indirect one.

void register(COSDocumentElement object)


It is the responsibility of the active container to register object in its data structures.

ICOSContainer restoreStateContainer(ICOSContainer container)


Restore the save state for the container.

ICOSContainer saveStateContainer()
Create a save state for the container when saving the COSObject state.

void willChange(COSObject object)


Propagate a change from a COSObject down in the hierarchy.

Methods
associate
public ICOSContainer associate(ICOSContainer newContainer,
COSObject object)

Page 363 of 1521


de.intarsys.pdf.cos.ICOSContainer

(continued from last page)

It is the responsibility of the current container to create the association with the new one. The table shows the available
transitions | composite | indirect | | constant | n.a. | n.a. | (always copied before by
"containable") null | ok | ok | composite | error | ok | indirect | ok | ok |

Parameters:
newContainer
object

Returns:
The resulting ICOSContainer for object

disassociate
public ICOSContainer disassociate(ICOSContainer oldContainer,
COSObject object)
It is the responsibility of the current container to remove the association from the old one. The table shows the available
transitions.

| composite | indirect |
|
constant | n.a. | n.a. |
null | n.a. | n.a. |
composite | ok | n.a. |
indirect | ok | n.a. |

Parameters:
oldContainer
object

Returns:
The resulting ICOSContainer for object

containable
public COSDocumentElement containable(COSObject object)

The stand-in to be used when object should be contained in a container. This is either the object itself or the
COSIndirectObject to it.

Parameters:
object - THe object whose containable is requested.

Returns:
The stand-in to be used when object should be contained in a container.

getDoc
public COSDocument getDoc()

The COSDocument instance where the ICOSContainer is contained.

Returns:
The COSDocument instance where the ICOSContainer is contained.

Page 364 of 1521


de.intarsys.pdf.cos.ICOSContainer

willChange
public void willChange(COSObject object)

Propagate a change from a COSObject down in the hierarchy.

referenceCount
public int referenceCount()

The number of references to the contained object. This method returns -1 when the value can not be determined (as for
indirect objects parsed from a file).

Returns:
The number of references to the contained object.

referenceIndirect
public COSIndirectObject referenceIndirect(COSObject object)

Switch a contained object to an indirect one. Update the reference.

Parameters:
object - The object to be indirect

register
public void register(COSDocumentElement object)

It is the responsibility of the active container to register object in its data structures.

Parameters:
object - The new object to be registered in the hierarchy.

restoreStateContainer
public ICOSContainer restoreStateContainer(ICOSContainer container)

Restore the save state for the container.

Parameters:
container

Returns:
The "before" state of the receiver.

saveStateContainer
public ICOSContainer saveStateContainer()

Create a save state for the container when saving the COSObject state.

Returns:
The save state for the container.

Page 365 of 1521


de.intarsys.pdf.cos.ICOSDocumentFactory

de.intarsys.pdf.cos
Interface ICOSDocumentFactory
All Known Implementing Classes:
StandardDocumentFactory

public interface ICOSDocumentFactory


extends

An object that is able to create a COSDocument with the help of a locator object that designates the physical source.

Possible implementations include parsing the associated input stream or looking up previous results in a cache.

Method Summary
COSDocument createDocument(ILocator locator)
Create a COSDocument instance representing the object structure of the PDF file
designated by locator.

Methods
createDocument
public COSDocument createDocument(ILocator locator)
throws COSLoadException,
java.io.IOException

Create a COSDocument instance representing the object structure of the PDF file designated by locator.

Parameters:
locator - The reference to the physical source of the PDF file.

Returns:
A new COSDocument

Throws:
IOException
COSLoadException

Page 366 of 1521


de.intarsys.pdf.cos.ICOSDocumentListener

de.intarsys.pdf.cos
Interface ICOSDocumentListener

public interface ICOSDocumentListener


extends

A listener for changes in a COSDocument.

Method Summary
void changed(COSDocument document, Object slot, Object oldValue, Object
newValue)
A COSDocument has changed its internal state.

Methods
changed
public void changed(COSDocument document,
Object slot,
Object oldValue,
Object newValue)

A COSDocument has changed its internal state.

Parameters:
document - The document that has changed
slot - The slot in the object that has changed (or null for unspecified change).
oldValue - The old value of the slot if known.
newValue - The new value of the slot if known.

Page 367 of 1521


de.intarsys.pdf.cos.ICOSExceptionHandler

de.intarsys.pdf.cos
Interface ICOSExceptionHandler
All Known Implementing Classes:
COSDocument, COSDocumentElement

public interface ICOSExceptionHandler


extends

An object that can handle exceptions encountered when dealing with COSObject instances.

Method Summary
void handleException(COSRuntimeException ex)
Handle ex, optionally rethrow.

Methods
handleException
public void handleException(COSRuntimeException ex)
throws COSRuntimeException

Handle ex, optionally rethrow.

Parameters:
ex - The exceptioin to be handeled.

Throws:
COSRuntimeException

Page 368 of 1521


de.intarsys.pdf.cos.ICOSMonitor

de.intarsys.pdf.cos
Interface ICOSMonitor

public interface ICOSMonitor


extends

Method Summary
void willChange(Object object)

Methods
willChange
public void willChange(Object object)

Page 369 of 1521


de.intarsys.pdf.cos.ICOSObjectListener

de.intarsys.pdf.cos
Interface ICOSObjectListener
All Known Implementing Classes:
COSBasedObject

public interface ICOSObjectListener


extends

A listener for changes in a COSObject.

Method Summary
void changed(COSObject object, Object slot, Object oldValue, Object
newValue)
A COSObject has changed its internal state.

Methods
changed
public void changed(COSObject object,
Object slot,
Object oldValue,
Object newValue)

A COSObject has changed its internal state. For any COSObject this may be a change in containement (slot ==
COSObject.SLOT_CONTAINER).

For containers itself, this may be a change in the collection of contained objects. For dictionaries, slot will be the COSName
of the changed entry, for arrays slot will be the java.lang.Integer key. A stream may indicate a change in its byte
content using (slot == COSStream.SLOT_BYTES).

A slot value of null may indicate a "changed all" event. For example you can expect for a clear operation on an array
only a single "changed all" event.

Parameters:
object - The object that has changed
slot - The slot in the object that has changed (or null for unspecified change).
oldValue - The old value of the slot if known.
newValue - The new value of the slot if known.

Page 370 of 1521


de.intarsys.pdf.cos.ICOSObjectVisitor

de.intarsys.pdf.cos
Interface ICOSObjectVisitor
All Known Implementing Classes:
COSWriter, COSObjectWalkerShallow

public interface ICOSObjectVisitor


extends

An interface for visiting a COS object structure.

Method Summary
Object visitFromArray(COSArray array)
Notification of visit to COSArray object.

Object visitFromBoolean(COSBoolean bool)


Notification of visit to COSBoolean object.

Object visitFromDictionary(COSDictionary dict)


Notification of visit to COSDictionary object.

Object visitFromFixed(COSFixed fixed)


Notification of visit to COSFixed object.

Object visitFromIndirectObject(COSIndirectObject indirect)


Notification of visit to COSIndirectObject object.

Object visitFromInteger(COSInteger integer)


Notification of visit to COSInteger object.

Object visitFromName(COSName name)


Notification of visit to COSName object.

Object visitFromNull(COSNull nullObj)


Notification of visit to COSNull object.

Object visitFromStream(COSStream stream)


Notification of visit to COSStream object.

Object visitFromString(COSString string)


Notification of visit to COSString object.

Methods
visitFromArray
public Object visitFromArray(COSArray array)
throws COSVisitorException

Notification of visit to COSArray object.

Parameters:
array - The Object that is being visited.

Page 371 of 1521


de.intarsys.pdf.cos.ICOSObjectVisitor

(continued from last page)

Returns:
any Object depending on the visitor implementation, or null

Throws:
COSVisitorException - If there is an error while visiting this object.

visitFromBoolean
public Object visitFromBoolean(COSBoolean bool)
throws COSVisitorException

Notification of visit to COSBoolean object.

Parameters:
bool - The Object that is being visited.

Returns:
any Object depending on the visitor implementation, or null

Throws:
COSVisitorException - If there is an error while visiting this object.

visitFromDictionary
public Object visitFromDictionary(COSDictionary dict)
throws COSVisitorException

Notification of visit to COSDictionary object.

Parameters:
dict - The Object that is being visited.

Returns:
any Object depending on the visitor implementation, or null

Throws:
COSVisitorException - If there is an error while visiting this object.

visitFromFixed
public Object visitFromFixed(COSFixed fixed)
throws COSVisitorException

Notification of visit to COSFixed object.

Parameters:
fixed - The Object that is being visited.

Returns:
any Object depending on the visitor implementation, or null

Throws:
COSVisitorException - If there is an error while visiting this object.

visitFromInteger
public Object visitFromInteger(COSInteger integer)
throws COSVisitorException

Page 372 of 1521


de.intarsys.pdf.cos.ICOSObjectVisitor

(continued from last page)

Notification of visit to COSInteger object.

Parameters:
integer - The Object that is being visited.

Returns:
any Object depending on the visitor implementation, or null

Throws:
COSVisitorException - If there is an error while visiting this object.

visitFromName
public Object visitFromName(COSName name)
throws COSVisitorException

Notification of visit to COSName object.

Parameters:
name - The Object that is being visited.

Returns:
any Object depending on the visitor implementation, or null

Throws:
COSVisitorException - If there is an error while visiting this object.

visitFromNull
public Object visitFromNull(COSNull nullObj)
throws COSVisitorException

Notification of visit to COSNull object.

Parameters:
nullObj - The Object that is being visited.

Returns:
any Object depending on the visitor implementation, or null

Throws:
COSVisitorException - If there is an error while visiting this object.

visitFromStream
public Object visitFromStream(COSStream stream)
throws COSVisitorException

Notification of visit to COSStream object.

Parameters:
stream - The Object that is being visited.

Returns:
any Object depending on the visitor implementation, or null

Throws:
COSVisitorException - If there is an error while visiting this object.

Page 373 of 1521


de.intarsys.pdf.cos.ICOSObjectVisitor

visitFromString
public Object visitFromString(COSString string)
throws COSVisitorException

Notification of visit to COSString object.

Parameters:
string - The Object that is being visited.

Returns:
any Object depending on the visitor implementation, or null

Throws:
COSVisitorException - If there is an error while visiting this object.

visitFromIndirectObject
public Object visitFromIndirectObject(COSIndirectObject indirect)
throws COSVisitorException

Notification of visit to COSIndirectObject object.

Parameters:
indirect - The Object that is being visited.

Returns:
any Object depending on the visitor implementation, or null

Throws:
COSVisitorException - If there is an error while visiting this object.

Page 374 of 1521


de.intarsys.pdf.cos.ICOSProxyVisitor

de.intarsys.pdf.cos
Interface ICOSProxyVisitor
All Known Implementing Classes:
COSWriter

public interface ICOSProxyVisitor


extends

An interface for visiting a proxy to a COSObject

Method Summary
Object visitFromProxy(COSObjectProxy obj)
Notification of visit to COSObjectProxy object.

Methods
visitFromProxy
public Object visitFromProxy(COSObjectProxy obj)
throws COSVisitorException

Notification of visit to COSObjectProxy object.

Parameters:
obj - The Object that is being visited.

Returns:
any Object depending on the visitor implementation, or null

Throws:
COSVisitorException - If there is an error while visiting this object.

Page 375 of 1521


de.intarsys.pdf.cos.MetaClass

de.intarsys.pdf.cos
Class MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
Direct Known Subclasses:
MetaClass

public class MetaClass


extends Object

Constructor Summary
public MetaClass(Class instanceClass)

Method Summary
Class getInstanceClass()

Class getRootClass()

static MetaClass lookup(Class clazz)

Constructors
MetaClass
public MetaClass(Class instanceClass)

Methods
getInstanceClass
public final Class getInstanceClass()

getRootClass
public Class getRootClass()

Page 376 of 1521


de.intarsys.pdf.cos.MetaClass

(continued from last page)

lookup
public static MetaClass lookup(Class clazz)

Page 377 of 1521


de.intarsys.pdf.cos.StandardDocumentFactory

de.intarsys.pdf.cos
Class StandardDocumentFactory
java.lang.Object
|
+-de.intarsys.pdf.cos.StandardDocumentFactory
All Implemented Interfaces:
ICOSDocumentFactory

public class StandardDocumentFactory


extends Object
implements ICOSDocumentFactory

A simple factory that creates a new document from the locator.

Constructor Summary
public StandardDocumentFactory()

Method Summary
COSDocument createDocument(ILocator locator)

Constructors
StandardDocumentFactory
public StandardDocumentFactory()

Methods
createDocument
public COSDocument createDocument(ILocator locator)
throws COSLoadException,
java.io.IOException

Page 378 of 1521


Package
de.intarsys.pdf.crypt
This package implements the security relevant aspects of the PDF spec.

Performing an encryption from scratch for a document is currently not implemented.

Page 379 of 1521


de.intarsys.pdf.crypt.AbstractAccessPermissions

de.intarsys.pdf.crypt
Class AbstractAccessPermissions
java.lang.Object
|
+-de.intarsys.pdf.pd.AbstractBitFlags
|
+-de.intarsys.pdf.crypt.AbstractAccessPermissions
All Implemented Interfaces:
IAccessPermissions

Direct Known Subclasses:


AccessPermissionsR2, AccessPermissionsR3

public abstract class AbstractAccessPermissions


extends AbstractBitFlags
implements IAccessPermissions

A set of flags describing the access permissions for the document.

These flags are defined for the standard security handlers, you can not rely on other handlers implementing the same logic.

todo 2 refactor, make independent od StandardSecurityHandler

Field Summary
public static Bit_Assemble

public static Bit_Copy

public static Bit_Extract

public static Bit_FillForm

public static Bit_Modify

public static Bit_ModifyAnnotation

public static Bit_Print

public static Bit_PrintHighQuality

Constructor Summary
public AbstractAccessPermissions(StandardSecurityHandler handler)

Method Summary
StandardSecurityHandl getHandler()
er

Page 380 of 1521


de.intarsys.pdf.crypt.AbstractAccessPermissions

Fields
Bit_Print
public static int Bit_Print

Bit_Modify
public static int Bit_Modify

Bit_Copy
public static int Bit_Copy

Bit_ModifyAnnotation
public static int Bit_ModifyAnnotation

Bit_FillForm
public static int Bit_FillForm

Bit_Extract
public static int Bit_Extract

Bit_Assemble
public static int Bit_Assemble

Bit_PrintHighQuality
public static int Bit_PrintHighQuality

Constructors
AbstractAccessPermissions
public AbstractAccessPermissions(StandardSecurityHandler handler)

Page 381 of 1521


de.intarsys.pdf.crypt.AbstractAccessPermissions

(continued from last page)

Methods
getHandler
public StandardSecurityHandler getHandler()

Returns:
handler for the encryption dictionary.

Page 382 of 1521


de.intarsys.pdf.crypt.AbstractCryptHandler

de.intarsys.pdf.crypt
Class AbstractCryptHandler
java.lang.Object
|
+-de.intarsys.pdf.crypt.AbstractCryptHandler
All Implemented Interfaces:
ICryptHandler

Direct Known Subclasses:


IdentityCryptHandler, StandardCryptHandler

public abstract class AbstractCryptHandler


extends Object
implements ICryptHandler

Abstract superclass for implementing ICryptHandler.

Constructor Summary
public AbstractCryptHandler()

Constructors
AbstractCryptHandler
public AbstractCryptHandler()

Page 383 of 1521


de.intarsys.pdf.crypt.AbstractSecurityHandler

de.intarsys.pdf.crypt
Class AbstractSecurityHandler
java.lang.Object
|
+-de.intarsys.pdf.crypt.AbstractSecurityHandler
All Implemented Interfaces:
ISecurityHandler

Direct Known Subclasses:


StandardSecurityHandler

public abstract class AbstractSecurityHandler


extends Object
implements ISecurityHandler

An abstract superclass for implementing ISecurityHandler.

The "state" part is implemented in the associated COSEncryption object.

Constructor Summary
public AbstractSecurityHandler()

Method Summary
COSEncryption getEncryption()

void init(STDocument document, COSEncryption pEncryption)

Constructors
AbstractSecurityHandler
public AbstractSecurityHandler()

Methods
getEncryption
public COSEncryption getEncryption()

Page 384 of 1521


de.intarsys.pdf.crypt.AbstractSecurityHandler

(continued from last page)

init
public void init(STDocument document,
COSEncryption pEncryption)
throws COSSecurityException

Page 385 of 1521


de.intarsys.pdf.crypt.AccessPermissionsFull

de.intarsys.pdf.crypt
Class AccessPermissionsFull
java.lang.Object
|
+-de.intarsys.pdf.crypt.AccessPermissionsFull
All Implemented Interfaces:
IAccessPermissions

public final class AccessPermissionsFull


extends Object
implements IAccessPermissions

Provide full access to PDF features.

Method Summary
static getActive()
AccessPermissionsFull

boolean mayAssemble()

boolean mayCopy()

boolean mayExtract()

boolean mayFillForm()

boolean mayModify()

boolean mayModifyAnnotation()

boolean mayPrint()

boolean mayPrintHighQuality()

Methods
getActive
public static AccessPermissionsFull getActive()

mayAssemble
public final boolean mayAssemble()

Page 386 of 1521


de.intarsys.pdf.crypt.AccessPermissionsFull

mayCopy
public final boolean mayCopy()

mayExtract
public final boolean mayExtract()

mayFillForm
public final boolean mayFillForm()

mayModify
public final boolean mayModify()

mayModifyAnnotation
public final boolean mayModifyAnnotation()

mayPrint
public final boolean mayPrint()

mayPrintHighQuality
public final boolean mayPrintHighQuality()

Page 387 of 1521


de.intarsys.pdf.crypt.AccessPermissionsR2

de.intarsys.pdf.crypt
Class AccessPermissionsR2
java.lang.Object
|
+-de.intarsys.pdf.pd.AbstractBitFlags
|
+-de.intarsys.pdf.crypt.AbstractAccessPermissions
|
+-de.intarsys.pdf.crypt.AccessPermissionsR2
All Implemented Interfaces:
IAccessPermissions

public class AccessPermissionsR2


extends AbstractAccessPermissions

The access permission flags as of /Standard handler, release 2 spec.

Constructor Summary
public AccessPermissionsR2(StandardSecurityHandler handler)

Method Summary
boolean mayAssemble()

boolean mayCopy()

boolean mayExtract()

boolean mayFillForm()

boolean mayModify()

boolean mayModifyAnnotation()

boolean mayPrint()

boolean mayPrintHighQuality()

Constructors
AccessPermissionsR2
public AccessPermissionsR2(StandardSecurityHandler handler)

Page 388 of 1521


de.intarsys.pdf.crypt.AccessPermissionsR2

(continued from last page)

Methods
mayAssemble
public boolean mayAssemble()

mayCopy
public boolean mayCopy()

mayExtract
public boolean mayExtract()

mayFillForm
public boolean mayFillForm()

mayModify
public boolean mayModify()

mayModifyAnnotation
public boolean mayModifyAnnotation()

mayPrint
public boolean mayPrint()

mayPrintHighQuality
public boolean mayPrintHighQuality()

Page 389 of 1521


de.intarsys.pdf.crypt.AccessPermissionsR3

de.intarsys.pdf.crypt
Class AccessPermissionsR3
java.lang.Object
|
+-de.intarsys.pdf.pd.AbstractBitFlags
|
+-de.intarsys.pdf.crypt.AbstractAccessPermissions
|
+-de.intarsys.pdf.crypt.AccessPermissionsR3
All Implemented Interfaces:
IAccessPermissions

public class AccessPermissionsR3


extends AbstractAccessPermissions

The access permission flags as of /Standard handler, release 3 spec.

Constructor Summary
public AccessPermissionsR3(StandardSecurityHandler handler)

Method Summary
boolean mayAssemble()

boolean mayCopy()

boolean mayExtract()

boolean mayFillForm()

boolean mayModify()

boolean mayModifyAnnotation()

boolean mayPrint()

boolean mayPrintHighQuality()

Constructors
AccessPermissionsR3
public AccessPermissionsR3(StandardSecurityHandler handler)

Page 390 of 1521


de.intarsys.pdf.crypt.AccessPermissionsR3

(continued from last page)

Methods
mayAssemble
public boolean mayAssemble()

mayCopy
public boolean mayCopy()

mayExtract
public boolean mayExtract()

mayFillForm
public boolean mayFillForm()

mayModify
public boolean mayModify()

mayModifyAnnotation
public boolean mayModifyAnnotation()

mayPrint
public boolean mayPrint()

mayPrintHighQuality
public boolean mayPrintHighQuality()

Page 391 of 1521


de.intarsys.pdf.crypt.AESCryptHandler

de.intarsys.pdf.crypt
Class AESCryptHandler
java.lang.Object
|
+-de.intarsys.pdf.crypt.AbstractCryptHandler
|
+-de.intarsys.pdf.crypt.StandardCryptHandler
|
+-de.intarsys.pdf.crypt.AESCryptHandler
All Implemented Interfaces:
ICryptHandler

public class AESCryptHandler


extends StandardCryptHandler

An ICryptHandlerimplementing the AES algorithm.

Field Summary
public static final CIPHER_ALGORITHM

Value: AES/CBC/PKCS5Padding

public static final DIGEST_ALGORITHM

Value: MD5

public static final KEY_ALGORITHM

Value: AES

Constructor Summary
public AESCryptHandler()

Method Summary
void init(byte[] pCryptKey)

Fields
KEY_ALGORITHM
public static final java.lang.String KEY_ALGORITHM

Constant value: AES

CIPHER_ALGORITHM
public static final java.lang.String CIPHER_ALGORITHM

Page 392 of 1521


de.intarsys.pdf.crypt.AESCryptHandler

(continued from last page)

Constant value: AES/CBC/PKCS5Padding

DIGEST_ALGORITHM
public static final java.lang.String DIGEST_ALGORITHM

Constant value: MD5

Constructors
AESCryptHandler
public AESCryptHandler()

Methods
init
public void init(byte[] pCryptKey)
throws COSSecurityException

Page 393 of 1521


de.intarsys.pdf.crypt.ArcFourCryptHandler

de.intarsys.pdf.crypt
Class ArcFourCryptHandler
java.lang.Object
|
+-de.intarsys.pdf.crypt.AbstractCryptHandler
|
+-de.intarsys.pdf.crypt.StandardCryptHandler
|
+-de.intarsys.pdf.crypt.ArcFourCryptHandler
All Implemented Interfaces:
ICryptHandler

public class ArcFourCryptHandler


extends StandardCryptHandler

An ICryptHandler implementing the RC4 algorithm.

Field Summary
public static final CIPHER_ALGORITHM

Value: RC4

public static final DIGEST_ALGORITHM

Value: MD5

public static final KEY_ALGORITHM

Value: RC4

Constructor Summary
public ArcFourCryptHandler()

Method Summary
void init(byte[] pCryptKey)

Fields
CIPHER_ALGORITHM
public static final java.lang.String CIPHER_ALGORITHM

Constant value: RC4

KEY_ALGORITHM
public static final java.lang.String KEY_ALGORITHM

Page 394 of 1521


de.intarsys.pdf.crypt.ArcFourCryptHandler

(continued from last page)

Constant value: RC4

DIGEST_ALGORITHM
public static final java.lang.String DIGEST_ALGORITHM

Constant value: MD5

Constructors
ArcFourCryptHandler
public ArcFourCryptHandler()

Methods
init
public void init(byte[] pCryptKey)
throws COSSecurityException

Page 395 of 1521


de.intarsys.pdf.crypt.COSEncryption

de.intarsys.pdf.crypt
Class COSEncryption
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.crypt.COSEncryption
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class COSEncryption


extends COSBasedObject

The definition of the document encryption.

This object contains the state information defining the context for the document encryption.

Nested Class Summary


class COSEncryption.MetaClass
COSEncryption.MetaClass

Field Summary
public static final CN_IDENTITY

public static final DK_CF

public static final DK_EFF

public static final DK_Filter

public static final DK_Length

public static final DK_StmF

public static final DK_StrF

public static final DK_SubFilter

public static final DK_V

public static final META


The meta class instance

Method Summary
COSDictionary getCryptFilterDict(COSName name)

Page 396 of 1521


de.intarsys.pdf.crypt.COSEncryption

COSName getCryptFilterNameFile()

COSName getCryptFilterNameStream()

COSName getCryptFilterNameString()

static COSEncryption getEncryptionIn(STXRefSection xRefSection)

COSName getFilter()

int getLength()
The length of the encryption key, in bits.

int getVersion()

void setEncryptionIn(STXRefSection xRefSection)

Fields
DK_Filter
public static final de.intarsys.pdf.cos.COSName DK_Filter

DK_SubFilter
public static final de.intarsys.pdf.cos.COSName DK_SubFilter

DK_V
public static final de.intarsys.pdf.cos.COSName DK_V

DK_Length
public static final de.intarsys.pdf.cos.COSName DK_Length

DK_CF
public static final de.intarsys.pdf.cos.COSName DK_CF

CN_IDENTITY
public static final de.intarsys.pdf.cos.COSName CN_IDENTITY

Page 397 of 1521


de.intarsys.pdf.crypt.COSEncryption

(continued from last page)

DK_StmF
public static final de.intarsys.pdf.cos.COSName DK_StmF

DK_EFF
public static final de.intarsys.pdf.cos.COSName DK_EFF

DK_StrF
public static final de.intarsys.pdf.cos.COSName DK_StrF

META
public static final de.intarsys.pdf.crypt.COSEncryption.MetaClass META

The meta class instance

Methods
getEncryptionIn
public static COSEncryption getEncryptionIn(STXRefSection xRefSection)

setEncryptionIn
public void setEncryptionIn(STXRefSection xRefSection)

getFilter
public COSName getFilter()

getLength
public int getLength()

The length of the encryption key, in bits. The value must be a multiple of 8, in the range 40 to 128. Default value: 40.

Returns:
length of the encryption key, in bits

getCryptFilterNameString
public COSName getCryptFilterNameString()

Page 398 of 1521


de.intarsys.pdf.crypt.COSEncryption

(continued from last page)

getCryptFilterNameStream
public COSName getCryptFilterNameStream()

getCryptFilterNameFile
public COSName getCryptFilterNameFile()

getCryptFilterDict
public COSDictionary getCryptFilterDict(COSName name)

getVersion
public int getVersion()

Page 399 of 1521


de.intarsys.pdf.crypt.COSEncryption.MetaClass

de.intarsys.pdf.crypt
Class COSEncryption.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.crypt.COSEncryption.MetaClass

public static class COSEncryption.MetaClass


extends COSBasedObject.MetaClass

The meta class implementation

Page 400 of 1521


de.intarsys.pdf.crypt.COSSecurityException

de.intarsys.pdf.crypt
Class COSSecurityException
java.lang.Object
|
+-java.lang.Throwable
|
+-java.lang.Exception
|
+-de.intarsys.pdf.crypt.COSSecurityException
All Implemented Interfaces:
java.io.Serializable

public class COSSecurityException


extends Exception

An exceptional condition in the security handling.

Constructor Summary
public COSSecurityException()

public COSSecurityException(String message)

public COSSecurityException(String message, Throwable cause)

public COSSecurityException(Throwable cause)

Constructors
COSSecurityException
public COSSecurityException()

COSSecurityException
public COSSecurityException(String message)

COSSecurityException
public COSSecurityException(String message,
Throwable cause)

Page 401 of 1521


de.intarsys.pdf.crypt.COSSecurityException

(continued from last page)

COSSecurityException
public COSSecurityException(Throwable cause)

Page 402 of 1521


de.intarsys.pdf.crypt.IAccessPermissions

de.intarsys.pdf.crypt
Interface IAccessPermissions
All Known Implementing Classes:
AbstractAccessPermissions, AccessPermissionsFull

public interface IAccessPermissions


extends

A document permissions set based on the "user access permissions" defined in a /Standard encryption dictionary.

Method Summary
boolean mayAssemble()
Assemble the document: insert, rotate or delete pages and create bookmarks or thumbnail
images.

boolean mayCopy()
Copy or otherwise extract text and graphics from the document in support of accessibility to
disabled users or for other purposes.

boolean mayExtract()
Extract text and graphics (in support of accessibility to disabled users or for other purposes)

boolean mayFillForm()
Fill in existing interactive form fields (including signature fields)

boolean mayModify()
Modify the contents of the document by operations other than those controlled by
mayModifyAnnotation and mayFillForm

boolean mayModifyAnnotation()
Add or modify text annotations, fill in interactice form fields, and if mayModify is set,
create or modify interactive form fields (including signature fields)

boolean mayPrint()
Print the document

boolean mayPrintHighQuality()
Print the document to a representation from which a faithful digital copy of the PDF content
could be generated.

Methods
mayAssemble
public boolean mayAssemble()

Assemble the document: insert, rotate or delete pages and create bookmarks or thumbnail images.

Returns:
if the document may be assembled

Page 403 of 1521


de.intarsys.pdf.crypt.IAccessPermissions

(continued from last page)

mayCopy
public boolean mayCopy()

Copy or otherwise extract text and graphics from the document in support of accessibility to disabled users or for other
purposes.

Returns:
if parts of the document may be copied

mayExtract
public boolean mayExtract()

Extract text and graphics (in support of accessibility to disabled users or for other purposes)

Returns:
if parts of the document may be extracted

mayFillForm
public boolean mayFillForm()

Fill in existing interactive form fields (including signature fields)

Returns:
if form fields may be filled

mayModify
public boolean mayModify()

Modify the contents of the document by operations other than those controlled by mayModifyAnnotation and mayFillForm

Returns:
if document may be modified

mayModifyAnnotation
public boolean mayModifyAnnotation()

Add or modify text annotations, fill in interactice form fields, and if mayModify is set, create or modify interactive form
fields (including signature fields)

Returns:
if annotations may be modified

mayPrint
public boolean mayPrint()

Print the document

Returns:
if the document may be printed

Page 404 of 1521


de.intarsys.pdf.crypt.IAccessPermissions

(continued from last page)

mayPrintHighQuality
public boolean mayPrintHighQuality()

Print the document to a representation from which a faithful digital copy of the PDF content could be generated. When this
premission is not set and mayPrint is set, printing is limited to a low-level representation of the appearance, possibly of
degraded quality.

Returns:
if the document may be high quality printed

Page 405 of 1521


de.intarsys.pdf.crypt.ICryptHandler

de.intarsys.pdf.crypt
Interface ICryptHandler
All Subinterfaces:
ISecurityHandler

All Known Implementing Classes:


AbstractCryptHandler

public interface ICryptHandler


extends

The encryption/decryption algorithm for a PDF document. This object does the real crypt work, whereas the context like
initialization steps, authenthication, authorization is done by the ISecurityHandler and ISystemSecurityHandler.

PDF security /V4 defines two standard algorithms, RC4 and AES based. Additionally a transparent algorithm provided by a
ISecurityHandler can be used.

Method Summary
byte[] decrypt(COSObjectKey key, byte[] bytes)
Decrypt any bytes in the context of COSObject referenced by the provided key.

byte[] encrypt(COSObjectKey key, byte[] bytes)


Encrypt any bytes in the context of COSObject referenced by the provided key.

Methods
decrypt
public byte[] decrypt(COSObjectKey key,
byte[] bytes)
throws COSSecurityException

Decrypt any bytes in the context of COSObject referenced by the provided key.

Parameters:
key - of the object which provides the context
bytes - to decrypt

Returns:
the decrypted bytes

Throws:
COSSecurityException

encrypt
public byte[] encrypt(COSObjectKey key,
byte[] bytes)
throws COSSecurityException

Encrypt any bytes in the context of COSObject referenced by the provided key.

Page 406 of 1521


de.intarsys.pdf.crypt.ICryptHandler

(continued from last page)

Parameters:
key - of the object which provides the context
bytes - to decrypt

Returns:
the encrypted bytes

Throws:
COSSecurityException

Page 407 of 1521


de.intarsys.pdf.crypt.IdentityCryptHandler

de.intarsys.pdf.crypt
Class IdentityCryptHandler
java.lang.Object
|
+-de.intarsys.pdf.crypt.AbstractCryptHandler
|
+-de.intarsys.pdf.crypt.IdentityCryptHandler
All Implemented Interfaces:
ICryptHandler

public class IdentityCryptHandler


extends AbstractCryptHandler

The /Identity ICryptHandler, doing nothing a all.

Constructor Summary
public IdentityCryptHandler()

Method Summary
byte[] decrypt(COSObjectKey key, byte[] bytes)

byte[] encrypt(COSObjectKey key, byte[] bytes)

Constructors
IdentityCryptHandler
public IdentityCryptHandler()

Methods
decrypt
public byte[] decrypt(COSObjectKey key,
byte[] bytes)
throws COSSecurityException

encrypt
public byte[] encrypt(COSObjectKey key,
byte[] bytes)
throws COSSecurityException

Page 408 of 1521


de.intarsys.pdf.crypt.ISecurityHandler

de.intarsys.pdf.crypt
Interface ISecurityHandler
All Superinterfaces:
ICryptHandler

All Known Implementing Classes:


AbstractSecurityHandler

public interface ISecurityHandler


extends ICryptHandler

The security handler as defined in the PDF spec. This is the exchangeable behavior in the PDF security spec.

The ISystemSecurityHandler is asked for de/encryption, which is done by himself for the defined standard encryptions, using
ICryptHandler instances for RC4 and AES. These ICryptHandler instances are initialized using the encryption key provided
by this ISecurityHandler.

With /V 4 encryption, thhe application may ask for "transparent" de/encryption, in which case it is forwared to the installed
ISecurityHandler itself.

Method Summary
void authenticate(IPasswordProvider passwordProvider)
Perform an authentication of the current "user" on behalf of the information in the
encryption dictionary.

IAccessPermissions getAccessPermissions()
The access permissions encoded in the encryption object for the current document or null if
not applicable.

byte[] getCryptKey()

void init(STDocument document, COSEncryption encryption)

Methods
authenticate
public void authenticate(IPasswordProvider passwordProvider)
throws COSSecurityException

Perform an authentication of the current "user" on behalf of the information in the encryption dictionary.

In most situations this will consist of checking user/owner password and setting the resulting access permissions.

Throws:
COSSecurityException

getCryptKey
public byte[] getCryptKey()

Page 409 of 1521


de.intarsys.pdf.crypt.ISecurityHandler

(continued from last page)

init
public void init(STDocument document,
COSEncryption encryption)
throws COSSecurityException

getAccessPermissions
public IAccessPermissions getAccessPermissions()

The access permissions encoded in the encryption object for the current document or null if not applicable.

The access permissions are not standardized, may be these are not available from arbitrary handlers.

Returns:
The access permissions encoded in the encryption object for the current document or null if not applicable.

Page 410 of 1521


de.intarsys.pdf.crypt.ISecurityHandlerFactory

de.intarsys.pdf.crypt
Interface ISecurityHandlerFactory
All Known Implementing Classes:
StandardSecurityHandlerFactory

public interface ISecurityHandlerFactory


extends

A factory for creating an ISecurityHandler.

Method Summary
ISecurityHandler getSecurityHandler(COSEncryption encryption)
Get a security handler instance compatible to the state defined in encryption.

Methods
getSecurityHandler
public ISecurityHandler getSecurityHandler(COSEncryption encryption)
throws COSSecurityException

Get a security handler instance compatible to the state defined in encryption.

The security handler returned is associated in a 1:1 relationship with the encryption object.

Parameters:
encryption - The encryption object defining the state.

Returns:
Get a security handler instance compatible to the state defined in encryption.

Throws:
COSSecurityException

Page 411 of 1521


de.intarsys.pdf.crypt.ISystemSecurityHandler

de.intarsys.pdf.crypt
Interface ISystemSecurityHandler
All Known Implementing Classes:
SystemSecurityHandler

public interface ISystemSecurityHandler


extends

This object is responsible to manage the PDF documents security context and object de/encryption. It implements the security
mechanics as described in the PDF spec up to revision 4.

The ISystemSecurityHandler dispatches de/encryption to either the standard ICryptHandler instances or (with /V 4
encryption) the ISecurityHandler installed.

Method Summary
void authenticate(IPasswordProvider passwordProvider)
Perform an authentication of the current "user" on behalf of the information in the
encryption dictionary.

byte[] decryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes)

byte[] decryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes)

byte[] decryptString(COSObjectKey key, byte[] bytes)

byte[] encryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes)

byte[] encryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes)

byte[] encryptString(COSObjectKey key, byte[] bytes)

ISecurityHandler getSecurityHandler()

void init(STDocument document, COSEncryption encryption)

Methods
decryptString
public byte[] decryptString(COSObjectKey key,
byte[] bytes)
throws COSSecurityException

Page 412 of 1521


de.intarsys.pdf.crypt.ISystemSecurityHandler

(continued from last page)

decryptStream
public byte[] decryptStream(COSObjectKey key,
COSDictionary dict,
byte[] bytes)
throws COSSecurityException

decryptFile
public byte[] decryptFile(COSObjectKey key,
COSDictionary dict,
byte[] bytes)
throws COSSecurityException

encryptString
public byte[] encryptString(COSObjectKey key,
byte[] bytes)
throws COSSecurityException

encryptStream
public byte[] encryptStream(COSObjectKey key,
COSDictionary dict,
byte[] bytes)
throws COSSecurityException

encryptFile
public byte[] encryptFile(COSObjectKey key,
COSDictionary dict,
byte[] bytes)
throws COSSecurityException

getSecurityHandler
public ISecurityHandler getSecurityHandler()

init
public void init(STDocument document,
COSEncryption encryption)
throws COSSecurityException

Page 413 of 1521


de.intarsys.pdf.crypt.ISystemSecurityHandler

(continued from last page)

authenticate
public void authenticate(IPasswordProvider passwordProvider)
throws COSSecurityException

Perform an authentication of the current "user" on behalf of the information in the encryption dictionary.

In most situations this will consist of checking user/owner password and setting the resulting access permissions.

Throws:
COSSecurityException

Page 414 of 1521


de.intarsys.pdf.crypt.PasswordProvider

de.intarsys.pdf.crypt
Class PasswordProvider
java.lang.Object
|
+-de.intarsys.pdf.crypt.PasswordProvider

public class PasswordProvider


extends Object

A VM singleton for the PDF releated IPasswordProvider.

Method Summary
static get()
IPasswordProvider
Return the unique factory.

static void set(IPasswordProvider unique)


Set the unique factory.

Methods
set
public static void set(IPasswordProvider unique)

Set the unique factory.

Parameters:
unique - The new unique factory.

get
public static IPasswordProvider get()

Return the unique factory.

Returns:
Return the unique factory.

Page 415 of 1521


de.intarsys.pdf.crypt.SecurityHandlerFactory

de.intarsys.pdf.crypt
Class SecurityHandlerFactory
java.lang.Object
|
+-de.intarsys.pdf.crypt.SecurityHandlerFactory

public class SecurityHandlerFactory


extends Object

A VM singleton for the ISecurityHandlerFactory.

Constructor Summary
public SecurityHandlerFactory()

Method Summary
static get()
ISecurityHandlerFacto
ry

static void set(ISecurityHandlerFactory active)

Constructors
SecurityHandlerFactory
public SecurityHandlerFactory()

Methods
set
public static void set(ISecurityHandlerFactory active)

get
public static ISecurityHandlerFactory get()

Page 416 of 1521


de.intarsys.pdf.crypt.StandardCryptHandler

de.intarsys.pdf.crypt
Class StandardCryptHandler
java.lang.Object
|
+-de.intarsys.pdf.crypt.AbstractCryptHandler
|
+-de.intarsys.pdf.crypt.StandardCryptHandler
All Implemented Interfaces:
ICryptHandler

Direct Known Subclasses:


AESCryptHandler, ArcFourCryptHandler

public abstract class StandardCryptHandler


extends AbstractCryptHandler

An abstract superclass for the default implementation of ICryptHandler. The concrete implementations provide the standard
RC4 and AES algorithms.

Constructor Summary
public StandardCryptHandler()

Method Summary
byte[] decrypt(COSObjectKey objectKey, byte[] bytes)

byte[] encrypt(COSObjectKey objectKey, byte[] bytes)

void init(byte[] pCryptKey)

Constructors
StandardCryptHandler
public StandardCryptHandler()

Methods
decrypt
public byte[] decrypt(COSObjectKey objectKey,
byte[] bytes)
throws COSSecurityException

Page 417 of 1521


de.intarsys.pdf.crypt.StandardCryptHandler

init
public void init(byte[] pCryptKey)
throws COSSecurityException

encrypt
public byte[] encrypt(COSObjectKey objectKey,
byte[] bytes)
throws COSSecurityException

Page 418 of 1521


de.intarsys.pdf.crypt.StandardSecurityHandler

de.intarsys.pdf.crypt
Class StandardSecurityHandler
java.lang.Object
|
+-de.intarsys.pdf.crypt.AbstractSecurityHandler
|
+-de.intarsys.pdf.crypt.StandardSecurityHandler
All Implemented Interfaces:
ISecurityHandler

Direct Known Subclasses:


StandardSecurityHandlerR2, StandardSecurityHandlerR3, StandardSecurityHandlerR4

public abstract class StandardSecurityHandler


extends AbstractSecurityHandler

The standard security handler as specified in the PDF reference.

It supports the implementation up to and including revision 4.

Field Summary
public static final DEFAULT_ACCESS_PERMISSIONS
The default value for the access permission flags.
Value: -4

public static final DK_EncryptMetadata

public static final DK_O

public static final DK_P

public static final DK_R

public static final DK_U

Constructor Summary
public StandardSecurityHandler()

Method Summary
void authenticate(IPasswordProvider passwordProvider)

byte[] decrypt(COSObjectKey key, byte[] bytes)

byte[] encrypt(COSObjectKey key, byte[] bytes)

Page 419 of 1521


de.intarsys.pdf.crypt.StandardSecurityHandler

IAccessPermissions getAccessPermissions()

byte[] getCryptKey()

void init(STDocument document, COSEncryption encryption)

Fields
DK_O
public static final de.intarsys.pdf.cos.COSName DK_O

DK_P
public static final de.intarsys.pdf.cos.COSName DK_P

DK_R
public static final de.intarsys.pdf.cos.COSName DK_R

DK_U
public static final de.intarsys.pdf.cos.COSName DK_U

DK_EncryptMetadata
public static final de.intarsys.pdf.cos.COSName DK_EncryptMetadata

DEFAULT_ACCESS_PERMISSIONS
public static final int DEFAULT_ACCESS_PERMISSIONS

The default value for the access permission flags.

Everything is allowed, only the reserved flags are zero.


Constant value: -4

Constructors
StandardSecurityHandler
public StandardSecurityHandler()

Page 420 of 1521


de.intarsys.pdf.crypt.StandardSecurityHandler

(continued from last page)

Methods
authenticate
public void authenticate(IPasswordProvider passwordProvider)
throws COSSecurityException

getAccessPermissions
public IAccessPermissions getAccessPermissions()

getCryptKey
public byte[] getCryptKey()

init
public void init(STDocument document,
COSEncryption encryption)
throws COSSecurityException

decrypt
public byte[] decrypt(COSObjectKey key,
byte[] bytes)
throws COSSecurityException

encrypt
public byte[] encrypt(COSObjectKey key,
byte[] bytes)
throws COSSecurityException

Page 421 of 1521


de.intarsys.pdf.crypt.StandardSecurityHandlerFactory

de.intarsys.pdf.crypt
Class StandardSecurityHandlerFactory
java.lang.Object
|
+-de.intarsys.pdf.crypt.StandardSecurityHandlerFactory
All Implemented Interfaces:
ISecurityHandlerFactory

public class StandardSecurityHandlerFactory


extends Object
implements ISecurityHandlerFactory

A standard implementation for the ISecurityHandlerFactory.

Field Summary
public static final CN_Standard

public static final DK_R

Method Summary
ISecurityHandler getSecurityHandler(COSEncryption encryption)

Fields
CN_Standard
public static final de.intarsys.pdf.cos.COSName CN_Standard

DK_R
public static final de.intarsys.pdf.cos.COSName DK_R

Methods
getSecurityHandler
public ISecurityHandler getSecurityHandler(COSEncryption encryption)
throws COSSecurityException

Page 422 of 1521


de.intarsys.pdf.crypt.StandardSecurityHandlerR2

de.intarsys.pdf.crypt
Class StandardSecurityHandlerR2
java.lang.Object
|
+-de.intarsys.pdf.crypt.AbstractSecurityHandler
|
+-de.intarsys.pdf.crypt.StandardSecurityHandler
|
+-de.intarsys.pdf.crypt.StandardSecurityHandlerR2
All Implemented Interfaces:
ISecurityHandler

public class StandardSecurityHandlerR2


extends StandardSecurityHandler

The ISecurityHandler implementing /R 2 of the PDF spec.

Field Summary
public static final CIPHER_ALGORITHM

Value: RC4

public static final DIGEST_ALGORITHM

Value: MD5

public static final KEY_ALGORITHM

Value: RC4

Constructor Summary
public StandardSecurityHandlerR2()

Fields
DIGEST_ALGORITHM
public static final java.lang.String DIGEST_ALGORITHM

Constant value: MD5

KEY_ALGORITHM
public static final java.lang.String KEY_ALGORITHM

Constant value: RC4

Page 423 of 1521


de.intarsys.pdf.crypt.StandardSecurityHandlerR2

(continued from last page)

CIPHER_ALGORITHM
public static final java.lang.String CIPHER_ALGORITHM

Constant value: RC4

Constructors
StandardSecurityHandlerR2
public StandardSecurityHandlerR2()

Page 424 of 1521


de.intarsys.pdf.crypt.StandardSecurityHandlerR3

de.intarsys.pdf.crypt
Class StandardSecurityHandlerR3
java.lang.Object
|
+-de.intarsys.pdf.crypt.AbstractSecurityHandler
|
+-de.intarsys.pdf.crypt.StandardSecurityHandler
|
+-de.intarsys.pdf.crypt.StandardSecurityHandlerR3
All Implemented Interfaces:
ISecurityHandler

public class StandardSecurityHandlerR3


extends StandardSecurityHandler

The ISecurityHandler implementing /R 3 of the PDF spec.

Field Summary
public static final CIPHER_ALGORITHM

Value: RC4

public static final DIGEST_ALGORITHM

Value: MD5

public static final KEY_ALGORITHM

Value: RC4

Constructor Summary
public StandardSecurityHandlerR3()

Fields
KEY_ALGORITHM
public static final java.lang.String KEY_ALGORITHM

Constant value: RC4

CIPHER_ALGORITHM
public static final java.lang.String CIPHER_ALGORITHM

Constant value: RC4

Page 425 of 1521


de.intarsys.pdf.crypt.StandardSecurityHandlerR3

(continued from last page)

DIGEST_ALGORITHM
public static final java.lang.String DIGEST_ALGORITHM

Constant value: MD5

Constructors
StandardSecurityHandlerR3
public StandardSecurityHandlerR3()

Page 426 of 1521


de.intarsys.pdf.crypt.StandardSecurityHandlerR4

de.intarsys.pdf.crypt
Class StandardSecurityHandlerR4
java.lang.Object
|
+-de.intarsys.pdf.crypt.AbstractSecurityHandler
|
+-de.intarsys.pdf.crypt.StandardSecurityHandler
|
+-de.intarsys.pdf.crypt.StandardSecurityHandlerR4
All Implemented Interfaces:
ISecurityHandler

public class StandardSecurityHandlerR4


extends StandardSecurityHandler

The ISecurityHandler implementing /R 4 of the PDF spec.

Field Summary
public static final CIPHER_ALGORITHM

Value: RC4

public static final DIGEST_ALGORITHM

Value: MD5

public static final DK_AuthEvent

public static final DK_Length

public static final KEY_ALGORITHM

Value: RC4

Constructor Summary
public StandardSecurityHandlerR4()

Fields
KEY_ALGORITHM
public static final java.lang.String KEY_ALGORITHM

Constant value: RC4

CIPHER_ALGORITHM
public static final java.lang.String CIPHER_ALGORITHM

Page 427 of 1521


de.intarsys.pdf.crypt.StandardSecurityHandlerR4

(continued from last page)

Constant value: RC4

DIGEST_ALGORITHM
public static final java.lang.String DIGEST_ALGORITHM

Constant value: MD5

DK_AuthEvent
public static final de.intarsys.pdf.cos.COSName DK_AuthEvent

DK_Length
public static final de.intarsys.pdf.cos.COSName DK_Length

Constructors
StandardSecurityHandlerR4
public StandardSecurityHandlerR4()

Page 428 of 1521


de.intarsys.pdf.crypt.SystemSecurityHandler

de.intarsys.pdf.crypt
Class SystemSecurityHandler
java.lang.Object
|
+-de.intarsys.pdf.crypt.SystemSecurityHandler
All Implemented Interfaces:
ISystemSecurityHandler

Direct Known Subclasses:


SystemSecurityHandlerV0, SystemSecurityHandlerV1, SystemSecurityHandlerV2, SystemSecurityHandlerV3,
SystemSecurityHandlerV4

public abstract class SystemSecurityHandler


extends Object
implements ISystemSecurityHandler

An abstract superclass for implementing the PDF standard security process.

Method Summary
void authenticate(IPasswordProvider passwordProvider)

static create(COSEncryption pEncryption)


ISystemSecurityHandle
r

COSEncryption getEncryption()

ISecurityHandler getSecurityHandler()

void init(STDocument document, COSEncryption encryption)

Methods
create
public static ISystemSecurityHandler create(COSEncryption pEncryption)

getEncryption
public COSEncryption getEncryption()

getSecurityHandler
public ISecurityHandler getSecurityHandler()

Page 429 of 1521


de.intarsys.pdf.crypt.SystemSecurityHandler

(continued from last page)

init
public void init(STDocument document,
COSEncryption encryption)
throws COSSecurityException

authenticate
public void authenticate(IPasswordProvider passwordProvider)
throws COSSecurityException

Page 430 of 1521


de.intarsys.pdf.crypt.SystemSecurityHandlerV0

de.intarsys.pdf.crypt
Class SystemSecurityHandlerV0
java.lang.Object
|
+-de.intarsys.pdf.crypt.SystemSecurityHandler
|
+-de.intarsys.pdf.crypt.SystemSecurityHandlerV0
All Implemented Interfaces:
ISystemSecurityHandler

public class SystemSecurityHandlerV0


extends SystemSecurityHandler

The ISystemSecurityHandler implementing /V 0 of the PDF spec.

Method Summary
byte[] decryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes)

byte[] decryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes)

byte[] decryptString(COSObjectKey key, byte[] bytes)

byte[] encryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes)

byte[] encryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes)

byte[] encryptString(COSObjectKey key, byte[] bytes)

Methods
decryptFile
public byte[] decryptFile(COSObjectKey key,
COSDictionary dict,
byte[] bytes)
throws COSSecurityException

decryptStream
public byte[] decryptStream(COSObjectKey key,
COSDictionary dict,
byte[] bytes)
throws COSSecurityException

Page 431 of 1521


de.intarsys.pdf.crypt.SystemSecurityHandlerV0

(continued from last page)

decryptString
public byte[] decryptString(COSObjectKey key,
byte[] bytes)
throws COSSecurityException

encryptFile
public byte[] encryptFile(COSObjectKey key,
COSDictionary dict,
byte[] bytes)
throws COSSecurityException

encryptStream
public byte[] encryptStream(COSObjectKey key,
COSDictionary dict,
byte[] bytes)
throws COSSecurityException

encryptString
public byte[] encryptString(COSObjectKey key,
byte[] bytes)
throws COSSecurityException

Page 432 of 1521


de.intarsys.pdf.crypt.SystemSecurityHandlerV1

de.intarsys.pdf.crypt
Class SystemSecurityHandlerV1
java.lang.Object
|
+-de.intarsys.pdf.crypt.SystemSecurityHandler
|
+-de.intarsys.pdf.crypt.SystemSecurityHandlerV1
All Implemented Interfaces:
ISystemSecurityHandler

public class SystemSecurityHandlerV1


extends SystemSecurityHandler

The ISystemSecurityHandler implementing /V 1 of the PDF spec.

Method Summary
void authenticate(IPasswordProvider passwordProvider)

byte[] decryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes)

byte[] decryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes)

byte[] decryptString(COSObjectKey key, byte[] bytes)

byte[] encryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes)

byte[] encryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes)

byte[] encryptString(COSObjectKey key, byte[] bytes)

Methods
decryptFile
public byte[] decryptFile(COSObjectKey key,
COSDictionary dict,
byte[] bytes)
throws COSSecurityException

decryptStream
public byte[] decryptStream(COSObjectKey key,
COSDictionary dict,
byte[] bytes)
throws COSSecurityException

Page 433 of 1521


de.intarsys.pdf.crypt.SystemSecurityHandlerV1

decryptString
public byte[] decryptString(COSObjectKey key,
byte[] bytes)
throws COSSecurityException

encryptFile
public byte[] encryptFile(COSObjectKey key,
COSDictionary dict,
byte[] bytes)
throws COSSecurityException

encryptStream
public byte[] encryptStream(COSObjectKey key,
COSDictionary dict,
byte[] bytes)
throws COSSecurityException

encryptString
public byte[] encryptString(COSObjectKey key,
byte[] bytes)
throws COSSecurityException

authenticate
public void authenticate(IPasswordProvider passwordProvider)
throws COSSecurityException

Page 434 of 1521


de.intarsys.pdf.crypt.SystemSecurityHandlerV2

de.intarsys.pdf.crypt
Class SystemSecurityHandlerV2
java.lang.Object
|
+-de.intarsys.pdf.crypt.SystemSecurityHandler
|
+-de.intarsys.pdf.crypt.SystemSecurityHandlerV2
All Implemented Interfaces:
ISystemSecurityHandler

public class SystemSecurityHandlerV2


extends SystemSecurityHandler

The ISystemSecurityHandler implementing /V 2 of the PDF spec.

Method Summary
void authenticate(IPasswordProvider passwordProvider)

byte[] decryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes)

byte[] decryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes)

byte[] decryptString(COSObjectKey key, byte[] bytes)

byte[] encryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes)

byte[] encryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes)

byte[] encryptString(COSObjectKey key, byte[] bytes)

Methods
decryptFile
public byte[] decryptFile(COSObjectKey key,
COSDictionary dict,
byte[] bytes)
throws COSSecurityException

decryptStream
public byte[] decryptStream(COSObjectKey key,
COSDictionary dict,
byte[] bytes)
throws COSSecurityException

Page 435 of 1521


de.intarsys.pdf.crypt.SystemSecurityHandlerV2

decryptString
public byte[] decryptString(COSObjectKey key,
byte[] bytes)
throws COSSecurityException

encryptFile
public byte[] encryptFile(COSObjectKey key,
COSDictionary dict,
byte[] bytes)
throws COSSecurityException

encryptStream
public byte[] encryptStream(COSObjectKey key,
COSDictionary dict,
byte[] bytes)
throws COSSecurityException

encryptString
public byte[] encryptString(COSObjectKey key,
byte[] bytes)
throws COSSecurityException

authenticate
public void authenticate(IPasswordProvider passwordProvider)
throws COSSecurityException

Page 436 of 1521


de.intarsys.pdf.crypt.SystemSecurityHandlerV3

de.intarsys.pdf.crypt
Class SystemSecurityHandlerV3
java.lang.Object
|
+-de.intarsys.pdf.crypt.SystemSecurityHandler
|
+-de.intarsys.pdf.crypt.SystemSecurityHandlerV3
All Implemented Interfaces:
ISystemSecurityHandler

public class SystemSecurityHandlerV3


extends SystemSecurityHandler

The ISystemSecurityHandler implementing /V 3 of the PDF spec.

Method Summary
byte[] decryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes)

byte[] decryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes)

byte[] decryptString(COSObjectKey key, byte[] bytes)

byte[] encryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes)

byte[] encryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes)

byte[] encryptString(COSObjectKey key, byte[] bytes)

Methods
decryptFile
public byte[] decryptFile(COSObjectKey key,
COSDictionary dict,
byte[] bytes)
throws COSSecurityException

decryptStream
public byte[] decryptStream(COSObjectKey key,
COSDictionary dict,
byte[] bytes)
throws COSSecurityException

Page 437 of 1521


de.intarsys.pdf.crypt.SystemSecurityHandlerV3

(continued from last page)

decryptString
public byte[] decryptString(COSObjectKey key,
byte[] bytes)
throws COSSecurityException

encryptFile
public byte[] encryptFile(COSObjectKey key,
COSDictionary dict,
byte[] bytes)
throws COSSecurityException

encryptStream
public byte[] encryptStream(COSObjectKey key,
COSDictionary dict,
byte[] bytes)
throws COSSecurityException

encryptString
public byte[] encryptString(COSObjectKey key,
byte[] bytes)
throws COSSecurityException

Page 438 of 1521


de.intarsys.pdf.crypt.SystemSecurityHandlerV4

de.intarsys.pdf.crypt
Class SystemSecurityHandlerV4
java.lang.Object
|
+-de.intarsys.pdf.crypt.SystemSecurityHandler
|
+-de.intarsys.pdf.crypt.SystemSecurityHandlerV4
All Implemented Interfaces:
ISystemSecurityHandler

public class SystemSecurityHandlerV4


extends SystemSecurityHandler

The ISystemSecurityHandler implementing /V 4 of the PDF spec.

Field Summary
public static final CN_AESV2

public static final CN_None

public static final CN_V2

public static final DK_CFM

public static final DK_NAME

Method Summary
byte[] decryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes)

byte[] decryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes)

byte[] decryptString(COSObjectKey key, byte[] bytes)

byte[] encryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes)

byte[] encryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes)

byte[] encryptString(COSObjectKey key, byte[] bytes)

ICryptHandler getCryptHandler(COSName name)

Fields

Page 439 of 1521


de.intarsys.pdf.crypt.SystemSecurityHandlerV4

(continued from last page)

DK_NAME
public static final de.intarsys.pdf.cos.COSName DK_NAME

CN_AESV2
public static final de.intarsys.pdf.cos.COSName CN_AESV2

CN_None
public static final de.intarsys.pdf.cos.COSName CN_None

CN_V2
public static final de.intarsys.pdf.cos.COSName CN_V2

DK_CFM
public static final de.intarsys.pdf.cos.COSName DK_CFM

Methods
decryptFile
public byte[] decryptFile(COSObjectKey key,
COSDictionary dict,
byte[] bytes)
throws COSSecurityException

decryptStream
public byte[] decryptStream(COSObjectKey key,
COSDictionary dict,
byte[] bytes)
throws COSSecurityException

decryptString
public byte[] decryptString(COSObjectKey key,
byte[] bytes)
throws COSSecurityException

Page 440 of 1521


de.intarsys.pdf.crypt.SystemSecurityHandlerV4

encryptFile
public byte[] encryptFile(COSObjectKey key,
COSDictionary dict,
byte[] bytes)
throws COSSecurityException

encryptStream
public byte[] encryptStream(COSObjectKey key,
COSDictionary dict,
byte[] bytes)
throws COSSecurityException

encryptString
public byte[] encryptString(COSObjectKey key,
byte[] bytes)
throws COSSecurityException

getCryptHandler
public ICryptHandler getCryptHandler(COSName name)
throws COSSecurityException

Page 441 of 1521


Package
de.intarsys.pdf.encoding
This package implements the encodings of the PDF spec.

Page 442 of 1521


de.intarsys.pdf.encoding.CMapEncoding

de.intarsys.pdf.encoding
Class CMapEncoding
java.lang.Object
|
+-de.intarsys.pdf.encoding.Encoding
|
+-de.intarsys.pdf.encoding.CMapEncoding

public class CMapEncoding


extends Encoding

This is a "dummy" implementation for the CMap style encoding in a Type o font. You will not use this one to decode byte codes,
instead the CMap for the Type 0 font is used.

Constructor Summary
public CMapEncoding(COSName name)

Method Summary
int getByteCode(int unicode)

int getByteCode(String pName)

COSObject getCosObject()

String getGlyphName(int codePoint)

String getName()

int getUnicode(int byteCode)

int getValidByteCode(int unicode)

int getValidByteCode(String pName)

Constructors
CMapEncoding
public CMapEncoding(COSName name)

Methods

Page 443 of 1521


de.intarsys.pdf.encoding.CMapEncoding

(continued from last page)

getByteCode
public int getByteCode(String pName)

Get the code point where the character referenced by the Adobe glyph name name is mapped in this font encoding or -1 if
not valid.

name must be a valid Adobe glyph name. The code point is a value from 0...255. If the glyph is not found, -1 is returned.

getByteCode
public int getByteCode(int unicode)

Get the byte code point where the character referenced by the Unicode code point unicode is mapped in this font
encoding or -1 if invalid.

unicode must be a valid Unicode code point. The returned code point is a value from 0...255. If the Unicode code point is
not valid or not mapped, -1 is returned.

getCosObject
public COSObject getCosObject()

Get an object that can be used as a representation of the receiver encoding within doc.

getGlyphName
public String getGlyphName(int codePoint)

Get the character name for a given encoded byte code point. If no mapping is defined, return ".notdef".

getName
public String getName()

getUnicode
public int getUnicode(int byteCode)

Get the Unicode code point for the encoded code Point byteCode or -1 if not available.

getValidByteCode
public int getValidByteCode(String pName)

Get the code point where the character referenced by the Adobe glyph name name is mapped in this font encoding or a
valid replacement.

name must be a valid Adobe glyph name. The code point is a value from 0...255. If the glyph is not found, a valif
replacement code point is returned instead (for example the space character).

getValidByteCode
public int getValidByteCode(int unicode)

Page 444 of 1521


de.intarsys.pdf.encoding.CMapEncoding

(continued from last page)

Get the byte code point where the character referenced by the Unicode code point unicode is mapped in this font
encoding or a valid replacement code point if invalid.

unicode must be a valid Unicode code point. The returned code point is a value from 0...255. If the Unicode code point is
not valid or not mapped, a valid code point is returned is returned (for example the space character).

Page 445 of 1521


de.intarsys.pdf.encoding.Encoding

de.intarsys.pdf.encoding
Class Encoding
java.lang.Object
|
+-de.intarsys.pdf.encoding.Encoding
Direct Known Subclasses:
AFMEncoding, DifferenceEncoding, CMapEncoding, FontSpecificEncoding, MappedEncoding, SymbolEncoding

public abstract class Encoding


extends Object

An Encoding defines the mapping from a one byte codepoint to a glyph name in the font.

Every font has a built in encoding that can be changed by adding an explicit encoding to a PDFont. This explicit change may be in
the form of a "differences" encoding in an explicit dictionary or by means of a named encoding, one of "MacRomanEncoding" or
"WinAnsiEncoding".

todo 2 "MacExpertEncoding" is not supported.

If no encoding is found in the font implementation or the font dictionary, "StandardEncoding" is used.

Field Summary
public static final CN_MacRomanEncoding

public static final CN_StandardEncoding

public static final CN_WinAnsiEncoding

public static final NAME_a

Value: a

public static final NAME_A

Value: A

public static final NAME_aacute

Value: aacute

public static final NAME_Aacute

Value: Aacute

public static final NAME_acircumflex

Value: acircumflex

public static final NAME_Acircumflex

Value: Acircumflex

Page 446 of 1521


de.intarsys.pdf.encoding.Encoding

public static final NAME_acute

Value: acute

public static final NAME_adieresis

Value: adieresis

public static final NAME_Adieresis

Value: Adieresis

public static final NAME_ae

Value: ae

public static final NAME_AE

Value: AE

public static final NAME_agrave

Value: agrave

public static final NAME_Agrave

Value: Agrave

public static final NAME_ampersand

Value: ampersand

public static final NAME_aring

Value: aring

public static final NAME_Aring

Value: Aring

public static final NAME_asciicircum

Value: asciicircum

public static final NAME_asciitilde

Value: asciitilde

public static final NAME_asterisk

Value: asterisk

public static final NAME_at

Value: at

public static final NAME_atilde

Value: atilde

public static final NAME_Atilde

Value: Atilde

Page 447 of 1521


de.intarsys.pdf.encoding.Encoding

public static final NAME_b

Value: b

public static final NAME_B

Value: B

public static final NAME_backslash

Value: backslash

public static final NAME_bar

Value: bar

public static final NAME_braceleft

Value: braceleft

public static final NAME_braceright

Value: braceright

public static final NAME_bracketleft

Value: bracketleft

public static final NAME_bracketright

Value: bracketright

public static final NAME_breve

Value: breve

public static final NAME_brokenbar

Value: brokenbar

public static final NAME_bullet

Value: bullet

public static final NAME_c

Value: c

public static final NAME_C

Value: C

public static final NAME_caron

Value: caron

public static final NAME_ccedilla

Value: ccedilla

public static final NAME_Ccedilla

Value: Ccedilla

Page 448 of 1521


de.intarsys.pdf.encoding.Encoding

public static final NAME_cedilla

Value: cedilla

public static final NAME_cent

Value: cent

public static final NAME_circumflex

Value: circumflex

public static final NAME_colon

Value: colon

public static final NAME_comma

Value: comma

public static final NAME_copyright

Value: copyright

public static final NAME_currency

Value: currency

public static final NAME_d

Value: d

public static final NAME_D

Value: D

public static final NAME_dagger

Value: dagger

public static final NAME_daggerdbl

Value: daggerdbl

public static final NAME_degree

Value: degree

public static final NAME_dieresis

Value: dieresis

public static final NAME_divide

Value: divide

public static final NAME_dollar

Value: dollar

public static final NAME_dotaccent

Value: dotaccent

Page 449 of 1521


de.intarsys.pdf.encoding.Encoding

public static final NAME_dotlessi

Value: dotlessi

public static final NAME_e

Value: e

public static final NAME_E

Value: E

public static final NAME_eacute

Value: eacute

public static final NAME_Eacute

Value: Eacute

public static final NAME_ecircumflex

Value: ecircumflex

public static final NAME_Ecircumflex

Value: Ecircumflex

public static final NAME_edieresis

Value: edieresis

public static final NAME_Edieresis

Value: Edieresis

public static final NAME_egrave

Value: egrave

public static final NAME_Egrave

Value: Egrave

public static final NAME_eight

Value: eight

public static final NAME_ellipsis

Value: ellipsis

public static final NAME_emdash

Value: emdash

public static final NAME_endash

Value: endash

public static final NAME_equal

Value: equal

Page 450 of 1521


de.intarsys.pdf.encoding.Encoding

public static final NAME_eth

Value: eth

public static final NAME_Eth

Value: Eth

public static final NAME_Euro

Value: Euro

public static final NAME_exclam

Value: exclam

public static final NAME_exclamdown

Value: exclamdown

public static final NAME_f

Value: f

public static final NAME_F

Value: F

public static final NAME_fi

Value: fi

public static final NAME_five

Value: five

public static final NAME_fl

Value: fl

public static final NAME_florin

Value: florin

public static final NAME_four

Value: four

public static final NAME_fraction

Value: fraction

public static final NAME_g

Value: g

public static final NAME_G

Value: G

public static final NAME_germandbls

Value: germandbls

Page 451 of 1521


de.intarsys.pdf.encoding.Encoding

public static final NAME_grave

Value: grave

public static final NAME_greater

Value: greater

public static final NAME_guillemotleft

Value: guillemotleft

public static final NAME_guillemotright

Value: guillemotright

public static final NAME_guilsinglleft

Value: guilsinglleft

public static final NAME_guilsinglright

Value: guilsinglright

public static final NAME_h

Value: h

public static final NAME_H

Value: H

public static final NAME_hungarumlaut

Value: hungarumlaut

public static final NAME_hyphen

Value: hyphen

public static final NAME_i

Value: i

public static final NAME_I

Value: I

public static final NAME_iacute

Value: iacute

public static final NAME_Iacute

Value: Iacute

public static final NAME_icircumflex

Value: icircumflex

public static final NAME_Icircumflex

Value: Icircumflex

Page 452 of 1521


de.intarsys.pdf.encoding.Encoding

public static final NAME_idieresis

Value: idieresis

public static final NAME_Idieresis

Value: Idieresis

public static final NAME_igrave

Value: igrave

public static final NAME_Igrave

Value: Igrave

public static final NAME_j

Value: j

public static final NAME_J

Value: J

public static final NAME_k

Value: k

public static final NAME_K

Value: K

public static final NAME_l

Value: l

public static final NAME_L

Value: L

public static final NAME_less

Value: less

public static final NAME_logicalnot

Value: logicalnot

public static final NAME_lslash

Value: lslash

public static final NAME_Lslash

Value: Lslash

public static final NAME_m

Value: m

public static final NAME_M

Value: M

Page 453 of 1521


de.intarsys.pdf.encoding.Encoding

public static final NAME_macron

Value: macron

public static final NAME_minus

Value: minus

public static final NAME_mu

Value: mu

public static final NAME_multiply

Value: multiply

public static final NAME_n

Value: n

public static final NAME_N

Value: N

public static final NAME_nine

Value: nine

public static final NAME_ntilde

Value: ntilde

public static final NAME_Ntilde

Value: Ntilde

public static final NAME_numbersign

Value: numbersign

public static final NAME_o

Value: o

public static final NAME_O

Value: O

public static final NAME_oacute

Value: oacute

public static final NAME_Oacute

Value: Oacute

public static final NAME_ocircumflex

Value: ocircumflex

public static final NAME_Ocircumflex

Value: Ocircumflex

Page 454 of 1521


de.intarsys.pdf.encoding.Encoding

public static final NAME_odieresis

Value: odieresis

public static final NAME_Odieresis

Value: Odieresis

public static final NAME_oe

Value: oe

public static final NAME_OE

Value: OE

public static final NAME_ogonek

Value: ogonek

public static final NAME_ograve

Value: ograve

public static final NAME_Ograve

Value: Ograve

public static final NAME_one

Value: one

public static final NAME_onehalf

Value: onehalf

public static final NAME_onequarter

Value: onequarter

public static final NAME_onesuperior

Value: onesuperior

public static final NAME_ordfeminine

Value: ordfeminine

public static final NAME_ordmasculine

Value: ordmasculine

public static final NAME_oslash

Value: oslash

public static final NAME_Oslash

Value: Oslash

public static final NAME_otilde

Value: otilde

Page 455 of 1521


de.intarsys.pdf.encoding.Encoding

public static final NAME_Otilde

Value: Otilde

public static final NAME_p

Value: p

public static final NAME_P

Value: P

public static final NAME_paragraph

Value: paragraph

public static final NAME_parenleft

Value: parenleft

public static final NAME_parenright

Value: parenright

public static final NAME_percent

Value: percent

public static final NAME_period

Value: period

public static final NAME_periodcentered

Value: periodcentered

public static final NAME_perthousand

Value: perthousand

public static final NAME_plus

Value: plus

public static final NAME_plusminus

Value: plusminus

public static final NAME_q

Value: q

public static final NAME_Q

Value: Q

public static final NAME_question

Value: question

public static final NAME_questiondown

Value: questiondown

Page 456 of 1521


de.intarsys.pdf.encoding.Encoding

public static final NAME_quotedbl

Value: quotedbl

public static final NAME_quotedblbase

Value: quotedblbase

public static final NAME_quotedblleft

Value: quotedblleft

public static final NAME_quotedblright

Value: quotedblright

public static final NAME_quoteleft

Value: quoteleft

public static final NAME_quoteright

Value: quoteright

public static final NAME_quotesinglbase

Value: quotesinglbase

public static final NAME_quotesingle

Value: quotesingle

public static final NAME_r

Value: r

public static final NAME_R

Value: R

public static final NAME_registered

Value: registered

public static final NAME_ring

Value: ring

public static final NAME_s

Value: s

public static final NAME_S

Value: S

public static final NAME_scaron

Value: scaron

public static final NAME_Scaron

Value: Scaron

Page 457 of 1521


de.intarsys.pdf.encoding.Encoding

public static final NAME_section

Value: section

public static final NAME_semicolon

Value: semicolon

public static final NAME_seven

Value: seven

public static final NAME_six

Value: six

public static final NAME_slash

Value: slash

public static final NAME_space

Value: space

public static final NAME_sterling

Value: sterling

public static final NAME_t

Value: t

public static final NAME_T

Value: T

public static final NAME_thorn

Value: thorn

public static final NAME_Thorn

Value: Thorn

public static final NAME_three

Value: three

public static final NAME_threequarters

Value: threequarters

public static final NAME_threesuperior

Value: threesuperior

public static final NAME_tilde

Value: tilde

public static final NAME_trademark

Value: trademark

Page 458 of 1521


de.intarsys.pdf.encoding.Encoding

public static final NAME_two

Value: two

public static final NAME_twosuperior

Value: twosuperior

public static final NAME_u

Value: u

public static final NAME_U

Value: U

public static final NAME_uacute

Value: uacute

public static final NAME_Uacute

Value: Uacute

public static final NAME_ucircumflex

Value: ucircumflex

public static final NAME_Ucircumflex

Value: Ucircumflex

public static final NAME_udieresis

Value: udieresis

public static final NAME_Udieresis

Value: Udieresis

public static final NAME_ugrave

Value: ugrave

public static final NAME_Ugrave

Value: Ugrave

public static final NAME_underscore

Value: underscore

public static final NAME_v

Value: v

public static final NAME_V

Value: V

public static final NAME_w

Value: w

Page 459 of 1521


de.intarsys.pdf.encoding.Encoding

public static final NAME_W

Value: W

public static final NAME_x

Value: x

public static final NAME_X

Value: X

public static final NAME_y

Value: y

public static final NAME_Y

Value: Y

public static final NAME_yacute

Value: yacute

public static final NAME_Yacute

Value: Yacute

public static final NAME_ydieresis

Value: ydieresis

public static final NAME_Ydieresis

Value: Ydieresis

public static final NAME_yen

Value: yen

public static final NAME_z

Value: z

public static final NAME_Z

Value: Z

public static final NAME_zcaron

Value: zcaron

public static final NAME_Zcaron

Value: Zcaron

public static final NAME_zero

Value: zero

Constructor Summary
public Encoding()
Create a new Encoding

Page 460 of 1521


de.intarsys.pdf.encoding.Encoding

Method Summary
static Encoding create(COSName name)
"Create" one of the well known encodings.

java.io.Reader createReader(java.io.InputStream is)


Create a reader on the InputStream is that uses the encoding defined in the receiver.

java.io.Writer createWriter(java.io.OutputStream os)


Create a writer on the OutputStream os that uses the encoding defined in the receiver.

String decode(byte[] bytes)

byte[] encode(char[] value)

byte[] encode(String value)

abstract int getByteCode(int unicode)


Get the byte code point where the character referenced by the Unicode code point unicode
is mapped in this font encoding or -1 if invalid.

abstract int getByteCode(String name)


Get the code point where the character referenced by the Adobe glyph name name is
mapped in this font encoding or -1 if not valid.

abstract COSObject getCosObject()


Get an object that can be used as a representation of the receiver encoding within doc.

String getDifferenceGlyphName(int codePoint)

int getDifferenceUnicode(int codePoint)

abstract String getGlyphName(int codePoint)


Get the character name for a given encoded byte code point.

abstract String getName()

static Encoding getStandard()


Return the standard encoding for the PDF specification.

abstract int getUnicode(int byteCode)


Get the Unicode code point for the encoded code Point byteCode or -1 if not available.

abstract int getValidByteCode(int unicode)


Get the byte code point where the character referenced by the Unicode code point unicode
is mapped in this font encoding or a valid replacement code point if invalid.

abstract int getValidByteCode(String name)


Get the code point where the character referenced by the Adobe glyph name name is
mapped in this font encoding or a valid replacement.

boolean isFontSpecificEncoding()
Answer true if this encoding is specific to and embedded into the font program itself so that
we can not derive any mapping information from here.

String toString()

Page 461 of 1521


de.intarsys.pdf.encoding.Encoding

Fields
CN_MacRomanEncoding
public static final de.intarsys.pdf.cos.COSName CN_MacRomanEncoding

CN_StandardEncoding
public static final de.intarsys.pdf.cos.COSName CN_StandardEncoding

CN_WinAnsiEncoding
public static final de.intarsys.pdf.cos.COSName CN_WinAnsiEncoding

NAME_a
public static final java.lang.String NAME_a

Constant value: a

NAME_A
public static final java.lang.String NAME_A

Constant value: A

NAME_aacute
public static final java.lang.String NAME_aacute

Constant value: aacute

NAME_Aacute
public static final java.lang.String NAME_Aacute

Constant value: Aacute

NAME_acircumflex
public static final java.lang.String NAME_acircumflex

Constant value: acircumflex

Page 462 of 1521


de.intarsys.pdf.encoding.Encoding

(continued from last page)

NAME_Acircumflex
public static final java.lang.String NAME_Acircumflex

Constant value: Acircumflex

NAME_acute
public static final java.lang.String NAME_acute

Constant value: acute

NAME_adieresis
public static final java.lang.String NAME_adieresis

Constant value: adieresis

NAME_Adieresis
public static final java.lang.String NAME_Adieresis

Constant value: Adieresis

NAME_ae
public static final java.lang.String NAME_ae

Constant value: ae

NAME_AE
public static final java.lang.String NAME_AE

Constant value: AE

NAME_agrave
public static final java.lang.String NAME_agrave

Constant value: agrave

NAME_Agrave
public static final java.lang.String NAME_Agrave

Constant value: Agrave

NAME_ampersand
public static final java.lang.String NAME_ampersand

Page 463 of 1521


de.intarsys.pdf.encoding.Encoding

(continued from last page)

Constant value: ampersand

NAME_aring
public static final java.lang.String NAME_aring

Constant value: aring

NAME_Aring
public static final java.lang.String NAME_Aring

Constant value: Aring

NAME_asciicircum
public static final java.lang.String NAME_asciicircum

Constant value: asciicircum

NAME_asciitilde
public static final java.lang.String NAME_asciitilde

Constant value: asciitilde

NAME_asterisk
public static final java.lang.String NAME_asterisk

Constant value: asterisk

NAME_at
public static final java.lang.String NAME_at

Constant value: at

NAME_atilde
public static final java.lang.String NAME_atilde

Constant value: atilde

NAME_Atilde
public static final java.lang.String NAME_Atilde

Constant value: Atilde

Page 464 of 1521


de.intarsys.pdf.encoding.Encoding

NAME_b
public static final java.lang.String NAME_b

Constant value: b

NAME_B
public static final java.lang.String NAME_B

Constant value: B

NAME_backslash
public static final java.lang.String NAME_backslash

Constant value: backslash

NAME_bar
public static final java.lang.String NAME_bar

Constant value: bar

NAME_braceleft
public static final java.lang.String NAME_braceleft

Constant value: braceleft

NAME_braceright
public static final java.lang.String NAME_braceright

Constant value: braceright

NAME_bracketleft
public static final java.lang.String NAME_bracketleft

Constant value: bracketleft

NAME_bracketright
public static final java.lang.String NAME_bracketright

Constant value: bracketright

Page 465 of 1521


de.intarsys.pdf.encoding.Encoding

(continued from last page)

NAME_breve
public static final java.lang.String NAME_breve

Constant value: breve

NAME_brokenbar
public static final java.lang.String NAME_brokenbar

Constant value: brokenbar

NAME_bullet
public static final java.lang.String NAME_bullet

Constant value: bullet

NAME_c
public static final java.lang.String NAME_c

Constant value: c

NAME_C
public static final java.lang.String NAME_C

Constant value: C

NAME_caron
public static final java.lang.String NAME_caron

Constant value: caron

NAME_ccedilla
public static final java.lang.String NAME_ccedilla

Constant value: ccedilla

NAME_Ccedilla
public static final java.lang.String NAME_Ccedilla

Constant value: Ccedilla

NAME_cedilla
public static final java.lang.String NAME_cedilla

Page 466 of 1521


de.intarsys.pdf.encoding.Encoding

(continued from last page)

Constant value: cedilla

NAME_cent
public static final java.lang.String NAME_cent

Constant value: cent

NAME_circumflex
public static final java.lang.String NAME_circumflex

Constant value: circumflex

NAME_colon
public static final java.lang.String NAME_colon

Constant value: colon

NAME_comma
public static final java.lang.String NAME_comma

Constant value: comma

NAME_copyright
public static final java.lang.String NAME_copyright

Constant value: copyright

NAME_currency
public static final java.lang.String NAME_currency

Constant value: currency

NAME_d
public static final java.lang.String NAME_d

Constant value: d

NAME_D
public static final java.lang.String NAME_D

Constant value: D

Page 467 of 1521


de.intarsys.pdf.encoding.Encoding

NAME_dagger
public static final java.lang.String NAME_dagger

Constant value: dagger

NAME_daggerdbl
public static final java.lang.String NAME_daggerdbl

Constant value: daggerdbl

NAME_degree
public static final java.lang.String NAME_degree

Constant value: degree

NAME_dieresis
public static final java.lang.String NAME_dieresis

Constant value: dieresis

NAME_divide
public static final java.lang.String NAME_divide

Constant value: divide

NAME_dollar
public static final java.lang.String NAME_dollar

Constant value: dollar

NAME_dotaccent
public static final java.lang.String NAME_dotaccent

Constant value: dotaccent

NAME_dotlessi
public static final java.lang.String NAME_dotlessi

Constant value: dotlessi

Page 468 of 1521


de.intarsys.pdf.encoding.Encoding

(continued from last page)

NAME_e
public static final java.lang.String NAME_e

Constant value: e

NAME_E
public static final java.lang.String NAME_E

Constant value: E

NAME_eacute
public static final java.lang.String NAME_eacute

Constant value: eacute

NAME_Eacute
public static final java.lang.String NAME_Eacute

Constant value: Eacute

NAME_ecircumflex
public static final java.lang.String NAME_ecircumflex

Constant value: ecircumflex

NAME_Ecircumflex
public static final java.lang.String NAME_Ecircumflex

Constant value: Ecircumflex

NAME_edieresis
public static final java.lang.String NAME_edieresis

Constant value: edieresis

NAME_Edieresis
public static final java.lang.String NAME_Edieresis

Constant value: Edieresis

NAME_egrave
public static final java.lang.String NAME_egrave

Page 469 of 1521


de.intarsys.pdf.encoding.Encoding

(continued from last page)

Constant value: egrave

NAME_Egrave
public static final java.lang.String NAME_Egrave

Constant value: Egrave

NAME_eight
public static final java.lang.String NAME_eight

Constant value: eight

NAME_ellipsis
public static final java.lang.String NAME_ellipsis

Constant value: ellipsis

NAME_emdash
public static final java.lang.String NAME_emdash

Constant value: emdash

NAME_endash
public static final java.lang.String NAME_endash

Constant value: endash

NAME_equal
public static final java.lang.String NAME_equal

Constant value: equal

NAME_eth
public static final java.lang.String NAME_eth

Constant value: eth

NAME_Eth
public static final java.lang.String NAME_Eth

Constant value: Eth

Page 470 of 1521


de.intarsys.pdf.encoding.Encoding

NAME_Euro
public static final java.lang.String NAME_Euro

Constant value: Euro

NAME_exclam
public static final java.lang.String NAME_exclam

Constant value: exclam

NAME_exclamdown
public static final java.lang.String NAME_exclamdown

Constant value: exclamdown

NAME_f
public static final java.lang.String NAME_f

Constant value: f

NAME_F
public static final java.lang.String NAME_F

Constant value: F

NAME_fi
public static final java.lang.String NAME_fi

Constant value: fi

NAME_five
public static final java.lang.String NAME_five

Constant value: five

NAME_fl
public static final java.lang.String NAME_fl

Constant value: fl

Page 471 of 1521


de.intarsys.pdf.encoding.Encoding

(continued from last page)

NAME_florin
public static final java.lang.String NAME_florin

Constant value: florin

NAME_four
public static final java.lang.String NAME_four

Constant value: four

NAME_fraction
public static final java.lang.String NAME_fraction

Constant value: fraction

NAME_g
public static final java.lang.String NAME_g

Constant value: g

NAME_G
public static final java.lang.String NAME_G

Constant value: G

NAME_germandbls
public static final java.lang.String NAME_germandbls

Constant value: germandbls

NAME_grave
public static final java.lang.String NAME_grave

Constant value: grave

NAME_greater
public static final java.lang.String NAME_greater

Constant value: greater

NAME_guillemotleft
public static final java.lang.String NAME_guillemotleft

Page 472 of 1521


de.intarsys.pdf.encoding.Encoding

(continued from last page)

Constant value: guillemotleft

NAME_guillemotright
public static final java.lang.String NAME_guillemotright

Constant value: guillemotright

NAME_guilsinglleft
public static final java.lang.String NAME_guilsinglleft

Constant value: guilsinglleft

NAME_guilsinglright
public static final java.lang.String NAME_guilsinglright

Constant value: guilsinglright

NAME_h
public static final java.lang.String NAME_h

Constant value: h

NAME_H
public static final java.lang.String NAME_H

Constant value: H

NAME_hungarumlaut
public static final java.lang.String NAME_hungarumlaut

Constant value: hungarumlaut

NAME_hyphen
public static final java.lang.String NAME_hyphen

Constant value: hyphen

NAME_i
public static final java.lang.String NAME_i

Constant value: i

Page 473 of 1521


de.intarsys.pdf.encoding.Encoding

NAME_I
public static final java.lang.String NAME_I

Constant value: I

NAME_iacute
public static final java.lang.String NAME_iacute

Constant value: iacute

NAME_Iacute
public static final java.lang.String NAME_Iacute

Constant value: Iacute

NAME_icircumflex
public static final java.lang.String NAME_icircumflex

Constant value: icircumflex

NAME_Icircumflex
public static final java.lang.String NAME_Icircumflex

Constant value: Icircumflex

NAME_idieresis
public static final java.lang.String NAME_idieresis

Constant value: idieresis

NAME_Idieresis
public static final java.lang.String NAME_Idieresis

Constant value: Idieresis

NAME_igrave
public static final java.lang.String NAME_igrave

Constant value: igrave

Page 474 of 1521


de.intarsys.pdf.encoding.Encoding

(continued from last page)

NAME_Igrave
public static final java.lang.String NAME_Igrave

Constant value: Igrave

NAME_j
public static final java.lang.String NAME_j

Constant value: j

NAME_J
public static final java.lang.String NAME_J

Constant value: J

NAME_k
public static final java.lang.String NAME_k

Constant value: k

NAME_K
public static final java.lang.String NAME_K

Constant value: K

NAME_l
public static final java.lang.String NAME_l

Constant value: l

NAME_L
public static final java.lang.String NAME_L

Constant value: L

NAME_less
public static final java.lang.String NAME_less

Constant value: less

NAME_logicalnot
public static final java.lang.String NAME_logicalnot

Page 475 of 1521


de.intarsys.pdf.encoding.Encoding

(continued from last page)

Constant value: logicalnot

NAME_lslash
public static final java.lang.String NAME_lslash

Constant value: lslash

NAME_Lslash
public static final java.lang.String NAME_Lslash

Constant value: Lslash

NAME_m
public static final java.lang.String NAME_m

Constant value: m

NAME_M
public static final java.lang.String NAME_M

Constant value: M

NAME_macron
public static final java.lang.String NAME_macron

Constant value: macron

NAME_minus
public static final java.lang.String NAME_minus

Constant value: minus

NAME_mu
public static final java.lang.String NAME_mu

Constant value: mu

NAME_multiply
public static final java.lang.String NAME_multiply

Constant value: multiply

Page 476 of 1521


de.intarsys.pdf.encoding.Encoding

NAME_n
public static final java.lang.String NAME_n

Constant value: n

NAME_N
public static final java.lang.String NAME_N

Constant value: N

NAME_nine
public static final java.lang.String NAME_nine

Constant value: nine

NAME_ntilde
public static final java.lang.String NAME_ntilde

Constant value: ntilde

NAME_Ntilde
public static final java.lang.String NAME_Ntilde

Constant value: Ntilde

NAME_numbersign
public static final java.lang.String NAME_numbersign

Constant value: numbersign

NAME_o
public static final java.lang.String NAME_o

Constant value: o

NAME_O
public static final java.lang.String NAME_O

Constant value: O

Page 477 of 1521


de.intarsys.pdf.encoding.Encoding

(continued from last page)

NAME_oacute
public static final java.lang.String NAME_oacute

Constant value: oacute

NAME_Oacute
public static final java.lang.String NAME_Oacute

Constant value: Oacute

NAME_ocircumflex
public static final java.lang.String NAME_ocircumflex

Constant value: ocircumflex

NAME_Ocircumflex
public static final java.lang.String NAME_Ocircumflex

Constant value: Ocircumflex

NAME_odieresis
public static final java.lang.String NAME_odieresis

Constant value: odieresis

NAME_Odieresis
public static final java.lang.String NAME_Odieresis

Constant value: Odieresis

NAME_oe
public static final java.lang.String NAME_oe

Constant value: oe

NAME_OE
public static final java.lang.String NAME_OE

Constant value: OE

NAME_ogonek
public static final java.lang.String NAME_ogonek

Page 478 of 1521


de.intarsys.pdf.encoding.Encoding

(continued from last page)

Constant value: ogonek

NAME_ograve
public static final java.lang.String NAME_ograve

Constant value: ograve

NAME_Ograve
public static final java.lang.String NAME_Ograve

Constant value: Ograve

NAME_one
public static final java.lang.String NAME_one

Constant value: one

NAME_onehalf
public static final java.lang.String NAME_onehalf

Constant value: onehalf

NAME_onequarter
public static final java.lang.String NAME_onequarter

Constant value: onequarter

NAME_onesuperior
public static final java.lang.String NAME_onesuperior

Constant value: onesuperior

NAME_ordfeminine
public static final java.lang.String NAME_ordfeminine

Constant value: ordfeminine

NAME_ordmasculine
public static final java.lang.String NAME_ordmasculine

Constant value: ordmasculine

Page 479 of 1521


de.intarsys.pdf.encoding.Encoding

NAME_oslash
public static final java.lang.String NAME_oslash

Constant value: oslash

NAME_Oslash
public static final java.lang.String NAME_Oslash

Constant value: Oslash

NAME_otilde
public static final java.lang.String NAME_otilde

Constant value: otilde

NAME_Otilde
public static final java.lang.String NAME_Otilde

Constant value: Otilde

NAME_p
public static final java.lang.String NAME_p

Constant value: p

NAME_P
public static final java.lang.String NAME_P

Constant value: P

NAME_paragraph
public static final java.lang.String NAME_paragraph

Constant value: paragraph

NAME_parenleft
public static final java.lang.String NAME_parenleft

Constant value: parenleft

Page 480 of 1521


de.intarsys.pdf.encoding.Encoding

(continued from last page)

NAME_parenright
public static final java.lang.String NAME_parenright

Constant value: parenright

NAME_percent
public static final java.lang.String NAME_percent

Constant value: percent

NAME_period
public static final java.lang.String NAME_period

Constant value: period

NAME_periodcentered
public static final java.lang.String NAME_periodcentered

Constant value: periodcentered

NAME_perthousand
public static final java.lang.String NAME_perthousand

Constant value: perthousand

NAME_plus
public static final java.lang.String NAME_plus

Constant value: plus

NAME_plusminus
public static final java.lang.String NAME_plusminus

Constant value: plusminus

NAME_q
public static final java.lang.String NAME_q

Constant value: q

NAME_Q
public static final java.lang.String NAME_Q

Page 481 of 1521


de.intarsys.pdf.encoding.Encoding

(continued from last page)

Constant value: Q

NAME_question
public static final java.lang.String NAME_question

Constant value: question

NAME_questiondown
public static final java.lang.String NAME_questiondown

Constant value: questiondown

NAME_quotedbl
public static final java.lang.String NAME_quotedbl

Constant value: quotedbl

NAME_quotedblbase
public static final java.lang.String NAME_quotedblbase

Constant value: quotedblbase

NAME_quotedblleft
public static final java.lang.String NAME_quotedblleft

Constant value: quotedblleft

NAME_quotedblright
public static final java.lang.String NAME_quotedblright

Constant value: quotedblright

NAME_quoteleft
public static final java.lang.String NAME_quoteleft

Constant value: quoteleft

NAME_quoteright
public static final java.lang.String NAME_quoteright

Constant value: quoteright

Page 482 of 1521


de.intarsys.pdf.encoding.Encoding

NAME_quotesinglbase
public static final java.lang.String NAME_quotesinglbase

Constant value: quotesinglbase

NAME_quotesingle
public static final java.lang.String NAME_quotesingle

Constant value: quotesingle

NAME_r
public static final java.lang.String NAME_r

Constant value: r

NAME_R
public static final java.lang.String NAME_R

Constant value: R

NAME_registered
public static final java.lang.String NAME_registered

Constant value: registered

NAME_ring
public static final java.lang.String NAME_ring

Constant value: ring

NAME_s
public static final java.lang.String NAME_s

Constant value: s

NAME_S
public static final java.lang.String NAME_S

Constant value: S

Page 483 of 1521


de.intarsys.pdf.encoding.Encoding

(continued from last page)

NAME_scaron
public static final java.lang.String NAME_scaron

Constant value: scaron

NAME_Scaron
public static final java.lang.String NAME_Scaron

Constant value: Scaron

NAME_section
public static final java.lang.String NAME_section

Constant value: section

NAME_semicolon
public static final java.lang.String NAME_semicolon

Constant value: semicolon

NAME_seven
public static final java.lang.String NAME_seven

Constant value: seven

NAME_six
public static final java.lang.String NAME_six

Constant value: six

NAME_slash
public static final java.lang.String NAME_slash

Constant value: slash

NAME_space
public static final java.lang.String NAME_space

Constant value: space

NAME_sterling
public static final java.lang.String NAME_sterling

Page 484 of 1521


de.intarsys.pdf.encoding.Encoding

(continued from last page)

Constant value: sterling

NAME_t
public static final java.lang.String NAME_t

Constant value: t

NAME_T
public static final java.lang.String NAME_T

Constant value: T

NAME_thorn
public static final java.lang.String NAME_thorn

Constant value: thorn

NAME_Thorn
public static final java.lang.String NAME_Thorn

Constant value: Thorn

NAME_three
public static final java.lang.String NAME_three

Constant value: three

NAME_threequarters
public static final java.lang.String NAME_threequarters

Constant value: threequarters

NAME_threesuperior
public static final java.lang.String NAME_threesuperior

Constant value: threesuperior

NAME_tilde
public static final java.lang.String NAME_tilde

Constant value: tilde

Page 485 of 1521


de.intarsys.pdf.encoding.Encoding

NAME_trademark
public static final java.lang.String NAME_trademark

Constant value: trademark

NAME_two
public static final java.lang.String NAME_two

Constant value: two

NAME_twosuperior
public static final java.lang.String NAME_twosuperior

Constant value: twosuperior

NAME_u
public static final java.lang.String NAME_u

Constant value: u

NAME_U
public static final java.lang.String NAME_U

Constant value: U

NAME_uacute
public static final java.lang.String NAME_uacute

Constant value: uacute

NAME_Uacute
public static final java.lang.String NAME_Uacute

Constant value: Uacute

NAME_ucircumflex
public static final java.lang.String NAME_ucircumflex

Constant value: ucircumflex

Page 486 of 1521


de.intarsys.pdf.encoding.Encoding

(continued from last page)

NAME_Ucircumflex
public static final java.lang.String NAME_Ucircumflex

Constant value: Ucircumflex

NAME_udieresis
public static final java.lang.String NAME_udieresis

Constant value: udieresis

NAME_Udieresis
public static final java.lang.String NAME_Udieresis

Constant value: Udieresis

NAME_ugrave
public static final java.lang.String NAME_ugrave

Constant value: ugrave

NAME_Ugrave
public static final java.lang.String NAME_Ugrave

Constant value: Ugrave

NAME_underscore
public static final java.lang.String NAME_underscore

Constant value: underscore

NAME_v
public static final java.lang.String NAME_v

Constant value: v

NAME_V
public static final java.lang.String NAME_V

Constant value: V

NAME_w
public static final java.lang.String NAME_w

Page 487 of 1521


de.intarsys.pdf.encoding.Encoding

(continued from last page)

Constant value: w

NAME_W
public static final java.lang.String NAME_W

Constant value: W

NAME_x
public static final java.lang.String NAME_x

Constant value: x

NAME_X
public static final java.lang.String NAME_X

Constant value: X

NAME_y
public static final java.lang.String NAME_y

Constant value: y

NAME_Y
public static final java.lang.String NAME_Y

Constant value: Y

NAME_yacute
public static final java.lang.String NAME_yacute

Constant value: yacute

NAME_Yacute
public static final java.lang.String NAME_Yacute

Constant value: Yacute

NAME_ydieresis
public static final java.lang.String NAME_ydieresis

Constant value: ydieresis

Page 488 of 1521


de.intarsys.pdf.encoding.Encoding

NAME_Ydieresis
public static final java.lang.String NAME_Ydieresis

Constant value: Ydieresis

NAME_yen
public static final java.lang.String NAME_yen

Constant value: yen

NAME_z
public static final java.lang.String NAME_z

Constant value: z

NAME_Z
public static final java.lang.String NAME_Z

Constant value: Z

NAME_zcaron
public static final java.lang.String NAME_zcaron

Constant value: zcaron

NAME_Zcaron
public static final java.lang.String NAME_Zcaron

Constant value: Zcaron

NAME_zero
public static final java.lang.String NAME_zero

Constant value: zero

Constructors
Encoding
public Encoding()

Create a new Encoding

Methods

Page 489 of 1521


de.intarsys.pdf.encoding.Encoding

(continued from last page)

create
public static Encoding create(COSName name)

"Create" one of the well known encodings.

Parameters:
name - The name of the encoding to create.

Returns:
The encoding implementation.

Throws:
IllegalArgumentException - When the encoding is not supported.

getStandard
public static Encoding getStandard()

Return the standard encoding for the PDF specification.

Returns:
Return the standard encoding for the PDF specification.

createReader
public java.io.Reader createReader(java.io.InputStream is)

Create a reader on the InputStream is that uses the encoding defined in the receiver.

Parameters:
is - The input stream to read.

Returns:
Create a reader on the InputStream is that uses the encoding defined in the receiver.

createWriter
public java.io.Writer createWriter(java.io.OutputStream os)

Create a writer on the OutputStream os that uses the encoding defined in the receiver.

Parameters:
os - The output stream to be written.

Returns:
Create a writer on the OutputStream os that uses the encoding defined in the receiver.

decode
public String decode(byte[] bytes)

encode
public byte[] encode(char[] value)

Page 490 of 1521


de.intarsys.pdf.encoding.Encoding

(continued from last page)

encode
public byte[] encode(String value)

getByteCode
public abstract int getByteCode(int unicode)

Get the byte code point where the character referenced by the Unicode code point unicode is mapped in this font
encoding or -1 if invalid.

unicode must be a valid Unicode code point. The returned code point is a value from 0...255. If the Unicode code point is
not valid or not mapped, -1 is returned.

Parameters:
unicode - The Unicode code point to look up.

Returns:
The index from 0..255 where this character is mapped or -1.

getByteCode
public abstract int getByteCode(String name)

Get the code point where the character referenced by the Adobe glyph name name is mapped in this font encoding or -1 if
not valid.

name must be a valid Adobe glyph name. The code point is a value from 0...255. If the glyph is not found, -1 is returned.

Parameters:
name - The glyph name.

Returns:
The index from 0..255 where this character is mapped or -1.

getCosObject
public abstract COSObject getCosObject()

Get an object that can be used as a representation of the receiver encoding within doc.

Returns:
Get an object that can be used as a representation of the receiver encoding within doc.

getGlyphName
public abstract String getGlyphName(int codePoint)

Get the character name for a given encoded byte code point. If no mapping is defined, return ".notdef".

Parameters:
codePoint - The encoded byte code point.

Returns:
The glyph name of the character referenced by codePoint or ".notdef".

Page 491 of 1521


de.intarsys.pdf.encoding.Encoding

getName
public abstract String getName()

getUnicode
public abstract int getUnicode(int byteCode)

Get the Unicode code point for the encoded code Point byteCode or -1 if not available.

Parameters:
byteCode - The encoded code point

Returns:
The Unicode code point for the encoded code Point byteCode or -1.

getValidByteCode
public abstract int getValidByteCode(int unicode)

Get the byte code point where the character referenced by the Unicode code point unicode is mapped in this font
encoding or a valid replacement code point if invalid.

unicode must be a valid Unicode code point. The returned code point is a value from 0...255. If the Unicode code point is
not valid or not mapped, a valid code point is returned is returned (for example the space character).

Parameters:
unicode - The Unicode code point to look up.

Returns:
The index from 0..255 where this character is mapped or valid replacement.

getValidByteCode
public abstract int getValidByteCode(String name)

Get the code point where the character referenced by the Adobe glyph name name is mapped in this font encoding or a
valid replacement.

name must be a valid Adobe glyph name. The code point is a value from 0...255. If the glyph is not found, a valif
replacement code point is returned instead (for example the space character).

Parameters:
name - The glyph name.

Returns:
The index from 0..255 where this character is mapped or a valid replacement.

isFontSpecificEncoding
public boolean isFontSpecificEncoding()

Answer true if this encoding is specific to and embedded into the font program itself so that we can not derive any mapping
information from here.

Returns:
Answer true if this encoding is specific to and embedded into the font program itself

Page 492 of 1521


de.intarsys.pdf.encoding.Encoding

toString
public String toString()

getDifferenceUnicode
public int getDifferenceUnicode(int codePoint)

getDifferenceGlyphName
public String getDifferenceGlyphName(int codePoint)

Page 493 of 1521


de.intarsys.pdf.encoding.FontSpecificEncoding

de.intarsys.pdf.encoding
Class FontSpecificEncoding
java.lang.Object
|
+-de.intarsys.pdf.encoding.Encoding
|
+-de.intarsys.pdf.encoding.FontSpecificEncoding

public class FontSpecificEncoding


extends Encoding

An encoding that is defined externally in the font program itself.

There is no further information about how the mapping will be done and we will rely on some heuristics...

Field Summary
public static UNIQUE

Constructor Summary
public FontSpecificEncoding()

Method Summary
int getByteCode(int unicode)

int getByteCode(String name)

COSObject getCosObject()

String getGlyphName(int codePoint)

String getName()

int getUnicode(int byteCode)

int getValidByteCode(int unicode)

int getValidByteCode(String name)

boolean isFontSpecificEncoding()

Fields

Page 494 of 1521


de.intarsys.pdf.encoding.FontSpecificEncoding

(continued from last page)

UNIQUE
public static de.intarsys.pdf.encoding.FontSpecificEncoding UNIQUE

Constructors
FontSpecificEncoding
public FontSpecificEncoding()

Methods
getByteCode
public int getByteCode(String name)

Get the code point where the character referenced by the Adobe glyph name name is mapped in this font encoding or -1 if
not valid.

name must be a valid Adobe glyph name. The code point is a value from 0...255. If the glyph is not found, -1 is returned.

getByteCode
public int getByteCode(int unicode)

Get the byte code point where the character referenced by the Unicode code point unicode is mapped in this font
encoding or -1 if invalid.

unicode must be a valid Unicode code point. The returned code point is a value from 0...255. If the Unicode code point is
not valid or not mapped, -1 is returned.

getCosObject
public COSObject getCosObject()

Get an object that can be used as a representation of the receiver encoding within doc.

isFontSpecificEncoding
public boolean isFontSpecificEncoding()

Answer true if this encoding is specific to and embedded into the font program itself so that we can not derive any mapping
information from here.

getGlyphName
public String getGlyphName(int codePoint)

Get the character name for a given encoded byte code point. If no mapping is defined, return ".notdef".

getName
public String getName()

Page 495 of 1521


de.intarsys.pdf.encoding.FontSpecificEncoding

(continued from last page)

getUnicode
public int getUnicode(int byteCode)

Get the Unicode code point for the encoded code Point byteCode or -1 if not available.

getValidByteCode
public int getValidByteCode(String name)

Get the code point where the character referenced by the Adobe glyph name name is mapped in this font encoding or a
valid replacement.

name must be a valid Adobe glyph name. The code point is a value from 0...255. If the glyph is not found, a valif
replacement code point is returned instead (for example the space character).

getValidByteCode
public int getValidByteCode(int unicode)

Get the byte code point where the character referenced by the Unicode code point unicode is mapped in this font
encoding or a valid replacement code point if invalid.

unicode must be a valid Unicode code point. The returned code point is a value from 0...255. If the Unicode code point is
not valid or not mapped, a valid code point is returned is returned (for example the space character).

Page 496 of 1521


de.intarsys.pdf.encoding.GlyphNameMap

de.intarsys.pdf.encoding
Class GlyphNameMap
java.lang.Object
|
+-de.intarsys.pdf.encoding.GlyphNameMap

public class GlyphNameMap


extends Object

The mapping from Adobe glyph names to Unicode.

Currently only "Latin" encoding is included.todo 2 cmap read externalized representation from adobe

Field Summary
public static final GLYPH_NOTDEF

Value: .notdef

public static final Standard

Method Summary
String getGlyphName(int unicode)
Get the adobe glyph name for a unicode code point or ".notdef" if not available.

int getUnicode(String glyphName)


Get the unicode code point for an Adobe glyph name.

Fields
Standard
public static final de.intarsys.pdf.encoding.GlyphNameMap Standard

GLYPH_NOTDEF
public static final java.lang.String GLYPH_NOTDEF

Constant value: .notdef

Methods
getGlyphName
public String getGlyphName(int unicode)

Get the adobe glyph name for a unicode code point or ".notdef" if not available.

Page 497 of 1521


de.intarsys.pdf.encoding.GlyphNameMap

(continued from last page)

Parameters:
unicode - The unicode code point to look up.

Returns:
The adobe glyph name or ".notdef".

getUnicode
public int getUnicode(String glyphName)

Get the unicode code point for an Adobe glyph name.

If the glyph name is unknown, -1 is returned.

Parameters:
glyphName - An adobe glyph name.

Returns:
The unicode code point for an Adobe glyph name or -1.

Page 498 of 1521


de.intarsys.pdf.encoding.MacOSRomanEncoding

de.intarsys.pdf.encoding
Class MacOSRomanEncoding
java.lang.Object
|
+-de.intarsys.pdf.encoding.Encoding
|
+-de.intarsys.pdf.encoding.MappedEncoding
|
+-de.intarsys.pdf.encoding.MacOSRomanEncoding

public class MacOSRomanEncoding


extends MappedEncoding

Implementation of statndard Roman encoding on the Mac platform.

This is not a "native" PDF endocing! It is simply used for mapping char codes in certain contexts (TrueType with 1,0 charmaps).

Field Summary
public static UNIQUE

Constructor Summary
public MacOSRomanEncoding()

Method Summary
COSObject getCosObject()

String getName()

Fields
UNIQUE
public static de.intarsys.pdf.encoding.MacOSRomanEncoding UNIQUE

Constructors
MacOSRomanEncoding
public MacOSRomanEncoding()

Methods

Page 499 of 1521


de.intarsys.pdf.encoding.MacOSRomanEncoding

(continued from last page)

getCosObject
public COSObject getCosObject()

Get an object that can be used as a representation of the receiver encoding within doc.

getName
public String getName()

Page 500 of 1521


de.intarsys.pdf.encoding.MacRomanEncoding

de.intarsys.pdf.encoding
Class MacRomanEncoding
java.lang.Object
|
+-de.intarsys.pdf.encoding.Encoding
|
+-de.intarsys.pdf.encoding.MappedEncoding
|
+-de.intarsys.pdf.encoding.MacRomanEncoding

public class MacRomanEncoding


extends MappedEncoding

Implementation of MacRomanEncoding

Field Summary
public static UNIQUE

Constructor Summary
public MacRomanEncoding()

Method Summary
COSObject getCosObject()

String getName()

Fields
UNIQUE
public static de.intarsys.pdf.encoding.MacRomanEncoding UNIQUE

Constructors
MacRomanEncoding
public MacRomanEncoding()

Methods

Page 501 of 1521


de.intarsys.pdf.encoding.MacRomanEncoding

(continued from last page)

getCosObject
public COSObject getCosObject()

Get an object that can be used as a representation of the receiver encoding within doc.

getName
public String getName()

Page 502 of 1521


de.intarsys.pdf.encoding.MappedEncoding

de.intarsys.pdf.encoding
Class MappedEncoding
java.lang.Object
|
+-de.intarsys.pdf.encoding.Encoding
|
+-de.intarsys.pdf.encoding.MappedEncoding
Direct Known Subclasses:
MacOSRomanEncoding, MacRomanEncoding, PDFDocEncoding, StandardEncoding, WinAnsiEncoding

public class MappedEncoding


extends Encoding

A MappedEncoding is an explicit map from a codepoint to a name (and vice versa).

A MappedEncoding can be constructed individually (as in a DifferenceEncoding) or be one of the predefined well known
encodings that are implemented using unique instances.

Constructor Summary
public MappedEncoding()
Create a MappedEncoding

Method Summary
void addEncoding(int codePoint, String name)
When constructing manually, one can define a map from codePoint to name with this
method.

void addEncoding(int codePoint, String name, int unicode)


Add a known complete tuple.

int getByteCode(int unicode)

int getByteCode(String name)

COSObject getCosObject()

String getGlyphName(int codePoint)

String getName()

int getUnicode(int byteValue)

int getValidByteCode(int unicode)

int getValidByteCode(String name)

Page 503 of 1521


de.intarsys.pdf.encoding.MappedEncoding

(continued from last page)

Constructors
MappedEncoding
public MappedEncoding()

Create a MappedEncoding

Methods
getByteCode
public int getByteCode(int unicode)

Get the byte code point where the character referenced by the Unicode code point unicode is mapped in this font
encoding or -1 if invalid.

unicode must be a valid Unicode code point. The returned code point is a value from 0...255. If the Unicode code point is
not valid or not mapped, -1 is returned.

getByteCode
public int getByteCode(String name)

Get the code point where the character referenced by the Adobe glyph name name is mapped in this font encoding or -1 if
not valid.

name must be a valid Adobe glyph name. The code point is a value from 0...255. If the glyph is not found, -1 is returned.

getCosObject
public COSObject getCosObject()

Get an object that can be used as a representation of the receiver encoding within doc.

getGlyphName
public String getGlyphName(int codePoint)

Get the character name for a given encoded byte code point. If no mapping is defined, return ".notdef".

getName
public String getName()

getUnicode
public int getUnicode(int byteValue)

Get the Unicode code point for the encoded code Point byteCode or -1 if not available.

getValidByteCode
public int getValidByteCode(int unicode)

Page 504 of 1521


de.intarsys.pdf.encoding.MappedEncoding

(continued from last page)

Get the byte code point where the character referenced by the Unicode code point unicode is mapped in this font
encoding or a valid replacement code point if invalid.

unicode must be a valid Unicode code point. The returned code point is a value from 0...255. If the Unicode code point is
not valid or not mapped, a valid code point is returned is returned (for example the space character).

getValidByteCode
public int getValidByteCode(String name)

Get the code point where the character referenced by the Adobe glyph name name is mapped in this font encoding or a
valid replacement.

name must be a valid Adobe glyph name. The code point is a value from 0...255. If the glyph is not found, a valif
replacement code point is returned instead (for example the space character).

addEncoding
public void addEncoding(int codePoint,
String name)

When constructing manually, one can define a map from codePoint to name with this method.

Parameters:
codePoint - The codePoint from 0..255 where the character should be mapped.
name - The name of the character to be mapped.

addEncoding
public void addEncoding(int codePoint,
String name,
int unicode)

Add a known complete tuple. THis is used if we do not have a name/unicode standard map (for example in symbolic
fonts).

Parameters:
codePoint - The codePoint from 0..255 where the character should be mapped.
name - The name of the character to be mapped.
unicode - The unicode value

Page 505 of 1521


de.intarsys.pdf.encoding.MappedReader

de.intarsys.pdf.encoding
Class MappedReader
java.lang.Object
|
+-java.io.Reader
|
+-de.intarsys.pdf.encoding.MappedReader
All Implemented Interfaces:
java.io.Closeable, Readable

public class MappedReader


extends java.io.Reader

A reader that uses a PDF style encoding to map byte code to unicode.

Constructor Summary
public MappedReader(java.io.InputStream is, Encoding encoding)
Create a MappedReader

Method Summary
void close()

Encoding getEncoding()
The encoding used by this reader.

int read(char[] cbuf, int off, int len)


Read characters into a portion of an array.

Constructors
MappedReader
public MappedReader(java.io.InputStream is,
Encoding encoding)

Create a MappedReader

Parameters:
is - The underlying byte stream.
encoding - The encoding to use.

Methods
getEncoding
public Encoding getEncoding()

The encoding used by this reader.

Page 506 of 1521


de.intarsys.pdf.encoding.MappedReader

(continued from last page)

Returns:
The encoding used by this reader.

close
public void close()
throws java.io.IOException

See Also:
Reader.close()

read
public int read(char[] cbuf,
int off,
int len)
throws java.io.IOException

Read characters into a portion of an array. This method will block until some input is available, an I/O error occurs, or the
end of the stream is reached.

Parameters:
cbuf - Destination buffer
off - Offset at which to start storing characters
len - Maximum number of characters to read

Returns:
The number of characters read, or -1 if the end of the stream has been reached

Throws:
IOException - If an I/O error occurs
IndexOutOfBoundsException

Page 507 of 1521


de.intarsys.pdf.encoding.MappedWriter

de.intarsys.pdf.encoding
Class MappedWriter
java.lang.Object
|
+-java.io.Writer
|
+-de.intarsys.pdf.encoding.MappedWriter
All Implemented Interfaces:
java.io.Flushable, java.io.Closeable, Appendable

public class MappedWriter


extends java.io.Writer

A writer that uses a PDF style encoding to map unicode to byte code.

Constructor Summary
public MappedWriter(java.io.OutputStream out, Encoding encoding)
Create a MappedWriter

Method Summary
void close()

void flush()

Encoding getEncoding()
The encoding used by this writer.

void write(char[] cbuf, int off, int len)

Constructors
MappedWriter
public MappedWriter(java.io.OutputStream out,
Encoding encoding)

Create a MappedWriter

Parameters:
out - The underlying output byte stream.
encoding - The encoding to use.

Methods
getEncoding
public Encoding getEncoding()

Page 508 of 1521


de.intarsys.pdf.encoding.MappedWriter

(continued from last page)

The encoding used by this writer.

Returns:
The encoding used by this writer.

close
public void close()
throws java.io.IOException

See Also:
Writer.close()

flush
public void flush()
throws java.io.IOException

write
public void write(char[] cbuf,
int off,
int len)
throws java.io.IOException

Page 509 of 1521


de.intarsys.pdf.encoding.PDFDocEncoding

de.intarsys.pdf.encoding
Class PDFDocEncoding
java.lang.Object
|
+-de.intarsys.pdf.encoding.Encoding
|
+-de.intarsys.pdf.encoding.MappedEncoding
|
+-de.intarsys.pdf.encoding.PDFDocEncoding

public class PDFDocEncoding


extends MappedEncoding

A mapper between PDFEncoding and Unicode

Field Summary
public static UNIQUE

Constructor Summary
public PDFDocEncoding()

Method Summary
COSObject getCosObject()

String getName()

Fields
UNIQUE
public static de.intarsys.pdf.encoding.PDFDocEncoding UNIQUE

Constructors
PDFDocEncoding
public PDFDocEncoding()

Methods

Page 510 of 1521


de.intarsys.pdf.encoding.PDFDocEncoding

(continued from last page)

getCosObject
public COSObject getCosObject()

Get an object that can be used as a representation of the receiver encoding within doc.

getName
public String getName()

Page 511 of 1521


de.intarsys.pdf.encoding.StandardEncoding

de.intarsys.pdf.encoding
Class StandardEncoding
java.lang.Object
|
+-de.intarsys.pdf.encoding.Encoding
|
+-de.intarsys.pdf.encoding.MappedEncoding
|
+-de.intarsys.pdf.encoding.StandardEncoding

public class StandardEncoding


extends MappedEncoding

Implementation of StandardEncoding

Field Summary
public static UNIQUE

Constructor Summary
public StandardEncoding()

Method Summary
COSObject getCosObject()

String getName()

Fields
UNIQUE
public static de.intarsys.pdf.encoding.StandardEncoding UNIQUE

Constructors
StandardEncoding
public StandardEncoding()

Methods

Page 512 of 1521


de.intarsys.pdf.encoding.StandardEncoding

(continued from last page)

getCosObject
public COSObject getCosObject()

Get an object that can be used as a representation of the receiver encoding within doc.

getName
public String getName()

Page 513 of 1521


de.intarsys.pdf.encoding.SymbolEncoding

de.intarsys.pdf.encoding
Class SymbolEncoding
java.lang.Object
|
+-de.intarsys.pdf.encoding.Encoding
|
+-de.intarsys.pdf.encoding.SymbolEncoding

public class SymbolEncoding


extends Encoding

Field Summary
public static UNIQUE

Constructor Summary
public SymbolEncoding()

Method Summary
int getByteCode(int unicode)

int getByteCode(String name)

COSObject getCosObject()

String getGlyphName(int codePoint)

String getName()

int getUnicode(int byteCode)

int getValidByteCode(int unicode)

int getValidByteCode(String name)

Fields
UNIQUE
public static de.intarsys.pdf.encoding.SymbolEncoding UNIQUE

Constructors

Page 514 of 1521


de.intarsys.pdf.encoding.SymbolEncoding

(continued from last page)

SymbolEncoding
public SymbolEncoding()

Methods
getByteCode
public int getByteCode(String name)

Get the code point where the character referenced by the Adobe glyph name name is mapped in this font encoding or -1 if
not valid.

name must be a valid Adobe glyph name. The code point is a value from 0...255. If the glyph is not found, -1 is returned.

getByteCode
public int getByteCode(int unicode)

Get the byte code point where the character referenced by the Unicode code point unicode is mapped in this font
encoding or -1 if invalid.

unicode must be a valid Unicode code point. The returned code point is a value from 0...255. If the Unicode code point is
not valid or not mapped, -1 is returned.

getCosObject
public COSObject getCosObject()

Get an object that can be used as a representation of the receiver encoding within doc.

getGlyphName
public String getGlyphName(int codePoint)

Get the character name for a given encoded byte code point. If no mapping is defined, return ".notdef".

getName
public String getName()

getUnicode
public int getUnicode(int byteCode)

Get the Unicode code point for the encoded code Point byteCode or -1 if not available.

getValidByteCode
public int getValidByteCode(String name)

Page 515 of 1521


de.intarsys.pdf.encoding.SymbolEncoding

(continued from last page)

Get the code point where the character referenced by the Adobe glyph name name is mapped in this font encoding or a
valid replacement.

name must be a valid Adobe glyph name. The code point is a value from 0...255. If the glyph is not found, a valif
replacement code point is returned instead (for example the space character).

getValidByteCode
public int getValidByteCode(int unicode)

Get the byte code point where the character referenced by the Unicode code point unicode is mapped in this font
encoding or a valid replacement code point if invalid.

unicode must be a valid Unicode code point. The returned code point is a value from 0...255. If the Unicode code point is
not valid or not mapped, a valid code point is returned is returned (for example the space character).

Page 516 of 1521


de.intarsys.pdf.encoding.WinAnsiEncoding

de.intarsys.pdf.encoding
Class WinAnsiEncoding
java.lang.Object
|
+-de.intarsys.pdf.encoding.Encoding
|
+-de.intarsys.pdf.encoding.MappedEncoding
|
+-de.intarsys.pdf.encoding.WinAnsiEncoding

public class WinAnsiEncoding


extends MappedEncoding

Implementation of WinAnsiEncoding

Field Summary
public static final UNIQUE

Constructor Summary
public WinAnsiEncoding()

Method Summary
COSObject getCosObject()

String getName()

Fields
UNIQUE
public static final de.intarsys.pdf.encoding.WinAnsiEncoding UNIQUE

Constructors
WinAnsiEncoding
public WinAnsiEncoding()

Methods

Page 517 of 1521


de.intarsys.pdf.encoding.WinAnsiEncoding

(continued from last page)

getCosObject
public COSObject getCosObject()

Get an object that can be used as a representation of the receiver encoding within doc.

getName
public String getName()

Page 518 of 1521


Package
de.intarsys.pdf.fd
A basic implementation of the FDF part of the PDF spec. This is not used very much, so quite incomplete to the moment.

Page 519 of 1521


de.intarsys.pdf.fd.FDDocument

de.intarsys.pdf.fd
Class FDDocument
java.lang.Object
|
+-de.intarsys.pdf.fd.FDDocument

public class FDDocument


extends Object

Method Summary
COSDocument cosGetDoc()
get the COS level implementation of the document

static FDDocument createFromCOS(COSDocument doc)


create a fd document based on a cos level object

static FDDocument createNew()


create a FDDoc from scratch

COSCatalog getCatalog()
lookup the catalog dictionary in a document

FDFDF getFdf()

ILocator getLocator()

void save()

void save(ILocator locator)

void save(ILocator locator, java.util.Map options)

Methods
createFromCOS
public static FDDocument createFromCOS(COSDocument doc)

create a fd document based on a cos level object

Parameters:
doc - COSDocument to base this FDDoc on

Returns:
A new FDDoc object.

Page 520 of 1521


de.intarsys.pdf.fd.FDDocument

(continued from last page)

createNew
public static FDDocument createNew()

create a FDDoc from scratch

Returns:
A new FDDoc.

getCatalog
public COSCatalog getCatalog()

lookup the catalog dictionary in a document

Returns:
the document catalog object

cosGetDoc
public COSDocument cosGetDoc()

get the COS level implementation of the document

Returns:
the underlying COSDocument

getFdf
public FDFDF getFdf()

save
public void save()
throws java.io.IOException

getLocator
public ILocator getLocator()

save
public void save(ILocator locator,
java.util.Map options)
throws java.io.IOException

save
public void save(ILocator locator)
throws java.io.IOException

Page 521 of 1521


de.intarsys.pdf.fd.FDDocument

(continued from last page)

Page 522 of 1521


de.intarsys.pdf.fd.FDFDF

de.intarsys.pdf.fd
Class FDFDF
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.fd.FDObject
|
+-de.intarsys.pdf.fd.FDFDF
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class FDFDF


extends FDObject

Nested Class Summary


class FDFDF.MetaClass
FDFDF.MetaClass

Field Summary
public static final DK_Annots

public static final DK_Differences

public static final DK_EmbeddedFDFs

public static final DK_Encoding

public static final DK_F

public static final DK_Fields

public static final DK_ID

public static final DK_JavaScript

public static final DK_Pages

public static final DK_Status

public static final DK_Target

public static final META


The meta class instance

Page 523 of 1521


de.intarsys.pdf.fd.FDFDF

Method Summary
void addField(FDField field)

void cosAddField(COSDictionary field)

java.util.List getFields()

String getFile()

void setFields(java.util.List fields)

void setFile(String file)

Fields
DK_F
public static final de.intarsys.pdf.cos.COSName DK_F

DK_ID
public static final de.intarsys.pdf.cos.COSName DK_ID

DK_Fields
public static final de.intarsys.pdf.cos.COSName DK_Fields

DK_Status
public static final de.intarsys.pdf.cos.COSName DK_Status

DK_Pages
public static final de.intarsys.pdf.cos.COSName DK_Pages

DK_Encoding
public static final de.intarsys.pdf.cos.COSName DK_Encoding

Page 524 of 1521


de.intarsys.pdf.fd.FDFDF

(continued from last page)

DK_Annots
public static final de.intarsys.pdf.cos.COSName DK_Annots

DK_Differences
public static final de.intarsys.pdf.cos.COSName DK_Differences

DK_Target
public static final de.intarsys.pdf.cos.COSName DK_Target

DK_EmbeddedFDFs
public static final de.intarsys.pdf.cos.COSName DK_EmbeddedFDFs

DK_JavaScript
public static final de.intarsys.pdf.cos.COSName DK_JavaScript

META
public static final de.intarsys.pdf.fd.FDFDF.MetaClass META

The meta class instance

Methods
getFields
public java.util.List getFields()

setFields
public void setFields(java.util.List fields)

addField
public void addField(FDField field)

Page 525 of 1521


de.intarsys.pdf.fd.FDFDF

(continued from last page)

cosAddField
public void cosAddField(COSDictionary field)

getFile
public String getFile()

setFile
public void setFile(String file)

Page 526 of 1521


de.intarsys.pdf.fd.FDFDF.MetaClass

de.intarsys.pdf.fd
Class FDFDF.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAcroFormNode.MetaClass
|
+-de.intarsys.pdf.fd.FDFDF.MetaClass

public static class FDFDF.MetaClass


extends PDAcroFormNode.MetaClass

The meta class implementation

Page 527 of 1521


de.intarsys.pdf.fd.FDField

de.intarsys.pdf.fd
Class FDField
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.fd.FDObject
|
+-de.intarsys.pdf.fd.FDField
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class FDField


extends FDObject

Nested Class Summary


class FDField.MetaClass
FDField.MetaClass

Field Summary
public static final DK_A

public static final DK_AA

public static final DK_AP

public static final DK_APRef

public static final DK_ClrF

public static final DK_ClrFf

public static final DK_F

public static final DK_Ff

public static final DK_IF

public static final DK_Kids

public static final DK_Opt

public static final DK_RV

public static final DK_SetF

Page 528 of 1521


de.intarsys.pdf.fd.FDField

public static final DK_SetFf

public static final DK_T

public static final DK_V

public static final META


The meta class instance

Method Summary
void addField(FDField field)

void cosAddKid(COSDictionary field)

COSObject cosGetValue()

void cosSetValue(COSObject value)

java.util.List getKids()

String getLocalName()

void setFields(java.util.List fields)

void setLocalName(String name)

Fields
DK_Kids
public static final de.intarsys.pdf.cos.COSName DK_Kids

DK_T
public static final de.intarsys.pdf.cos.COSName DK_T

DK_V
public static final de.intarsys.pdf.cos.COSName DK_V

DK_Ff
public static final de.intarsys.pdf.cos.COSName DK_Ff

Page 529 of 1521


de.intarsys.pdf.fd.FDField

(continued from last page)

DK_SetFf
public static final de.intarsys.pdf.cos.COSName DK_SetFf

DK_ClrFf
public static final de.intarsys.pdf.cos.COSName DK_ClrFf

DK_F
public static final de.intarsys.pdf.cos.COSName DK_F

DK_SetF
public static final de.intarsys.pdf.cos.COSName DK_SetF

DK_ClrF
public static final de.intarsys.pdf.cos.COSName DK_ClrF

DK_AP
public static final de.intarsys.pdf.cos.COSName DK_AP

DK_APRef
public static final de.intarsys.pdf.cos.COSName DK_APRef

DK_IF
public static final de.intarsys.pdf.cos.COSName DK_IF

DK_Opt
public static final de.intarsys.pdf.cos.COSName DK_Opt

Page 530 of 1521


de.intarsys.pdf.fd.FDField

(continued from last page)

DK_A
public static final de.intarsys.pdf.cos.COSName DK_A

DK_AA
public static final de.intarsys.pdf.cos.COSName DK_AA

DK_RV
public static final de.intarsys.pdf.cos.COSName DK_RV

META
public static final de.intarsys.pdf.fd.FDField.MetaClass META

The meta class instance

Methods
getKids
public java.util.List getKids()

setFields
public void setFields(java.util.List fields)

addField
public void addField(FDField field)

cosAddKid
public void cosAddKid(COSDictionary field)

cosGetValue
public COSObject cosGetValue()

Page 531 of 1521


de.intarsys.pdf.fd.FDField

(continued from last page)

cosSetValue
public void cosSetValue(COSObject value)

getLocalName
public String getLocalName()

setLocalName
public void setLocalName(String name)

Page 532 of 1521


de.intarsys.pdf.fd.FDField.MetaClass

de.intarsys.pdf.fd
Class FDField.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAcroFormNode.MetaClass
|
+-de.intarsys.pdf.fd.FDField.MetaClass

public static class FDField.MetaClass


extends PDAcroFormNode.MetaClass

The meta class implementation

Page 533 of 1521


de.intarsys.pdf.fd.FDObject

de.intarsys.pdf.fd
Class FDObject
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.fd.FDObject
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


FDFDF, FDField

public abstract class FDObject


extends COSBasedObject

This is the abstract superclass for all complex FD level objects.

Nested Class Summary


class FDObject.MetaClass
FDObject.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
String toString()

Fields
META
public static final de.intarsys.pdf.fd.FDObject.MetaClass META

The meta class instance

Methods
toString
public String toString()

Page 534 of 1521


de.intarsys.pdf.fd.FDObject.MetaClass

de.intarsys.pdf.fd
Class FDObject.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.fd.FDObject.MetaClass

public static class FDObject.MetaClass


extends COSBasedObject.MetaClass

The meta class implementation

Page 535 of 1521


Package
de.intarsys.pdf.filter
The filter relevant parts of the PDF spec.

Page 536 of 1521


de.intarsys.pdf.filter.ASCII85Filter

de.intarsys.pdf.filter
Class ASCII85Filter
java.lang.Object
|
+-de.intarsys.pdf.filter.Filter
|
+-de.intarsys.pdf.filter.StreamBasedFilter
|
+-de.intarsys.pdf.filter.ASCII85Filter
All Implemented Interfaces:
IFilter

public class ASCII85Filter


extends StreamBasedFilter

Constructor Summary
public ASCII85Filter(COSDictionary options)

Constructors
ASCII85Filter
public ASCII85Filter(COSDictionary options)

Page 537 of 1521


de.intarsys.pdf.filter.ASCII85InputStream

de.intarsys.pdf.filter
Class ASCII85InputStream
java.lang.Object
|
+-java.io.InputStream
|
+-java.io.FilterInputStream
|
+-de.intarsys.pdf.filter.ASCII85InputStream
All Implemented Interfaces:
java.io.Closeable

public class ASCII85InputStream


extends java.io.FilterInputStream

Input stream to decode binary data encoded in ASCII representable byte codes. The algorithm maps four bytes of data to five
ASCII printing characters (and vice versa).

The exact specification can be found in [PDF] chapter 3.3.2.

Constructor Summary
public ASCII85InputStream(java.io.InputStream is)
Constructor

Method Summary
int available()

void close()

boolean markSupported()

int read()

int read(byte[] data, int offset, int len)

void reset()

long skip(long bytes)

Constructors
ASCII85InputStream
public ASCII85InputStream(java.io.InputStream is)

Constructor

Page 538 of 1521


de.intarsys.pdf.filter.ASCII85InputStream

(continued from last page)

Parameters:
is - The input stream to actually read from.

Methods
read
public final int read()
throws java.io.IOException

read
public final int read(byte[] data,
int offset,
int len)
throws java.io.IOException

available
public int available()
throws java.io.IOException

close
public void close()
throws java.io.IOException

markSupported
public boolean markSupported()

reset
public void reset()
throws java.io.IOException

skip
public long skip(long bytes)
throws java.io.IOException

Page 539 of 1521


de.intarsys.pdf.filter.ASCII85OutputStream

de.intarsys.pdf.filter
Class ASCII85OutputStream
java.lang.Object
|
+-java.io.OutputStream
|
+-java.io.FilterOutputStream
|
+-de.intarsys.pdf.filter.ASCII85OutputStream
All Implemented Interfaces:
java.io.Flushable, java.io.Closeable

public class ASCII85OutputStream


extends java.io.FilterOutputStream

Output stream to encode binary data with ASCII representable byte codes. The algorithm produces five ASCII printing characters
from four bytes of binary data.

The exact specification can be found in [PDF] chapter 3.3.2.

Constructor Summary
public ASCII85OutputStream(java.io.OutputStream out)
Constructor.

Method Summary
void close()

void flush()

int getLineLength()
This will get the length of the line.

void setLineLength(int l)
Set the line length.

void write(byte[] b, int off, int sz)

void write(int b)

Constructors
ASCII85OutputStream
public ASCII85OutputStream(java.io.OutputStream out)

Constructor.

Parameters:

Page 540 of 1521


de.intarsys.pdf.filter.ASCII85OutputStream

(continued from last page)

out - The output stream to write to.

Methods
setLineLength
public void setLineLength(int l)

Set the line length.

Parameters:
l - The line length.

getLineLength
public int getLineLength()

This will get the length of the line.

Returns:
The line length attribute.

flush
public final void flush()
throws java.io.IOException

write
public void write(int b)
throws java.io.IOException

write
public final void write(byte[] b,
int off,
int sz)
throws java.io.IOException

close
public void close()
throws java.io.IOException

Page 541 of 1521


de.intarsys.pdf.filter.ASCIIHexFilter

de.intarsys.pdf.filter
Class ASCIIHexFilter
java.lang.Object
|
+-de.intarsys.pdf.filter.Filter
|
+-de.intarsys.pdf.filter.StreamBasedFilter
|
+-de.intarsys.pdf.filter.ASCIIHexFilter
All Implemented Interfaces:
IFilter

public class ASCIIHexFilter


extends StreamBasedFilter

Constructor Summary
public ASCIIHexFilter(COSDictionary options)

Constructors
ASCIIHexFilter
public ASCIIHexFilter(COSDictionary options)

Page 542 of 1521


de.intarsys.pdf.filter.ASCIIHexInputStream

de.intarsys.pdf.filter
Class ASCIIHexInputStream
java.lang.Object
|
+-java.io.InputStream
|
+-java.io.FilterInputStream
|
+-de.intarsys.pdf.filter.ASCIIHexInputStream
All Implemented Interfaces:
java.io.Closeable

public class ASCIIHexInputStream


extends java.io.FilterInputStream

Input stream to decode binary data encoded in ascii representable byte codes. The algorithm produces one byte of data from two
ascii hex characters

Constructor Summary
public ASCIIHexInputStream(java.io.InputStream in)

Method Summary
int available()

static boolean isWhitespace(int i)

boolean markSupported()

int read()

int read(byte[] b, int off, int len)

void reset()

long skip(long n)

Constructors
ASCIIHexInputStream
public ASCIIHexInputStream(java.io.InputStream in)

Methods

Page 543 of 1521


de.intarsys.pdf.filter.ASCIIHexInputStream

(continued from last page)

isWhitespace
public static boolean isWhitespace(int i)

available
public int available()
throws java.io.IOException

markSupported
public boolean markSupported()

read
public int read()
throws java.io.IOException

read
public int read(byte[] b,
int off,
int len)
throws java.io.IOException

reset
public void reset()
throws java.io.IOException

skip
public long skip(long n)
throws java.io.IOException

Page 544 of 1521


de.intarsys.pdf.filter.ASCIIHexOutputStream

de.intarsys.pdf.filter
Class ASCIIHexOutputStream
java.lang.Object
|
+-java.io.OutputStream
|
+-java.io.FilterOutputStream
|
+-de.intarsys.pdf.filter.ASCIIHexOutputStream
All Implemented Interfaces:
java.io.Flushable, java.io.Closeable

public class ASCIIHexOutputStream


extends java.io.FilterOutputStream

Output stream to encode binary data with ascii representable byte codes. The algorithm produces the hex representation of the data.

Constructor Summary
public ASCIIHexOutputStream(java.io.OutputStream out)
Constructor for ASCIIHexOutputStream.

Method Summary
void close()

void write(int b)

Constructors
ASCIIHexOutputStream
public ASCIIHexOutputStream(java.io.OutputStream out)

Constructor for ASCIIHexOutputStream.

Parameters:
out

Methods
close
public void close()
throws java.io.IOException

See Also:
OutputStream.close()

Page 545 of 1521


de.intarsys.pdf.filter.ASCIIHexOutputStream

write
public void write(int b)
throws java.io.IOException

See Also:
OutputStream.write(int)

Page 546 of 1521


de.intarsys.pdf.filter.CCITTFaxFilter

de.intarsys.pdf.filter
Class CCITTFaxFilter
java.lang.Object
|
+-de.intarsys.pdf.filter.Filter
|
+-de.intarsys.pdf.filter.CCITTFaxFilter
All Implemented Interfaces:
IFilter

public class CCITTFaxFilter


extends Filter

Field Summary
public static final DK_BlackIs1

public static final DK_Columns

public static final DK_DamagedRowsBeforeError

public static final DK_EncodedByteAlign

public static final DK_EndOfBlock

public static final DK_EndOfLine

public static final DK_H

public static final DK_Height

public static final DK_K

public static final DK_Rows

public static final DK_W

public static final DK_Width

Constructor Summary
public CCITTFaxFilter(COSDictionary options)

Fields

Page 547 of 1521


de.intarsys.pdf.filter.CCITTFaxFilter

(continued from last page)

DK_BlackIs1
public static final de.intarsys.pdf.cos.COSName DK_BlackIs1

DK_Columns
public static final de.intarsys.pdf.cos.COSName DK_Columns

DK_DamagedRowsBeforeError
public static final de.intarsys.pdf.cos.COSName DK_DamagedRowsBeforeError

DK_EncodedByteAlign
public static final de.intarsys.pdf.cos.COSName DK_EncodedByteAlign

DK_EndOfBlock
public static final de.intarsys.pdf.cos.COSName DK_EndOfBlock

DK_EndOfLine
public static final de.intarsys.pdf.cos.COSName DK_EndOfLine

DK_H
public static final de.intarsys.pdf.cos.COSName DK_H

DK_Height
public static final de.intarsys.pdf.cos.COSName DK_Height

DK_K
public static final de.intarsys.pdf.cos.COSName DK_K

DK_Rows
public static final de.intarsys.pdf.cos.COSName DK_Rows

Page 548 of 1521


de.intarsys.pdf.filter.CCITTFaxFilter

(continued from last page)

DK_W
public static final de.intarsys.pdf.cos.COSName DK_W

DK_Width
public static final de.intarsys.pdf.cos.COSName DK_Width

Constructors
CCITTFaxFilter
public CCITTFaxFilter(COSDictionary options)

Page 549 of 1521


de.intarsys.pdf.filter.CryptFilter

de.intarsys.pdf.filter
Class CryptFilter
java.lang.Object
|
+-de.intarsys.pdf.filter.Filter
|
+-de.intarsys.pdf.filter.CryptFilter
All Implemented Interfaces:
IFilter

public class CryptFilter


extends Filter

Constructor Summary
public CryptFilter(COSDictionary options)

Constructors
CryptFilter
public CryptFilter(COSDictionary options)

Page 550 of 1521


de.intarsys.pdf.filter.DCTFilter

de.intarsys.pdf.filter
Class DCTFilter
java.lang.Object
|
+-de.intarsys.pdf.filter.Filter
|
+-de.intarsys.pdf.filter.DCTFilter
All Implemented Interfaces:
IFilter

public class DCTFilter


extends Filter

Constructor Summary
public DCTFilter(COSDictionary options)

Constructors
DCTFilter
public DCTFilter(COSDictionary options)

Page 551 of 1521


de.intarsys.pdf.filter.Filter

de.intarsys.pdf.filter
Class Filter
java.lang.Object
|
+-de.intarsys.pdf.filter.Filter
All Implemented Interfaces:
IFilter

Direct Known Subclasses:


CCITTFaxFilter, CryptFilter, DCTFilter, JBIG2Filter, JPXFilter, LZWFilter, StreamBasedFilter

public abstract class Filter


extends Object
implements IFilter

The abstract superclass for the implementation of IFilter.

Field Summary
public static final CN_Filter_A85

public static final CN_Filter_AHx

public static final CN_Filter_ASCII85Decode

public static final CN_Filter_ASCIIHexDecode

public static final CN_Filter_CCF

public static final CN_Filter_CCITTFaxDecode

public static final CN_Filter_Crypt

public static final CN_Filter_DCT

public static final CN_Filter_DCTDecode

public static final CN_Filter_Fl

public static final CN_Filter_FlateDecode

public static final CN_Filter_JBIG2Decode

public static final CN_Filter_JPXDecode

public static final CN_Filter_LZW

Page 552 of 1521


de.intarsys.pdf.filter.Filter

public static final CN_Filter_LZWDecode

public static final CN_Filter_RL

public static final CN_Filter_RunLengthDecode

Constructor Summary
public Filter(COSDictionary paramOptions)

Method Summary
byte[] decode(byte[] source, int offset, int length)

byte[] encode(byte[] source, int offset, int length)

boolean getOptionFieldBoolean(COSName name, boolean defaultValue)

int getOptionFieldInt(COSName name, int defaultValue)

COSDictionary getOptions()

COSStream getStream()

void setStream(COSStream stream)

Fields
CN_Filter_A85
public static final de.intarsys.pdf.cos.COSName CN_Filter_A85

CN_Filter_AHx
public static final de.intarsys.pdf.cos.COSName CN_Filter_AHx

CN_Filter_ASCII85Decode
public static final de.intarsys.pdf.cos.COSName CN_Filter_ASCII85Decode

CN_Filter_ASCIIHexDecode
public static final de.intarsys.pdf.cos.COSName CN_Filter_ASCIIHexDecode

Page 553 of 1521


de.intarsys.pdf.filter.Filter

(continued from last page)

CN_Filter_CCF
public static final de.intarsys.pdf.cos.COSName CN_Filter_CCF

CN_Filter_CCITTFaxDecode
public static final de.intarsys.pdf.cos.COSName CN_Filter_CCITTFaxDecode

CN_Filter_Crypt
public static final de.intarsys.pdf.cos.COSName CN_Filter_Crypt

CN_Filter_DCT
public static final de.intarsys.pdf.cos.COSName CN_Filter_DCT

CN_Filter_DCTDecode
public static final de.intarsys.pdf.cos.COSName CN_Filter_DCTDecode

CN_Filter_Fl
public static final de.intarsys.pdf.cos.COSName CN_Filter_Fl

CN_Filter_FlateDecode
public static final de.intarsys.pdf.cos.COSName CN_Filter_FlateDecode

CN_Filter_JBIG2Decode
public static final de.intarsys.pdf.cos.COSName CN_Filter_JBIG2Decode

CN_Filter_JPXDecode
public static final de.intarsys.pdf.cos.COSName CN_Filter_JPXDecode

Page 554 of 1521


de.intarsys.pdf.filter.Filter

(continued from last page)

CN_Filter_LZW
public static final de.intarsys.pdf.cos.COSName CN_Filter_LZW

CN_Filter_LZWDecode
public static final de.intarsys.pdf.cos.COSName CN_Filter_LZWDecode

CN_Filter_RL
public static final de.intarsys.pdf.cos.COSName CN_Filter_RL

CN_Filter_RunLengthDecode
public static final de.intarsys.pdf.cos.COSName CN_Filter_RunLengthDecode

Constructors
Filter
public Filter(COSDictionary paramOptions)

Methods
decode
public byte[] decode(byte[] source,
int offset,
int length)
throws java.io.IOException

encode
public byte[] encode(byte[] source,
int offset,
int length)
throws java.io.IOException

getOptionFieldBoolean
public boolean getOptionFieldBoolean(COSName name,
boolean defaultValue)

Page 555 of 1521


de.intarsys.pdf.filter.Filter

getOptionFieldInt
public int getOptionFieldInt(COSName name,
int defaultValue)

Parameters:
name
defaultValue

Returns:
the integer value of the entry named #name or the specified default value if not present

getOptions
public COSDictionary getOptions()

getStream
public COSStream getStream()

setStream
public void setStream(COSStream stream)

Page 556 of 1521


de.intarsys.pdf.filter.FilterFactory

de.intarsys.pdf.filter
Class FilterFactory
java.lang.Object
|
+-de.intarsys.pdf.filter.FilterFactory

public class FilterFactory


extends Object

The VM singleton for accessing the IFilterFactory.

Constructor Summary
public FilterFactory()

Method Summary
static IFilterFactory get()

static void set(IFilterFactory factory)

Constructors
FilterFactory
public FilterFactory()

Methods
get
public static IFilterFactory get()

set
public static void set(IFilterFactory factory)

Page 557 of 1521


de.intarsys.pdf.filter.FlateFilter

de.intarsys.pdf.filter
Class FlateFilter
java.lang.Object
|
+-de.intarsys.pdf.filter.Filter
|
+-de.intarsys.pdf.filter.StreamBasedFilter
|
+-de.intarsys.pdf.filter.FlateFilter
All Implemented Interfaces:
IFilter

public class FlateFilter


extends StreamBasedFilter

Constructor Summary
public FlateFilter(COSDictionary options)

Constructors
FlateFilter
public FlateFilter(COSDictionary options)

Page 558 of 1521


de.intarsys.pdf.filter.IFilter

de.intarsys.pdf.filter
Interface IFilter
All Known Implementing Classes:
Filter

public interface IFilter


extends

Method Summary
byte[] decode(byte[] source, int offset, int length)

byte[] encode(byte[] source, int offset, int length)

COSStream getStream()

void setStream(COSStream stream)

Methods
encode
public byte[] encode(byte[] source,
int offset,
int length)
throws java.io.IOException

decode
public byte[] decode(byte[] source,
int offset,
int length)
throws java.io.IOException

setStream
public void setStream(COSStream stream)

getStream
public COSStream getStream()

Page 559 of 1521


de.intarsys.pdf.filter.IFilterFactory

de.intarsys.pdf.filter
Interface IFilterFactory
All Known Implementing Classes:
StandardFilterFactory

public interface IFilterFactory


extends

A factory for IFilter objects. An IFilter is an algorithm that is referenced by name in a COSStream.

Method Summary
IFilter createFilter(COSName filterName, COSDictionary options)
Create an implementation for the filter implementing the algorithm denoted by
filterName using the optional options in options.

Methods
createFilter
public IFilter createFilter(COSName filterName,
COSDictionary options)
throws java.io.IOException

Create an implementation for the filter implementing the algorithm denoted by filterName using the optional options in
options.

Parameters:
filterName
options

Returns:
The filter implementation.

Throws:
IOException

Page 560 of 1521


de.intarsys.pdf.filter.IPrediction

de.intarsys.pdf.filter
Interface IPrediction
All Known Implementing Classes:
Prediction

public interface IPrediction


extends

Method Summary
byte[] decode(byte[] source)

Methods
decode
public byte[] decode(byte[] source)
throws java.io.IOException

Page 561 of 1521


de.intarsys.pdf.filter.IPredictionFactory

de.intarsys.pdf.filter
Interface IPredictionFactory
All Known Implementing Classes:
StandardPredictionFactory

public interface IPredictionFactory


extends

A factory for IPrediction objects.

Method Summary
IPrediction createPrediction(COSDictionary options)

Methods
createPrediction
public IPrediction createPrediction(COSDictionary options)
throws java.io.IOException

Page 562 of 1521


de.intarsys.pdf.filter.JBIG2Filter

de.intarsys.pdf.filter
Class JBIG2Filter
java.lang.Object
|
+-de.intarsys.pdf.filter.Filter
|
+-de.intarsys.pdf.filter.JBIG2Filter
All Implemented Interfaces:
IFilter

public class JBIG2Filter


extends Filter

Constructor Summary
public JBIG2Filter(COSDictionary options)

Constructors
JBIG2Filter
public JBIG2Filter(COSDictionary options)

Page 563 of 1521


de.intarsys.pdf.filter.JPXFilter

de.intarsys.pdf.filter
Class JPXFilter
java.lang.Object
|
+-de.intarsys.pdf.filter.Filter
|
+-de.intarsys.pdf.filter.JPXFilter
All Implemented Interfaces:
IFilter

public class JPXFilter


extends Filter

Constructor Summary
public JPXFilter(COSDictionary options)

Constructors
JPXFilter
public JPXFilter(COSDictionary options)

Page 564 of 1521


de.intarsys.pdf.filter.LZWDecoder

de.intarsys.pdf.filter
Class LZWDecoder
java.lang.Object
|
+-de.intarsys.pdf.filter.LZWDecoder

public class LZWDecoder


extends Object

A class for performing LZW decoding.

Constructor Summary
public LZWDecoder()

Method Summary
void addStringToTable(byte[] string)
Add a new string to the string table.

void addStringToTable(byte[] oldString, byte newString)


Add a new string to the string table.

byte[] composeString(byte[] oldString, byte newString)


Append newString to the end of oldString.

byte[] decode(byte[] data)


Method to decode LZW compressed data.

int getNextCode(byte[] data)

void initializeStringTable()
Initialize the string table.

Constructors
LZWDecoder
public LZWDecoder()

Methods
getNextCode
public int getNextCode(byte[] data)

Page 565 of 1521


de.intarsys.pdf.filter.LZWDecoder

(continued from last page)

addStringToTable
public void addStringToTable(byte[] oldString,
byte newString)

Add a new string to the string table.

Parameters:
oldString
newString

addStringToTable
public void addStringToTable(byte[] string)

Add a new string to the string table.

Parameters:
string

composeString
public byte[] composeString(byte[] oldString,
byte newString)

Append newString to the end of oldString.

Parameters:
oldString
newString

decode
public byte[] decode(byte[] data)
throws java.io.IOException

Method to decode LZW compressed data.

Parameters:
data - The compressed data.

Throws:
IOException

initializeStringTable
public void initializeStringTable()

Initialize the string table.

Page 566 of 1521


de.intarsys.pdf.filter.LZWFilter

de.intarsys.pdf.filter
Class LZWFilter
java.lang.Object
|
+-de.intarsys.pdf.filter.Filter
|
+-de.intarsys.pdf.filter.LZWFilter
All Implemented Interfaces:
IFilter

public class LZWFilter


extends Filter

Constructor Summary
public LZWFilter(COSDictionary options)

Constructors
LZWFilter
public LZWFilter(COSDictionary options)

Page 567 of 1521


de.intarsys.pdf.filter.NoPrediction

de.intarsys.pdf.filter
Class NoPrediction
java.lang.Object
|
+-de.intarsys.pdf.filter.Prediction
|
+-de.intarsys.pdf.filter.NoPrediction
All Implemented Interfaces:
IPrediction

public class NoPrediction


extends Prediction

Constructor Summary
public NoPrediction(COSDictionary options)

Method Summary
byte[] decode(byte[] source)

int getRowSize()

Constructors
NoPrediction
public NoPrediction(COSDictionary options)

Methods
decode
public byte[] decode(byte[] source)

getRowSize
public int getRowSize()

Page 568 of 1521


de.intarsys.pdf.filter.PDFDeflaterOutputStream

de.intarsys.pdf.filter
Class PDFDeflaterOutputStream
java.lang.Object
|
+-java.io.OutputStream
|
+-java.io.FilterOutputStream
|
+-java.util.zip.DeflaterOutputStream
|
+-de.intarsys.pdf.filter.PDFDeflaterOutputStream
All Implemented Interfaces:
java.io.Flushable, java.io.Closeable

public class PDFDeflaterOutputStream


extends java.util.zip.DeflaterOutputStream

Constructor Summary
public PDFDeflaterOutputStream(java.io.OutputStream out,
java.util.zip.Deflater def)

public PDFDeflaterOutputStream(java.io.OutputStream out,


java.util.zip.Deflater def, int size)

Method Summary
void close()

Constructors
PDFDeflaterOutputStream
public PDFDeflaterOutputStream(java.io.OutputStream out,
java.util.zip.Deflater def)

Parameters:
out
def

PDFDeflaterOutputStream
public PDFDeflaterOutputStream(java.io.OutputStream out,
java.util.zip.Deflater def,
int size)

Parameters:

Page 569 of 1521


de.intarsys.pdf.filter.PDFDeflaterOutputStream

(continued from last page)


out
def
size

Methods
close
public void close()
throws java.io.IOException

Page 570 of 1521


de.intarsys.pdf.filter.PNGAveragePrediction

de.intarsys.pdf.filter
Class PNGAveragePrediction
java.lang.Object
|
+-de.intarsys.pdf.filter.Prediction
|
+-de.intarsys.pdf.filter.PNGPrediction
|
+-de.intarsys.pdf.filter.PNGAveragePrediction
All Implemented Interfaces:
IPrediction

public class PNGAveragePrediction


extends PNGPrediction

Constructor Summary
public PNGAveragePrediction(COSDictionary options)

Constructors
PNGAveragePrediction
public PNGAveragePrediction(COSDictionary options)

Page 571 of 1521


de.intarsys.pdf.filter.PNGNonePrediction

de.intarsys.pdf.filter
Class PNGNonePrediction
java.lang.Object
|
+-de.intarsys.pdf.filter.Prediction
|
+-de.intarsys.pdf.filter.PNGPrediction
|
+-de.intarsys.pdf.filter.PNGNonePrediction
All Implemented Interfaces:
IPrediction

public class PNGNonePrediction


extends PNGPrediction

Constructor Summary
public PNGNonePrediction(COSDictionary options)

Constructors
PNGNonePrediction
public PNGNonePrediction(COSDictionary options)

Page 572 of 1521


de.intarsys.pdf.filter.PNGOptimumPrediction

de.intarsys.pdf.filter
Class PNGOptimumPrediction
java.lang.Object
|
+-de.intarsys.pdf.filter.Prediction
|
+-de.intarsys.pdf.filter.PNGPrediction
|
+-de.intarsys.pdf.filter.PNGOptimumPrediction
All Implemented Interfaces:
IPrediction

public class PNGOptimumPrediction


extends PNGPrediction

Constructor Summary
public PNGOptimumPrediction(COSDictionary options)

Method Summary
void decodeRow(byte[] source, int sourceOffset, byte[] result, int
resultOffset)

Constructors
PNGOptimumPrediction
public PNGOptimumPrediction(COSDictionary options)

Methods
decodeRow
public void decodeRow(byte[] source,
int sourceOffset,
byte[] result,
int resultOffset)
throws java.io.IOException

Page 573 of 1521


de.intarsys.pdf.filter.PNGPaethPrediction

de.intarsys.pdf.filter
Class PNGPaethPrediction
java.lang.Object
|
+-de.intarsys.pdf.filter.Prediction
|
+-de.intarsys.pdf.filter.PNGPrediction
|
+-de.intarsys.pdf.filter.PNGPaethPrediction
All Implemented Interfaces:
IPrediction

public class PNGPaethPrediction


extends PNGPrediction

Constructor Summary
public PNGPaethPrediction(COSDictionary options)

Method Summary
void decodeRow(byte[] source, int sourceOffset, byte[] result, int
resultOffset)

Constructors
PNGPaethPrediction
public PNGPaethPrediction(COSDictionary options)

Methods
decodeRow
public void decodeRow(byte[] source,
int sourceOffset,
byte[] result,
int resultOffset)

Page 574 of 1521


de.intarsys.pdf.filter.PNGPrediction

de.intarsys.pdf.filter
Class PNGPrediction
java.lang.Object
|
+-de.intarsys.pdf.filter.Prediction
|
+-de.intarsys.pdf.filter.PNGPrediction
All Implemented Interfaces:
IPrediction

Direct Known Subclasses:


PNGAveragePrediction, PNGNonePrediction, PNGOptimumPrediction, PNGPaethPrediction, PNGSubPrediction,
PNGUpPrediction

public abstract class PNGPrediction


extends Prediction

Constructor Summary
public PNGPrediction(COSDictionary options)

Method Summary
int computeSourceRowSize()

Constructors
PNGPrediction
public PNGPrediction(COSDictionary options)

Methods
computeSourceRowSize
public int computeSourceRowSize()

Page 575 of 1521


de.intarsys.pdf.filter.PNGSubPrediction

de.intarsys.pdf.filter
Class PNGSubPrediction
java.lang.Object
|
+-de.intarsys.pdf.filter.Prediction
|
+-de.intarsys.pdf.filter.PNGPrediction
|
+-de.intarsys.pdf.filter.PNGSubPrediction
All Implemented Interfaces:
IPrediction

public class PNGSubPrediction


extends PNGPrediction

Constructor Summary
public PNGSubPrediction(COSDictionary options)

Constructors
PNGSubPrediction
public PNGSubPrediction(COSDictionary options)

Page 576 of 1521


de.intarsys.pdf.filter.PNGUpPrediction

de.intarsys.pdf.filter
Class PNGUpPrediction
java.lang.Object
|
+-de.intarsys.pdf.filter.Prediction
|
+-de.intarsys.pdf.filter.PNGPrediction
|
+-de.intarsys.pdf.filter.PNGUpPrediction
All Implemented Interfaces:
IPrediction

public class PNGUpPrediction


extends PNGPrediction

Constructor Summary
public PNGUpPrediction(COSDictionary options)

Method Summary
void decodeRow(byte[] source, int sourceOffset, byte[] result, int
resultOffset)

Constructors
PNGUpPrediction
public PNGUpPrediction(COSDictionary options)

Methods
decodeRow
public void decodeRow(byte[] source,
int sourceOffset,
byte[] result,
int resultOffset)

Page 577 of 1521


de.intarsys.pdf.filter.Prediction

de.intarsys.pdf.filter
Class Prediction
java.lang.Object
|
+-de.intarsys.pdf.filter.Prediction
All Implemented Interfaces:
IPrediction

Direct Known Subclasses:


NoPrediction, PNGPrediction, TIFFPrediction

public abstract class Prediction


extends Object
implements IPrediction

Field Summary
public static final DK_BitsPerComponent

public static final DK_Colors

public static final DK_Columns

public static final DK_Predictor

public static final None

Value: 1

public static final PNGAverage

Value: 13

public static final PNGNone

Value: 10

public static final PNGOptimum

Value: 15

public static final PNGPaeth

Value: 14

public static final PNGSub

Value: 11

public static final PNGUp

Value: 12

Page 578 of 1521


de.intarsys.pdf.filter.Prediction

public static final TIFF

Value: 2

Constructor Summary
public Prediction(COSDictionary options)

Method Summary
int computeResultRowSize()

int computeSourceRowSize()

byte[] decode(byte[] source)

int getBitsPerComponent()

int getColors()

int getColumns()

int getResultRowSize()

int getSourceRowSize()

Fields
DK_BitsPerComponent
public static final de.intarsys.pdf.cos.COSName DK_BitsPerComponent

DK_Colors
public static final de.intarsys.pdf.cos.COSName DK_Colors

DK_Columns
public static final de.intarsys.pdf.cos.COSName DK_Columns

DK_Predictor
public static final de.intarsys.pdf.cos.COSName DK_Predictor

Page 579 of 1521


de.intarsys.pdf.filter.Prediction

None
public static final int None

Constant value: 1

PNGAverage
public static final int PNGAverage

Constant value: 13

PNGNone
public static final int PNGNone

Constant value: 10

PNGOptimum
public static final int PNGOptimum

Constant value: 15

PNGPaeth
public static final int PNGPaeth

Constant value: 14

PNGSub
public static final int PNGSub

Constant value: 11

PNGUp
public static final int PNGUp

Constant value: 12

TIFF
public static final int TIFF

Constant value: 2

Constructors

Page 580 of 1521


de.intarsys.pdf.filter.Prediction

(continued from last page)

Prediction
public Prediction(COSDictionary options)

Methods
computeResultRowSize
public int computeResultRowSize()

computeSourceRowSize
public int computeSourceRowSize()

decode
public byte[] decode(byte[] source)
throws java.io.IOException

getBitsPerComponent
public int getBitsPerComponent()

getColors
public int getColors()

getColumns
public int getColumns()

getResultRowSize
public int getResultRowSize()

getSourceRowSize
public int getSourceRowSize()

Page 581 of 1521


de.intarsys.pdf.filter.PredictionFactory

de.intarsys.pdf.filter
Class PredictionFactory
java.lang.Object
|
+-de.intarsys.pdf.filter.PredictionFactory

public class PredictionFactory


extends Object

The VM singleton for accessing the IPredictionFactory.

Constructor Summary
public PredictionFactory()

Method Summary
static get()
IPredictionFactory

static void set(IPredictionFactory factory)

Constructors
PredictionFactory
public PredictionFactory()

Methods
get
public static IPredictionFactory get()

set
public static void set(IPredictionFactory factory)

Page 582 of 1521


de.intarsys.pdf.filter.RunLengthFilter

de.intarsys.pdf.filter
Class RunLengthFilter
java.lang.Object
|
+-de.intarsys.pdf.filter.Filter
|
+-de.intarsys.pdf.filter.StreamBasedFilter
|
+-de.intarsys.pdf.filter.RunLengthFilter
All Implemented Interfaces:
IFilter

public class RunLengthFilter


extends StreamBasedFilter

Constructor Summary
public RunLengthFilter(COSDictionary options)

Constructors
RunLengthFilter
public RunLengthFilter(COSDictionary options)

Page 583 of 1521


de.intarsys.pdf.filter.RunLengthInputStream

de.intarsys.pdf.filter
Class RunLengthInputStream
java.lang.Object
|
+-java.io.InputStream
|
+-java.io.FilterInputStream
|
+-de.intarsys.pdf.filter.RunLengthInputStream
All Implemented Interfaces:
java.io.Closeable

public class RunLengthInputStream


extends java.io.FilterInputStream

Constructor Summary
public RunLengthInputStream(java.io.InputStream in)

Constructors
RunLengthInputStream
public RunLengthInputStream(java.io.InputStream in)

Parameters:
in

Page 584 of 1521


de.intarsys.pdf.filter.RunLengthOutputStream

de.intarsys.pdf.filter
Class RunLengthOutputStream
java.lang.Object
|
+-java.io.OutputStream
|
+-java.io.FilterOutputStream
|
+-de.intarsys.pdf.filter.RunLengthOutputStream
All Implemented Interfaces:
java.io.Flushable, java.io.Closeable

public class RunLengthOutputStream


extends java.io.FilterOutputStream

Constructor Summary
public RunLengthOutputStream(java.io.OutputStream out)

Constructors
RunLengthOutputStream
public RunLengthOutputStream(java.io.OutputStream out)

Parameters:
out

Page 585 of 1521


de.intarsys.pdf.filter.StandardFilterFactory

de.intarsys.pdf.filter
Class StandardFilterFactory
java.lang.Object
|
+-de.intarsys.pdf.filter.StandardFilterFactory
All Implemented Interfaces:
IFilterFactory

public class StandardFilterFactory


extends Object
implements IFilterFactory

Factory to create pdf filtering streams by name.

Constructor Summary
public StandardFilterFactory()

Method Summary
IFilter createFilter(COSName filterName, COSDictionary options)
Create an IFilter that can deliver decoded bytes.

Constructors
StandardFilterFactory
public StandardFilterFactory()

Methods
createFilter
public IFilter createFilter(COSName filterName,
COSDictionary options)
throws java.io.IOException

Create an IFilter that can deliver decoded bytes.

Parameters:
filterName - Filter name to lookup
options - The options to use for the filter.

Returns:
An IFilter

Throws:
IOException

Page 586 of 1521


de.intarsys.pdf.filter.StandardPredictionFactory

de.intarsys.pdf.filter
Class StandardPredictionFactory
java.lang.Object
|
+-de.intarsys.pdf.filter.StandardPredictionFactory
All Implemented Interfaces:
IPredictionFactory

public class StandardPredictionFactory


extends Object
implements IPredictionFactory

The standard implementation for the IPredictionFactory.

Constructor Summary
public StandardPredictionFactory()

Method Summary
IPrediction createPrediction(COSDictionary options)

Constructors
StandardPredictionFactory
public StandardPredictionFactory()

Methods
createPrediction
public IPrediction createPrediction(COSDictionary options)
throws java.io.IOException

Page 587 of 1521


de.intarsys.pdf.filter.StreamBasedFilter

de.intarsys.pdf.filter
Class StreamBasedFilter
java.lang.Object
|
+-de.intarsys.pdf.filter.Filter
|
+-de.intarsys.pdf.filter.StreamBasedFilter
All Implemented Interfaces:
IFilter

Direct Known Subclasses:


ASCII85Filter, ASCIIHexFilter, FlateFilter, RunLengthFilter

public abstract class StreamBasedFilter


extends Filter

Constructor Summary
public StreamBasedFilter(COSDictionary options)

Constructors
StreamBasedFilter
public StreamBasedFilter(COSDictionary options)

Page 588 of 1521


de.intarsys.pdf.filter.TIFFFaxDecoder

de.intarsys.pdf.filter
Class TIFFFaxDecoder
java.lang.Object
|
+-de.intarsys.pdf.filter.TIFFFaxDecoder

public class TIFFFaxDecoder


extends Object

Constructor Summary
public TIFFFaxDecoder(int fillOrder, int w, int h)

Method Summary
void decode1D(byte[] buffer, byte[] compData, int startX, int height)

void decode2D(byte[] buffer, byte[] compData, int startX, int height, long
tiffT4Options)

void decodeT6(byte[] buffer, byte[] compData, int startX, int height, long
tiffT6Options)

Constructors
TIFFFaxDecoder
public TIFFFaxDecoder(int fillOrder,
int w,
int h)

Parameters:
fillOrder - The fill order of the compressed data bytes.
compData - Array containing compressed data.
w
h

Methods
decode1D
public void decode1D(byte[] buffer,
byte[] compData,
int startX,
int height)

Page 589 of 1521


de.intarsys.pdf.filter.TIFFFaxDecoder

decode2D
public void decode2D(byte[] buffer,
byte[] compData,
int startX,
int height,
long tiffT4Options)

decodeT6
public void decodeT6(byte[] buffer,
byte[] compData,
int startX,
int height,
long tiffT6Options)

Page 590 of 1521


de.intarsys.pdf.filter.TIFFPrediction

de.intarsys.pdf.filter
Class TIFFPrediction
java.lang.Object
|
+-de.intarsys.pdf.filter.Prediction
|
+-de.intarsys.pdf.filter.TIFFPrediction
All Implemented Interfaces:
IPrediction

public class TIFFPrediction


extends Prediction

Constructor Summary
public TIFFPrediction(COSDictionary options)

Method Summary
int getRowSize()

Constructors
TIFFPrediction
public TIFFPrediction(COSDictionary options)

Methods
getRowSize
public int getRowSize()

Page 591 of 1521


Package
de.intarsys.pdf.font
The font part of the PDF is quite large for itself, so it is extracted to a package of its own.

Page 592 of 1521


de.intarsys.pdf.font.AFMEncoding

de.intarsys.pdf.font
Class AFMEncoding
java.lang.Object
|
+-de.intarsys.pdf.encoding.Encoding
|
+-de.intarsys.pdf.font.AFMEncoding
Direct Known Subclasses:
AFMSymbolicEncoding

public class AFMEncoding


extends Encoding

The builtin encoding of AFM defined fonts.

Constructor Summary
public AFMEncoding(AFM afm)
AFMEncoding constructor comment.

Method Summary
AFM getAfm()
Return the underlying Adobe font metrics.

int getByteCode(int unicode)

int getByteCode(String name)

COSObject getCosObject()

String getGlyphName(int codePoint)

String getName()

int getUnicode(int byteCode)

int getValidByteCode(int unicode)

int getValidByteCode(String name)

Constructors
AFMEncoding
public AFMEncoding(AFM afm)

AFMEncoding constructor comment.

Page 593 of 1521


de.intarsys.pdf.font.AFMEncoding

(continued from last page)

Parameters:
afm - The de.intarsys.font.afm.AFM object defining the encoding.

Methods
getAfm
public AFM getAfm()

Return the underlying Adobe font metrics.

Returns:
Return the wrapped Adobe font metrics.

getByteCode
public int getByteCode(String name)

Get the code point where the character referenced by the Adobe glyph name name is mapped in this font encoding or -1 if
not valid.

name must be a valid Adobe glyph name. The code point is a value from 0...255. If the glyph is not found, -1 is returned.

getByteCode
public int getByteCode(int unicode)

Get the byte code point where the character referenced by the Unicode code point unicode is mapped in this font
encoding or -1 if invalid.

unicode must be a valid Unicode code point. The returned code point is a value from 0...255. If the Unicode code point is
not valid or not mapped, -1 is returned.

getCosObject
public COSObject getCosObject()

Get an object that can be used as a representation of the receiver encoding within doc.

getGlyphName
public String getGlyphName(int codePoint)

Get the character name for a given encoded byte code point. If no mapping is defined, return ".notdef".

getName
public String getName()

getUnicode
public int getUnicode(int byteCode)

Get the Unicode code point for the encoded code Point byteCode or -1 if not available.

Page 594 of 1521


de.intarsys.pdf.font.AFMEncoding

(continued from last page)

getValidByteCode
public int getValidByteCode(String name)

Get the code point where the character referenced by the Adobe glyph name name is mapped in this font encoding or a
valid replacement.

name must be a valid Adobe glyph name. The code point is a value from 0...255. If the glyph is not found, a valif
replacement code point is returned instead (for example the space character).

getValidByteCode
public int getValidByteCode(int unicode)

Get the byte code point where the character referenced by the Unicode code point unicode is mapped in this font
encoding or a valid replacement code point if invalid.

unicode must be a valid Unicode code point. The returned code point is a value from 0...255. If the Unicode code point is
not valid or not mapped, a valid code point is returned is returned (for example the space character).

Page 595 of 1521


de.intarsys.pdf.font.AFMSymbolicEncoding

de.intarsys.pdf.font
Class AFMSymbolicEncoding
java.lang.Object
|
+-de.intarsys.pdf.encoding.Encoding
|
+-de.intarsys.pdf.font.AFMEncoding
|
+-de.intarsys.pdf.font.AFMSymbolicEncoding

public class AFMSymbolicEncoding


extends AFMEncoding

Constructor Summary
public AFMSymbolicEncoding(AFM afm)

Method Summary
int getByteCode(int unicode)

int getValidByteCode(int unicode)

Constructors
AFMSymbolicEncoding
public AFMSymbolicEncoding(AFM afm)

Parameters:
afm

Methods
getValidByteCode
public int getValidByteCode(int unicode)

Get the byte code point where the character referenced by the Unicode code point unicode is mapped in this font
encoding or a valid replacement code point if invalid.

unicode must be a valid Unicode code point. The returned code point is a value from 0...255. If the Unicode code point is
not valid or not mapped, a valid code point is returned is returned (for example the space character).

getByteCode
public int getByteCode(int unicode)

Page 596 of 1521


de.intarsys.pdf.font.AFMSymbolicEncoding

(continued from last page)

Get the byte code point where the character referenced by the Unicode code point unicode is mapped in this font
encoding or -1 if invalid.

unicode must be a valid Unicode code point. The returned code point is a value from 0...255. If the Unicode code point is
not valid or not mapped, -1 is returned.

Page 597 of 1521


de.intarsys.pdf.font.CID

de.intarsys.pdf.font
Class CID
java.lang.Object
|
+-de.intarsys.pdf.font.CID
Direct Known Subclasses:
CIDSelectorCID, CIDSelectorCode, CIDSelectorName

public abstract class CID


extends Object

A selector for a character within a font (Character ID).

A character may be identified by different means (name, index, unicode..).

Field Summary
public static final Notdef
The special CID for undefined glyphs.

Method Summary
int getFontNumber()
The font number referenced by this cid.

abstract int getLength()


The number of bytes this CID occupies.

abstract int getValue()


The integer equivalent of the cid.

Fields
Notdef
public static final de.intarsys.pdf.font.CID Notdef

The special CID for undefined glyphs.

Methods
getValue
public abstract int getValue()

The integer equivalent of the cid.

A CID must not be larger than the platform integer size.

Returns:
The integer equivalent of the cid.

Page 598 of 1521


de.intarsys.pdf.font.CID

getFontNumber
public int getFontNumber()

The font number referenced by this cid.

In PDF this is always 0.

Returns:
The font number referenced by this cid.

getLength
public abstract int getLength()

The number of bytes this CID occupies.

Returns:
The number of bytes this CID occupies.

Page 599 of 1521


de.intarsys.pdf.font.CIDFont

de.intarsys.pdf.font
Class CIDFont
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.font.PDFont
|
+-de.intarsys.pdf.font.CIDFont
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IFont

Direct Known Subclasses:


CIDFontType0, CIDFontType2

public abstract class CIDFont


extends PDFont

A CID indexed font.

This is a wrapper around a Type 1 or TrueType Font that is indexed using CID's.

This is a a subclass of PDFont only for implementation reasons.

todo 1 cmap review, delegate methods, access implementation font.

Nested Class Summary


class CIDFont.MetaClass
CIDFont.MetaClass

Field Summary
public static final DK_CIDSystemInfo

public static final DK_DW

public static final DK_DW2

public static final DK_W

public static final DK_W2

public static final META


The meta class instance

Method Summary
CIDSystemInfo getCIDSystemInfo()

Page 600 of 1521


de.intarsys.pdf.font.CIDFont

CIDWidthMap getCIDWidthMap()

String getFontFamilyName()

String getFontName()

FontStyle getFontStyle()

abstract int getGlyphIndex(CID cid)

int getGlyphWidth(int cidValue)

float getUnderlinePosition()

int getUnderlineThickness()

Fields
DK_CIDSystemInfo
public static final de.intarsys.pdf.cos.COSName DK_CIDSystemInfo

DK_DW
public static final de.intarsys.pdf.cos.COSName DK_DW

DK_W
public static final de.intarsys.pdf.cos.COSName DK_W

DK_DW2
public static final de.intarsys.pdf.cos.COSName DK_DW2

DK_W2
public static final de.intarsys.pdf.cos.COSName DK_W2

META
public static final de.intarsys.pdf.font.CIDFont.MetaClass META

Page 601 of 1521


de.intarsys.pdf.font.CIDFont

(continued from last page)

The meta class instance

Methods
getCIDWidthMap
public CIDWidthMap getCIDWidthMap()

getFontFamilyName
public String getFontFamilyName()

getFontName
public String getFontName()

getFontStyle
public FontStyle getFontStyle()

getUnderlinePosition
public float getUnderlinePosition()

getUnderlineThickness
public int getUnderlineThickness()

getCIDSystemInfo
public CIDSystemInfo getCIDSystemInfo()

getGlyphWidth
public int getGlyphWidth(int cidValue)

return the glyph width of a codepoint in the receiver font

getGlyphIndex
public abstract int getGlyphIndex(CID cid)

Page 602 of 1521


de.intarsys.pdf.font.CIDFont.MetaClass

de.intarsys.pdf.font
Class CIDFont.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.font.PDFont.MetaClass
|
+-de.intarsys.pdf.font.CIDFont.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass

public static class CIDFont.MetaClass


extends PDFont.MetaClass

The meta class implementation

Page 603 of 1521


de.intarsys.pdf.font.CIDFontType0

de.intarsys.pdf.font
Class CIDFontType0
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.font.PDFont
|
+-de.intarsys.pdf.font.CIDFont
|
+-de.intarsys.pdf.font.CIDFontType0
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IFont

public class CIDFontType0


extends CIDFont

A Type 1 based CID font.

Nested Class Summary


class CIDFontType0.MetaClass
CIDFontType0.MetaClass

Field Summary
public static final META
The meta class instance

Constructor Summary
public CIDFontType0(COSObject object)

Method Summary
int getGlyphIndex(CID cid)

CID getNextCID(byte[] bytes, int offset)

Fields
META
public static final de.intarsys.pdf.font.CIDFontType0.MetaClass META

The meta class instance

Constructors

Page 604 of 1521


de.intarsys.pdf.font.CIDFontType0

(continued from last page)

CIDFontType0
public CIDFontType0(COSObject object)

Parameters:
object

Methods
getNextCID
public CID getNextCID(byte[] bytes,
int offset)

getGlyphIndex
public int getGlyphIndex(CID cid)

Page 605 of 1521


de.intarsys.pdf.font.CIDFontType0.MetaClass

de.intarsys.pdf.font
Class CIDFontType0.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.font.PDFont.MetaClass
|
+-de.intarsys.pdf.font.CIDFont.MetaClass
|
+-de.intarsys.pdf.font.CIDFontType0.MetaClass

public static class CIDFontType0.MetaClass


extends CIDFont.MetaClass

The meta class implementation

Page 606 of 1521


de.intarsys.pdf.font.CIDFontType2

de.intarsys.pdf.font
Class CIDFontType2
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.font.PDFont
|
+-de.intarsys.pdf.font.CIDFont
|
+-de.intarsys.pdf.font.CIDFontType2
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IFont

public class CIDFontType2


extends CIDFont

A TrueType based CID font.

Nested Class Summary


class CIDFontType2.MetaClass
CIDFontType2.MetaClass

Field Summary
public static final DK_CIDToGIDMap

public static final META


The meta class instance

Constructor Summary
public CIDFontType2(COSObject object)

Method Summary
COSObject cosGetCIDToGIDMap()

int getGlyphIndex(CID cid)

CID getNextCID(byte[] bytes, int offset)

Fields

Page 607 of 1521


de.intarsys.pdf.font.CIDFontType2

(continued from last page)

META
public static final de.intarsys.pdf.font.CIDFontType2.MetaClass META

The meta class instance

DK_CIDToGIDMap
public static final de.intarsys.pdf.cos.COSName DK_CIDToGIDMap

Constructors
CIDFontType2
public CIDFontType2(COSObject object)

Parameters:
object

Methods
getNextCID
public CID getNextCID(byte[] bytes,
int offset)

cosGetCIDToGIDMap
public COSObject cosGetCIDToGIDMap()

getGlyphIndex
public int getGlyphIndex(CID cid)

Page 608 of 1521


de.intarsys.pdf.font.CIDFontType2.MetaClass

de.intarsys.pdf.font
Class CIDFontType2.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.font.PDFont.MetaClass
|
+-de.intarsys.pdf.font.CIDFont.MetaClass
|
+-de.intarsys.pdf.font.CIDFontType2.MetaClass

public static class CIDFontType2.MetaClass


extends CIDFont.MetaClass

The meta class implementation

Page 609 of 1521


de.intarsys.pdf.font.CIDSelectorCID

de.intarsys.pdf.font
Class CIDSelectorCID
java.lang.Object
|
+-de.intarsys.pdf.font.CID
|
+-de.intarsys.pdf.font.CIDSelectorCID

public class CIDSelectorCID


extends CID

A selector based on a multi byte sequence.

Constructor Summary
public CIDSelectorCID(int value)

public CIDSelectorCID(byte[] bytes, int offset, int length)

Method Summary
int getLength()

int getValue()

Constructors
CIDSelectorCID
public CIDSelectorCID(int value)

CIDSelectorCID
public CIDSelectorCID(byte[] bytes,
int offset,
int length)

Methods
getLength
public int getLength()

The number of bytes this CID occupies.

Page 610 of 1521


de.intarsys.pdf.font.CIDSelectorCID

(continued from last page)

getValue
public int getValue()

The integer equivalent of the cid.

A CID must not be larger than the platform integer size.

Page 611 of 1521


de.intarsys.pdf.font.CIDSelectorCode

de.intarsys.pdf.font
Class CIDSelectorCode
java.lang.Object
|
+-de.intarsys.pdf.font.CID
|
+-de.intarsys.pdf.font.CIDSelectorCode

public class CIDSelectorCode


extends CID

A selector based on a character code.

Constructor Summary
public CIDSelectorCode(int value)

Method Summary
int getLength()

int getValue()

Constructors
CIDSelectorCode
public CIDSelectorCode(int value)

Parameters:
value

Methods
getValue
public int getValue()

The integer equivalent of the cid.

A CID must not be larger than the platform integer size.

getLength
public int getLength()

The number of bytes this CID occupies.

Page 612 of 1521


de.intarsys.pdf.font.CIDSelectorName

de.intarsys.pdf.font
Class CIDSelectorName
java.lang.Object
|
+-de.intarsys.pdf.font.CID
|
+-de.intarsys.pdf.font.CIDSelectorName

public class CIDSelectorName


extends CID

A selector based on a character name.

Constructor Summary
public CIDSelectorName(COSName name)

Method Summary
int getLength()

COSName getName()

int getValue()

Constructors
CIDSelectorName
public CIDSelectorName(COSName name)

Methods
getName
public COSName getName()

getValue
public int getValue()

The integer equivalent of the cid.

A CID must not be larger than the platform integer size.

Page 613 of 1521


de.intarsys.pdf.font.CIDSelectorName

(continued from last page)

getLength
public int getLength()

The number of bytes this CID occupies.

Page 614 of 1521


de.intarsys.pdf.font.CIDSystemInfo

de.intarsys.pdf.font
Class CIDSystemInfo
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.font.CIDSystemInfo
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class CIDSystemInfo


extends COSBasedObject

Nested Class Summary


class CIDSystemInfo.MetaClass
CIDSystemInfo.MetaClass

Field Summary
public static final DK_Ordering

public static final DK_Registry

public static final DK_Supplement

public static final META


The meta class instance

Fields
META
public static final de.intarsys.pdf.font.CIDSystemInfo.MetaClass META

The meta class instance

DK_Registry
public static final de.intarsys.pdf.cos.COSName DK_Registry

DK_Ordering
public static final de.intarsys.pdf.cos.COSName DK_Ordering

Page 615 of 1521


de.intarsys.pdf.font.CIDSystemInfo

DK_Supplement
public static final de.intarsys.pdf.cos.COSName DK_Supplement

Page 616 of 1521


de.intarsys.pdf.font.CIDSystemInfo.MetaClass

de.intarsys.pdf.font
Class CIDSystemInfo.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.font.CIDSystemInfo.MetaClass

public static class CIDSystemInfo.MetaClass


extends COSBasedObject.MetaClass

The meta class implementation

Page 617 of 1521


de.intarsys.pdf.font.CIDToGIDMap

de.intarsys.pdf.font
Class CIDToGIDMap
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.font.CIDToGIDMap
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


NamedGIDMap, StreamBasedGIDMap

public abstract class CIDToGIDMap


extends COSBasedObject

For Type 2 CID Fonts only a specification of the mapping from CID's to glyph indices.

Nested Class Summary


class CIDToGIDMap.MetaClass
CIDToGIDMap.MetaClass

Field Summary
public static final CN_Identity

public static final META


The meta class instance

Method Summary
abstract int getGlyphIndex(CID cid)

static CIDToGIDMap getSingleton(COSName name)

Fields
CN_Identity
public static final de.intarsys.pdf.cos.COSName CN_Identity

META
public static final de.intarsys.pdf.font.CIDToGIDMap.MetaClass META

The meta class instance

Page 618 of 1521


de.intarsys.pdf.font.CIDToGIDMap

Methods
getSingleton
public static CIDToGIDMap getSingleton(COSName name)

getGlyphIndex
public abstract int getGlyphIndex(CID cid)

Page 619 of 1521


de.intarsys.pdf.font.CIDToGIDMap.MetaClass

de.intarsys.pdf.font
Class CIDToGIDMap.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.font.CIDToGIDMap.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass

public static class CIDToGIDMap.MetaClass


extends COSBasedObject.MetaClass

The meta class implementation

Page 620 of 1521


de.intarsys.pdf.font.CIDWidthMap

de.intarsys.pdf.font
Class CIDWidthMap
java.lang.Object
|
+-de.intarsys.pdf.font.CIDWidthMap

public class CIDWidthMap


extends Object

Constructor Summary
public CIDWidthMap(java.util.List entries)

Method Summary
static CIDWidthMap createMap(COSArray array)

int getWidth(int cidValue)

Constructors
CIDWidthMap
public CIDWidthMap(java.util.List entries)

Methods
createMap
public static CIDWidthMap createMap(COSArray array)

getWidth
public int getWidth(int cidValue)

Page 621 of 1521


de.intarsys.pdf.font.CIDWidthMapEntry

de.intarsys.pdf.font
Class CIDWidthMapEntry
java.lang.Object
|
+-de.intarsys.pdf.font.CIDWidthMapEntry

public class CIDWidthMapEntry


extends Object

Constructor Summary
public CIDWidthMapEntry(int start, int stop, int width)

Method Summary
int getStart()

int getStop()

int getWidth()

Constructors
CIDWidthMapEntry
public CIDWidthMapEntry(int start,
int stop,
int width)

Methods
getStart
public int getStart()

getStop
public int getStop()

getWidth
public int getWidth()

Page 622 of 1521


de.intarsys.pdf.font.CIDWidthMapEntry

(continued from last page)

Page 623 of 1521


de.intarsys.pdf.font.CMap

de.intarsys.pdf.font
Class CMap
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.font.CMap
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


NamedCMap, StreamBasedCMap

public abstract class CMap


extends COSBasedObject

A character map. This object can map from character codes to CID's which can be used to index in a font object.

Nested Class Summary


class CMap.MetaClass
CMap.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
abstract CID getNextCID(byte[] bytes, int offset)

abstract CID lookup(byte[] value)

static int toInt(byte[] bytes)

static int toInt(byte[] bytes, int offset, int length)

Fields
META
public static final de.intarsys.pdf.font.CMap.MetaClass META

The meta class instance

Methods

Page 624 of 1521


de.intarsys.pdf.font.CMap

(continued from last page)

toInt
public static int toInt(byte[] bytes)

toInt
public static int toInt(byte[] bytes,
int offset,
int length)

lookup
public abstract CID lookup(byte[] value)

getNextCID
public abstract CID getNextCID(byte[] bytes,
int offset)

Page 625 of 1521


de.intarsys.pdf.font.CMap.MetaClass

de.intarsys.pdf.font
Class CMap.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.font.CMap.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass

public static class CMap.MetaClass


extends COSBasedObject.MetaClass

The meta class implementation

Page 626 of 1521


de.intarsys.pdf.font.CMapBFCharCodeMap

de.intarsys.pdf.font
Class CMapBFCharCodeMap
java.lang.Object
|
+-de.intarsys.pdf.font.CMapMap
|
+-de.intarsys.pdf.font.CMapCharMap
|
+-de.intarsys.pdf.font.CMapBFCharCodeMap

public class CMapBFCharCodeMap


extends CMapCharMap

A special map from a character code to a character code.

Constructor Summary
public CMapBFCharCodeMap(byte[] source, byte[] destination)

Method Summary
byte[] getDestination()

CID map(byte[] bytes)

Constructors
CMapBFCharCodeMap
public CMapBFCharCodeMap(byte[] source,
byte[] destination)

Methods
getDestination
public byte[] getDestination()

map
public CID map(byte[] bytes)

Page 627 of 1521


de.intarsys.pdf.font.CMapBFCharNameMap

de.intarsys.pdf.font
Class CMapBFCharNameMap
java.lang.Object
|
+-de.intarsys.pdf.font.CMapMap
|
+-de.intarsys.pdf.font.CMapCharMap
|
+-de.intarsys.pdf.font.CMapBFCharNameMap

public class CMapBFCharNameMap


extends CMapCharMap

A special map from a character code to a character name.

Constructor Summary
public CMapBFCharNameMap(byte[] source, COSName destination)

Method Summary
COSName getDestination()

CID map(byte[] bytes)

Constructors
CMapBFCharNameMap
public CMapBFCharNameMap(byte[] source,
COSName destination)

Methods
getDestination
public COSName getDestination()

map
public CID map(byte[] bytes)

Page 628 of 1521


de.intarsys.pdf.font.CMapBFRangeCodeMap

de.intarsys.pdf.font
Class CMapBFRangeCodeMap
java.lang.Object
|
+-de.intarsys.pdf.font.CMapMap
|
+-de.intarsys.pdf.font.CMapRangeMap
|
+-de.intarsys.pdf.font.CMapBFRangeCodeMap

public class CMapBFRangeCodeMap


extends CMapRangeMap

A special map from a character code range to a character code range.

Constructor Summary
public CMapBFRangeCodeMap(byte[] start, byte[] end, byte[] destination)

Method Summary
CID map(byte[] bytes)

Constructors
CMapBFRangeCodeMap
public CMapBFRangeCodeMap(byte[] start,
byte[] end,
byte[] destination)

Methods
map
public CID map(byte[] bytes)

Page 629 of 1521


de.intarsys.pdf.font.CMapBFRangeNameMap

de.intarsys.pdf.font
Class CMapBFRangeNameMap
java.lang.Object
|
+-de.intarsys.pdf.font.CMapMap
|
+-de.intarsys.pdf.font.CMapRangeMap
|
+-de.intarsys.pdf.font.CMapBFRangeNameMap

public class CMapBFRangeNameMap


extends CMapRangeMap

A special map from a character code range to a character name range.

Constructor Summary
public CMapBFRangeNameMap(byte[] start, byte[] end, COSArray names)

Method Summary
CID map(byte[] value)

Constructors
CMapBFRangeNameMap
public CMapBFRangeNameMap(byte[] start,
byte[] end,
COSArray names)

Methods
map
public CID map(byte[] value)

Page 630 of 1521


de.intarsys.pdf.font.CMapCharMap

de.intarsys.pdf.font
Class CMapCharMap
java.lang.Object
|
+-de.intarsys.pdf.font.CMapMap
|
+-de.intarsys.pdf.font.CMapCharMap
Direct Known Subclasses:
CMapBFCharCodeMap, CMapBFCharNameMap, CMapCIDCharCodeMap

public abstract class CMapCharMap


extends CMapMap

An abstract implementation for maps from character codes to CID's.

Constructor Summary
public CMapCharMap(byte[] source)

Method Summary
byte[] getSource()

Constructors
CMapCharMap
public CMapCharMap(byte[] source)

Methods
getSource
public byte[] getSource()

Page 631 of 1521


de.intarsys.pdf.font.CMapCIDCharCodeMap

de.intarsys.pdf.font
Class CMapCIDCharCodeMap
java.lang.Object
|
+-de.intarsys.pdf.font.CMapMap
|
+-de.intarsys.pdf.font.CMapCharMap
|
+-de.intarsys.pdf.font.CMapCIDCharCodeMap

public class CMapCIDCharCodeMap


extends CMapCharMap

A special map from a character code to a CID.

Constructor Summary
public CMapCIDCharCodeMap(byte[] source, int destination)

Method Summary
int getDestination()

CID map(byte[] bytes)

Constructors
CMapCIDCharCodeMap
public CMapCIDCharCodeMap(byte[] source,
int destination)

Methods
getDestination
public int getDestination()

map
public CID map(byte[] bytes)

Page 632 of 1521


de.intarsys.pdf.font.CMapCIDRangeCodeMap

de.intarsys.pdf.font
Class CMapCIDRangeCodeMap
java.lang.Object
|
+-de.intarsys.pdf.font.CMapMap
|
+-de.intarsys.pdf.font.CMapRangeMap
|
+-de.intarsys.pdf.font.CMapCIDRangeCodeMap

public class CMapCIDRangeCodeMap


extends CMapRangeMap

A special map from a character code range to a CID range.

Constructor Summary
public CMapCIDRangeCodeMap(byte[] start, byte[] end, int destination)

Method Summary
CID map(byte[] bytes)

Constructors
CMapCIDRangeCodeMap
public CMapCIDRangeCodeMap(byte[] start,
byte[] end,
int destination)

Methods
map
public CID map(byte[] bytes)

Page 633 of 1521


de.intarsys.pdf.font.CMapCIDRangeNotdefMap

de.intarsys.pdf.font
Class CMapCIDRangeNotdefMap
java.lang.Object
|
+-de.intarsys.pdf.font.CMapMap
|
+-de.intarsys.pdf.font.CMapRangeMap
|
+-de.intarsys.pdf.font.CMapCIDRangeNotdefMap

public class CMapCIDRangeNotdefMap


extends CMapRangeMap

A special map from a character code range to a single CID denoting "notdef".

Constructor Summary
public CMapCIDRangeNotdefMap(byte[] start, byte[] end, int destination)

Method Summary
CID map(byte[] bytes)

Constructors
CMapCIDRangeNotdefMap
public CMapCIDRangeNotdefMap(byte[] start,
byte[] end,
int destination)

Methods
map
public CID map(byte[] bytes)

Page 634 of 1521


de.intarsys.pdf.font.CMapMap

de.intarsys.pdf.font
Class CMapMap
java.lang.Object
|
+-de.intarsys.pdf.font.CMapMap
Direct Known Subclasses:
CMapCharMap, CMapRangeMap

public abstract class CMapMap


extends Object

An abstract implementation for map definitions in a CMap.

Constructor Summary
public CMapMap()

Method Summary
abstract CID map(byte[] value)

Constructors
CMapMap
public CMapMap()

Methods
map
public abstract CID map(byte[] value)

Page 635 of 1521


de.intarsys.pdf.font.CMapOperator

de.intarsys.pdf.font
Class CMapOperator
java.lang.Object
|
+-de.intarsys.pdf.font.CMapOperator

public class CMapOperator


extends Object

A classs enumerating the operators for a cmap program.

Field Summary
public static final CMO_beginbfchar

public static final CMO_beginbfrange

public static final CMO_begincidchar

public static final CMO_begincidrange

public static final CMO_begincmap

public static final CMO_begincodespacerange

public static final CMO_beginnotdefchar

public static final CMO_beginnotdefrange

public static final CMO_endbfchar

public static final CMO_endbfrange

public static final CMO_endcidchar

public static final CMO_endcidrange

public static final CMO_endcmap

public static final CMO_endcodespacerange

public static final CMO_endnotdefchar

public static final CMO_endnotdefrange

public static final CMO_usecmap

Page 636 of 1521


de.intarsys.pdf.font.CMapOperator

public static final CMO_usefont

Fields
CMO_begincmap
public static final de.intarsys.pdf.content.CSOperator CMO_begincmap

CMO_endcmap
public static final de.intarsys.pdf.content.CSOperator CMO_endcmap

CMO_usecmap
public static final de.intarsys.pdf.content.CSOperator CMO_usecmap

CMO_begincodespacerange
public static final de.intarsys.pdf.content.CSOperator CMO_begincodespacerange

CMO_endcodespacerange
public static final de.intarsys.pdf.content.CSOperator CMO_endcodespacerange

CMO_usefont
public static final de.intarsys.pdf.content.CSOperator CMO_usefont

CMO_beginbfchar
public static final de.intarsys.pdf.content.CSOperator CMO_beginbfchar

CMO_endbfchar
public static final de.intarsys.pdf.content.CSOperator CMO_endbfchar

Page 637 of 1521


de.intarsys.pdf.font.CMapOperator

(continued from last page)

CMO_beginbfrange
public static final de.intarsys.pdf.content.CSOperator CMO_beginbfrange

CMO_endbfrange
public static final de.intarsys.pdf.content.CSOperator CMO_endbfrange

CMO_begincidchar
public static final de.intarsys.pdf.content.CSOperator CMO_begincidchar

CMO_endcidchar
public static final de.intarsys.pdf.content.CSOperator CMO_endcidchar

CMO_begincidrange
public static final de.intarsys.pdf.content.CSOperator CMO_begincidrange

CMO_endcidrange
public static final de.intarsys.pdf.content.CSOperator CMO_endcidrange

CMO_beginnotdefchar
public static final de.intarsys.pdf.content.CSOperator CMO_beginnotdefchar

CMO_endnotdefchar
public static final de.intarsys.pdf.content.CSOperator CMO_endnotdefchar

CMO_beginnotdefrange
public static final de.intarsys.pdf.content.CSOperator CMO_beginnotdefrange

CMO_endnotdefrange
public static final de.intarsys.pdf.content.CSOperator CMO_endnotdefrange

Page 638 of 1521


de.intarsys.pdf.font.CMapOperator

(continued from last page)

Page 639 of 1521


de.intarsys.pdf.font.CMapRange

de.intarsys.pdf.font
Class CMapRange
java.lang.Object
|
+-de.intarsys.pdf.font.CMapRange

public class CMapRange


extends Object

A codespace range for a CMap.

todo 1 cmap implement correct byte check

Constructor Summary
public CMapRange(byte[] start, byte[] end)

Method Summary
boolean contains(byte[] value)

byte[] getEnd()

byte[] getStart()

Constructors
CMapRange
public CMapRange(byte[] start,
byte[] end)

Methods
getEnd
public byte[] getEnd()

getStart
public byte[] getStart()

Page 640 of 1521


de.intarsys.pdf.font.CMapRange

(continued from last page)

contains
public boolean contains(byte[] value)

Page 641 of 1521


de.intarsys.pdf.font.CMapRangeMap

de.intarsys.pdf.font
Class CMapRangeMap
java.lang.Object
|
+-de.intarsys.pdf.font.CMapMap
|
+-de.intarsys.pdf.font.CMapRangeMap
Direct Known Subclasses:
CMapBFRangeCodeMap, CMapBFRangeNameMap, CMapCIDRangeCodeMap, CMapCIDRangeNotdefMap

public abstract class CMapRangeMap


extends CMapMap

An abstract implementation for a map from a code range to CID's.

Constructor Summary
public CMapRangeMap(byte[] start, byte[] end)

Method Summary
int getEnd()

int getStart()

Constructors
CMapRangeMap
public CMapRangeMap(byte[] start,
byte[] end)

Methods
getEnd
public int getEnd()

getStart
public int getStart()

Page 642 of 1521


de.intarsys.pdf.font.DifferenceEncoding

de.intarsys.pdf.font
Class DifferenceEncoding
java.lang.Object
|
+-de.intarsys.pdf.encoding.Encoding
|
+-de.intarsys.pdf.font.DifferenceEncoding

public class DifferenceEncoding


extends Encoding

An encoding defined as a delta to another base encoding.

the encoding difference is defined in the form


...
num name name name
num name..
...

where num is the codepoint for the first glyph name in the list. The following names are mapped to the codepoint of the
predecessor + 1. Multiple redefinition offsets can be defined.

Field Summary
public static final DK_BaseEncoding

public static final DK_Differences

Constructor Summary
public DifferenceEncoding()
DictionaryEncoding constructor comment.

Method Summary
static Encoding create(COSDictionary dict, PDFont font)
Create the difference encoding from the values defined in the dict.

int getByteCode(int unicode)

int getByteCode(String name)

COSObject getCosObject()

String getDifferenceGlyphName(int codePoint)

Page 643 of 1521


de.intarsys.pdf.font.DifferenceEncoding

int getDifferenceUnicode(int codePoint)

String getGlyphName(int codePoint)

String getName()

int getUnicode(int byteCode)

int getValidByteCode(int unicode)

int getValidByteCode(String name)

boolean isFontSpecificEncoding()

Fields
DK_Differences
public static final de.intarsys.pdf.cos.COSName DK_Differences

DK_BaseEncoding
public static final de.intarsys.pdf.cos.COSName DK_BaseEncoding

Constructors
DifferenceEncoding
public DifferenceEncoding()

DictionaryEncoding constructor comment.

Methods
create
public static Encoding create(COSDictionary dict,
PDFont font)

Create the difference encoding from the values defined in the dict.

todo 2 remove dependency to font and refactor

Parameters:
dict - The dictionary defining the difference.
font - The font defining the base encoding.

Returns:
The difference encoding from the values defined in the dict.

Page 644 of 1521


de.intarsys.pdf.font.DifferenceEncoding

getByteCode
public int getByteCode(String name)

Get the code point where the character referenced by the Adobe glyph name name is mapped in this font encoding or -1 if
not valid.

name must be a valid Adobe glyph name. The code point is a value from 0...255. If the glyph is not found, -1 is returned.

getDifferenceUnicode
public int getDifferenceUnicode(int codePoint)

getByteCode
public int getByteCode(int unicode)

Get the byte code point where the character referenced by the Unicode code point unicode is mapped in this font
encoding or -1 if invalid.

unicode must be a valid Unicode code point. The returned code point is a value from 0...255. If the Unicode code point is
not valid or not mapped, -1 is returned.

getCosObject
public COSObject getCosObject()

Get an object that can be used as a representation of the receiver encoding within doc.

getGlyphName
public String getGlyphName(int codePoint)

Get the character name for a given encoded byte code point. If no mapping is defined, return ".notdef".

getDifferenceGlyphName
public String getDifferenceGlyphName(int codePoint)

getName
public String getName()

getUnicode
public int getUnicode(int byteCode)

Get the Unicode code point for the encoded code Point byteCode or -1 if not available.

getValidByteCode
public int getValidByteCode(String name)

Page 645 of 1521


de.intarsys.pdf.font.DifferenceEncoding

(continued from last page)

Get the code point where the character referenced by the Adobe glyph name name is mapped in this font encoding or a
valid replacement.

name must be a valid Adobe glyph name. The code point is a value from 0...255. If the glyph is not found, a valif
replacement code point is returned instead (for example the space character).

getValidByteCode
public int getValidByteCode(int unicode)

Get the byte code point where the character referenced by the Unicode code point unicode is mapped in this font
encoding or a valid replacement code point if invalid.

unicode must be a valid Unicode code point. The returned code point is a value from 0...255. If the Unicode code point is
not valid or not mapped, a valid code point is returned is returned (for example the space character).

isFontSpecificEncoding
public boolean isFontSpecificEncoding()

Answer true if this encoding is specific to and embedded into the font program itself so that we can not derive any mapping
information from here.

Page 646 of 1521


de.intarsys.pdf.font.FontDescriptorFlags

de.intarsys.pdf.font
Class FontDescriptorFlags
java.lang.Object
|
+-de.intarsys.pdf.pd.AbstractBitFlags
|
+-de.intarsys.pdf.font.FontDescriptorFlags

public class FontDescriptorFlags


extends AbstractBitFlags

The flags of a font descriptor.

The following bits are defined (more may exist).

• 0: fixed pitch
• 1: serif
• 2: symbolic
• 3: script
• 5: non symbolic
• 6: italic
• 16: all capital
• 17: small caps
• 18: force bold

Field Summary
public static final Bit_AllCap

Value: 65536

public static final Bit_FixedPitch

Value: 1

public static final Bit_ForceBold

Value: 262144

public static final Bit_Italic

Value: 64

public static final Bit_Nonsymbolic

Value: 32

public static final Bit_Script

Value: 8

public static final Bit_Serif

Value: 2

public static final Bit_SmallCap

Value: 131072

Page 647 of 1521


de.intarsys.pdf.font.FontDescriptorFlags

public static final Bit_Symbolic

Value: 4

Constructor Summary
public FontDescriptorFlags(PDFontDescriptor fontDescriptor)

Method Summary
boolean isAllCap()

boolean isFixedPitch()

boolean isForceBold()

boolean isItalic()

boolean isNonsymbolic()

boolean isScript()

boolean isSerif()

boolean isSmallCap()

boolean isSymbolic()

void setAllCap(boolean flag)

void setFixedPitch(boolean flag)

void setForceBold(boolean flag)

void setItalic(boolean flag)

void setNonsymbolic(boolean flag)

void setScript(boolean flag)

void setSerif(boolean flag)

void setSmallCap(boolean flag)

void setSymbolic(boolean flag)

Fields

Page 648 of 1521


de.intarsys.pdf.font.FontDescriptorFlags

(continued from last page)

Bit_FixedPitch
public static final int Bit_FixedPitch

Constant value: 1

Bit_Serif
public static final int Bit_Serif

Constant value: 2

Bit_Symbolic
public static final int Bit_Symbolic

Constant value: 4

Bit_Script
public static final int Bit_Script

Constant value: 8

Bit_Nonsymbolic
public static final int Bit_Nonsymbolic

Constant value: 32

Bit_Italic
public static final int Bit_Italic

Constant value: 64

Bit_AllCap
public static final int Bit_AllCap

Constant value: 65536

Bit_SmallCap
public static final int Bit_SmallCap

Constant value: 131072

Page 649 of 1521


de.intarsys.pdf.font.FontDescriptorFlags

(continued from last page)

Bit_ForceBold
public static final int Bit_ForceBold

Constant value: 262144

Constructors
FontDescriptorFlags
public FontDescriptorFlags(PDFontDescriptor fontDescriptor)

Methods
setAllCap
public void setAllCap(boolean flag)

isAllCap
public boolean isAllCap()

setFixedPitch
public void setFixedPitch(boolean flag)

isFixedPitch
public boolean isFixedPitch()

setForceBold
public void setForceBold(boolean flag)

isForceBold
public boolean isForceBold()

setItalic
public void setItalic(boolean flag)

Page 650 of 1521


de.intarsys.pdf.font.FontDescriptorFlags

isItalic
public boolean isItalic()

setNonsymbolic
public void setNonsymbolic(boolean flag)

isNonsymbolic
public boolean isNonsymbolic()

setScript
public void setScript(boolean flag)

isScript
public boolean isScript()

setSerif
public void setSerif(boolean flag)

isSerif
public boolean isSerif()

setSmallCap
public void setSmallCap(boolean flag)

isSmallCap
public boolean isSmallCap()

setSymbolic
public void setSymbolic(boolean flag)

Page 651 of 1521


de.intarsys.pdf.font.FontDescriptorFlags

(continued from last page)

isSymbolic
public boolean isSymbolic()

Page 652 of 1521


de.intarsys.pdf.font.IdentityCMap

de.intarsys.pdf.font
Class IdentityCMap
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.font.CMap
|
+-de.intarsys.pdf.font.NamedCMap
|
+-de.intarsys.pdf.font.IdentityCMap
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class IdentityCMap


extends NamedCMap

Field Summary
public static SINGLETON

Method Summary
CID getNextCID(byte[] bytes, int offset)

CID lookup(byte[] value)

Fields
SINGLETON
public static de.intarsys.pdf.font.IdentityCMap SINGLETON

Methods
lookup
public CID lookup(byte[] value)

getNextCID
public CID getNextCID(byte[] bytes,
int offset)

Page 653 of 1521


de.intarsys.pdf.font.NamedCMap

de.intarsys.pdf.font
Class NamedCMap
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.font.CMap
|
+-de.intarsys.pdf.font.NamedCMap
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


IdentityCMap

public abstract class NamedCMap


extends CMap

Nested Class Summary


class NamedCMap.MetaClass
NamedCMap.MetaClass

Field Summary
public static final CN_Identity_H

public static final CN_Identity_V

public static final META


The meta class instance

Method Summary
static CMap getSingleton(COSName name)

Fields
CN_Identity_H
public static final de.intarsys.pdf.cos.COSName CN_Identity_H

CN_Identity_V
public static final de.intarsys.pdf.cos.COSName CN_Identity_V

Page 654 of 1521


de.intarsys.pdf.font.NamedCMap

META
public static final de.intarsys.pdf.font.NamedCMap.MetaClass META

The meta class instance

Methods
getSingleton
public static CMap getSingleton(COSName name)

Page 655 of 1521


de.intarsys.pdf.font.NamedCMap.MetaClass

de.intarsys.pdf.font
Class NamedCMap.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.font.CMap.MetaClass
|
+-de.intarsys.pdf.font.NamedCMap.MetaClass

public static class NamedCMap.MetaClass


extends CMap.MetaClass

The meta class implementation

Page 656 of 1521


de.intarsys.pdf.font.NamedGIDMap

de.intarsys.pdf.font
Class NamedGIDMap
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.font.CIDToGIDMap
|
+-de.intarsys.pdf.font.NamedGIDMap
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class NamedGIDMap


extends CIDToGIDMap

Nested Class Summary


class NamedGIDMap.MetaClass
NamedGIDMap.MetaClass

Field Summary
public static final META
The meta class instance

public static SINGLETON

Method Summary
int getGlyphIndex(CID cid)

Fields
SINGLETON
public static de.intarsys.pdf.font.NamedGIDMap SINGLETON

META
public static final de.intarsys.pdf.font.NamedGIDMap.MetaClass META

The meta class instance

Methods

Page 657 of 1521


de.intarsys.pdf.font.NamedGIDMap

(continued from last page)

getGlyphIndex
public int getGlyphIndex(CID cid)

Page 658 of 1521


de.intarsys.pdf.font.NamedGIDMap.MetaClass

de.intarsys.pdf.font
Class NamedGIDMap.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.font.CIDToGIDMap.MetaClass
|
+-de.intarsys.pdf.font.NamedGIDMap.MetaClass

public static class NamedGIDMap.MetaClass


extends CIDToGIDMap.MetaClass

The meta class implementation

Page 659 of 1521


de.intarsys.pdf.font.PDFont

de.intarsys.pdf.font
Class PDFont
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.font.PDFont
All Implemented Interfaces:
IFont, ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


CIDFont, PDFontAny, PDFontTrueType, PDFontType0, PDFontType1, PDFontType3

public abstract class PDFont


extends PDObject
implements IAttributeSupport, ICOSObjectListener, IFont

A PDF font object.

Nested Class Summary


class PDFont.MetaClass
PDFont.MetaClass

Field Summary
public static final CN_Subtype_CIDFontType0

public static final CN_Subtype_CIDFontType2

public static final CN_Subtype_MMType1

public static final CN_Subtype_TrueType

public static final CN_Subtype_Type0

public static final CN_Subtype_Type1

public static final CN_Subtype_Type3

public static final CN_Type_Font

public static final DK_BaseFont

public static final DK_Encoding

public static final DK_FirstChar

Page 660 of 1521


de.intarsys.pdf.font.PDFont

public static final DK_FontDescriptor

public static final DK_LastChar

public static final DK_Name

public static final DK_ToUnicode

public static final DK_Widths

public static final META


The meta class instance

Method Summary
void compress()

COSName getBaseFont()

Encoding getEncoding()
The encoding of the glyphs in the font

int getFirstChar()
The first codepoint defined in the font.

PDFontDescriptor getFontDescriptor()

static String getFontFamilyName(String name)

static String getFontName(String name)


extracts the "name" portion from the given font name string

static FontStyle getFontStyle(String name)


extracts the "style" portion from the given font name

int getGlyphWidth(int codePoint)


return the glyph width of a codepoint in the receiver font

int[] getGlyphWidths()

int getLastChar()

int getMacintoshRomanCode(int codePoint)


This is a special mapping that is used if we have a font on the physical device using a
Macintosh Roman encoding character map.

int getMissingWidth()

abstract CID getNextCID(byte[] bytes, int offset)

CMap getToUnicode()

Page 661 of 1521


de.intarsys.pdf.font.PDFont

abstract float getUnderlinePosition()

abstract int getUnderlineThickness()

int getUnicode(int byteCode)

boolean isCharUsed(int c)

boolean isEmbedded()
Answer true if this font's program is embedded within the document.

boolean isStandardFont()
Answer true if this is one of the 14 standard fonts.

boolean isSubset()
Answer true if this font is partially embedded in the document.

void setBaseFont(String name)

void setCharUsed(int c)

void setEncoding(Encoding newFontEncoding)


set an encoding for the font

void setFontDescriptor(PDFontDescriptor descriptor)

String toString()

Fields
CN_Subtype_CIDFontType0
public static final de.intarsys.pdf.cos.COSName CN_Subtype_CIDFontType0

CN_Subtype_CIDFontType2
public static final de.intarsys.pdf.cos.COSName CN_Subtype_CIDFontType2

CN_Subtype_MMType1
public static final de.intarsys.pdf.cos.COSName CN_Subtype_MMType1

CN_Subtype_TrueType
public static final de.intarsys.pdf.cos.COSName CN_Subtype_TrueType

Page 662 of 1521


de.intarsys.pdf.font.PDFont

CN_Subtype_Type0
public static final de.intarsys.pdf.cos.COSName CN_Subtype_Type0

CN_Subtype_Type1
public static final de.intarsys.pdf.cos.COSName CN_Subtype_Type1

CN_Subtype_Type3
public static final de.intarsys.pdf.cos.COSName CN_Subtype_Type3

CN_Type_Font
public static final de.intarsys.pdf.cos.COSName CN_Type_Font

DK_BaseFont
public static final de.intarsys.pdf.cos.COSName DK_BaseFont

DK_Encoding
public static final de.intarsys.pdf.cos.COSName DK_Encoding

DK_FirstChar
public static final de.intarsys.pdf.cos.COSName DK_FirstChar

DK_FontDescriptor
public static final de.intarsys.pdf.cos.COSName DK_FontDescriptor

DK_LastChar
public static final de.intarsys.pdf.cos.COSName DK_LastChar

DK_ToUnicode
public static final de.intarsys.pdf.cos.COSName DK_ToUnicode

Page 663 of 1521


de.intarsys.pdf.font.PDFont

(continued from last page)

DK_Widths
public static final de.intarsys.pdf.cos.COSName DK_Widths

DK_Name
public static final de.intarsys.pdf.cos.COSName DK_Name

META
public static final de.intarsys.pdf.font.PDFont.MetaClass META

The meta class instance

Methods
getFontFamilyName
public static String getFontFamilyName(String name)

getFontName
public static String getFontName(String name)

extracts the "name" portion from the given font name string

Parameters:
name - a font name

Returns:
font name's "name" portion

getFontStyle
public static FontStyle getFontStyle(String name)

extracts the "style" portion from the given font name

Parameters:
name - a font name

Returns:
font name's "style" portion

compress
public void compress()

Page 664 of 1521


de.intarsys.pdf.font.PDFont

getBaseFont
public COSName getBaseFont()

Returns:
the base font for this font dictionary

getEncoding
public Encoding getEncoding()

The encoding of the glyphs in the font

Returns:
The encoding of the glyphs in the font

getFirstChar
public int getFirstChar()

The first codepoint defined in the font.

Returns:
The first codepoint defined in the font

getFontDescriptor
public PDFontDescriptor getFontDescriptor()

Returns:
the font descriptor object for this font

getGlyphWidth
public int getGlyphWidth(int codePoint)

return the glyph width of a codepoint in the receiver font

Parameters:
codePoint - the index of the glyph in the font

Returns:
the width of the glyph

getGlyphWidths
public int[] getGlyphWidths()

Returns:
the array of defined widths for the font

Page 665 of 1521


de.intarsys.pdf.font.PDFont

getLastChar
public int getLastChar()

Returns:
the last codepoint defined in the font

getMacintoshRomanCode
public int getMacintoshRomanCode(int codePoint)

This is a special mapping that is used if we have a font on the physical device using a Macintosh Roman encoding
character map.

See PDF docs, "Encodings for True Type fonts".

Parameters:
codePoint

Returns:
The unicode value for codePoint

getMissingWidth
public int getMissingWidth()

Returns:
the width we should use for a missing/undefined glyph width

getNextCID
public abstract CID getNextCID(byte[] bytes,
int offset)

getToUnicode
public CMap getToUnicode()

getUnderlinePosition
public abstract float getUnderlinePosition()

getUnderlineThickness
public abstract int getUnderlineThickness()

Page 666 of 1521


de.intarsys.pdf.font.PDFont

getUnicode
public int getUnicode(int byteCode)

isCharUsed
public boolean isCharUsed(int c)

isEmbedded
public boolean isEmbedded()

Answer true if this font's program is embedded within the document.

Returns:
Answer true if this font's program is embedded within the document.

isStandardFont
public boolean isStandardFont()

Answer true if this is one of the 14 standard fonts. TODO 2 implement

Returns:
Answer true if this is one of the 14 standard fonts.

isSubset
public boolean isSubset()

Answer true if this font is partially embedded in the document.

Returns:
Answer true if this font is partially embedded in the document.

setBaseFont
public void setBaseFont(String name)

setCharUsed
public void setCharUsed(int c)

setEncoding
public void setEncoding(Encoding newFontEncoding)

set an encoding for the font

Page 667 of 1521


de.intarsys.pdf.font.PDFont

(continued from last page)

Parameters:
newFontEncoding - the new encoding to use

setFontDescriptor
public void setFontDescriptor(PDFontDescriptor descriptor)

toString
public String toString()

Page 668 of 1521


de.intarsys.pdf.font.PDFont.MetaClass

de.intarsys.pdf.font
Class PDFont.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.font.PDFont.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass, MetaClass, MetaClass, MetaClass, MetaClass

public static class PDFont.MetaClass


extends PDObject.MetaClass

The meta class implementation

Method Summary
Class getRootClass()

Methods
getRootClass
public Class getRootClass()

Page 669 of 1521


de.intarsys.pdf.font.PDFontAny

de.intarsys.pdf.font
Class PDFontAny
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.font.PDFont
|
+-de.intarsys.pdf.font.PDFontAny
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IFont

public class PDFontAny


extends PDFont

Nested Class Summary


class PDFontAny.MetaClass
PDFontAny.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
String getFontFamilyName()

String getFontName()

FontStyle getFontStyle()

CID getNextCID(byte[] bytes, int offset)

float getUnderlinePosition()

int getUnderlineThickness()

Fields
META
public static final de.intarsys.pdf.font.PDFontAny.MetaClass META

The meta class instance

Page 670 of 1521


de.intarsys.pdf.font.PDFontAny

Methods
getFontFamilyName
public String getFontFamilyName()

getFontName
public String getFontName()

getFontStyle
public FontStyle getFontStyle()

getUnderlinePosition
public float getUnderlinePosition()

getUnderlineThickness
public int getUnderlineThickness()

getNextCID
public CID getNextCID(byte[] bytes,
int offset)

Page 671 of 1521


de.intarsys.pdf.font.PDFontAny.MetaClass

de.intarsys.pdf.font
Class PDFontAny.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.font.PDFont.MetaClass
|
+-de.intarsys.pdf.font.PDFontAny.MetaClass

public static class PDFontAny.MetaClass


extends PDFont.MetaClass

The meta class implementation

Page 672 of 1521


de.intarsys.pdf.font.PDFontDescriptor

de.intarsys.pdf.font
Class PDFontDescriptor
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.font.PDFontDescriptor
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


PDFontDescriptorEmbedded, PDFontDescriptorType1

public abstract class PDFontDescriptor


extends PDObject

the detail information about a font.

Nested Class Summary


class PDFontDescriptor.MetaClass
PDFontDescriptor.MetaClass

Field Summary
public static final CN_Type_FontDescriptor

public static final META


The meta class instance

Method Summary
abstract float getAscent()
The font ascent.

abstract float getAvgWidth()


The font average width.

abstract float getCapHeight()


The font capital height.

abstract float getDescent()


The font descent.

FontDescriptorFlags getFlags()

abstract int getFlagsValue()


The font flags.

abstract CDSRectangle getFontBB()


The character enclosing rectangle.

Page 673 of 1521


de.intarsys.pdf.font.PDFontDescriptor

abstract String getFontFamily()


The font family name.

byte[] getFontFile()

byte[] getFontFile2()

byte[] getFontFile3()

abstract String getFontName()


The font name.

abstract float getItalicAngle()


The font italic angle.

abstract int getLeading()


The font leading.

abstract int getMaxWidth()


The font character maximal width.

abstract int getMissingWidth()


The width to use when definition is missing.

abstract int getStemH()


The font horizontal stem.

abstract int getStemV()


The font vertical stem.

abstract float getXHeight()


The height of "X".

boolean isAllCap()

boolean isFixedPitch()

boolean isForceBold()

boolean isItalic()

boolean isNonsymbolic()

boolean isScript()

boolean isSerif()

boolean isSmallCap()

boolean isSymbolic()

void setAllCap(boolean flag)

Page 674 of 1521


de.intarsys.pdf.font.PDFontDescriptor

void setFixedPitch(boolean flag)

abstract void setFlagsValue(int value)

void setForceBold(boolean flag)

void setItalic(boolean flag)

void setNonsymbolic(boolean flag)

void setScript(boolean flag)

void setSerif(boolean flag)

void setSmallCap(boolean flag)

void setSymbolic(boolean flag)

Fields
META
public static final de.intarsys.pdf.font.PDFontDescriptor.MetaClass META

The meta class instance

CN_Type_FontDescriptor
public static final de.intarsys.pdf.cos.COSName CN_Type_FontDescriptor

Methods
isAllCap
public boolean isAllCap()

isFixedPitch
public boolean isFixedPitch()

isForceBold
public boolean isForceBold()

Page 675 of 1521


de.intarsys.pdf.font.PDFontDescriptor

isItalic
public boolean isItalic()

isNonsymbolic
public boolean isNonsymbolic()

isScript
public boolean isScript()

isSerif
public boolean isSerif()

isSmallCap
public boolean isSmallCap()

isSymbolic
public boolean isSymbolic()

setAllCap
public void setAllCap(boolean flag)

setFixedPitch
public void setFixedPitch(boolean flag)

setForceBold
public void setForceBold(boolean flag)

setItalic
public void setItalic(boolean flag)

Page 676 of 1521


de.intarsys.pdf.font.PDFontDescriptor

(continued from last page)

setNonsymbolic
public void setNonsymbolic(boolean flag)

setScript
public void setScript(boolean flag)

setSerif
public void setSerif(boolean flag)

setSmallCap
public void setSmallCap(boolean flag)

setSymbolic
public void setSymbolic(boolean flag)

getAscent
public abstract float getAscent()

The font ascent.

Returns:
The font ascent.

getAvgWidth
public abstract float getAvgWidth()

The font average width.

Returns:
The font average width.

getCapHeight
public abstract float getCapHeight()

The font capital height.

Returns:
The capital height.

Page 677 of 1521


de.intarsys.pdf.font.PDFontDescriptor

getDescent
public abstract float getDescent()

The font descent.

Returns:
The font descent.

getFlagsValue
public abstract int getFlagsValue()

The font flags.

Returns:
The font flags.

setFlagsValue
public abstract void setFlagsValue(int value)

getFontBB
public abstract CDSRectangle getFontBB()

The character enclosing rectangle.

Returns:
The character enclosing rectangle.

getFontFamily
public abstract String getFontFamily()

The font family name.

Returns:
The font name.

getFontName
public abstract String getFontName()

The font name.

Returns:
The font name.

getItalicAngle
public abstract float getItalicAngle()

The font italic angle.

Page 678 of 1521


de.intarsys.pdf.font.PDFontDescriptor

(continued from last page)

Returns:
The font italic angle.

getLeading
public abstract int getLeading()

The font leading.

Returns:
The font leading.

getMaxWidth
public abstract int getMaxWidth()

The font character maximal width.

Returns:
The font character maximal width.

getMissingWidth
public abstract int getMissingWidth()

The width to use when definition is missing.

Returns:
The width to use when definition is missing.

getStemH
public abstract int getStemH()

The font horizontal stem.

Returns:
The font horizontal stem.

getStemV
public abstract int getStemV()

The font vertical stem.

Returns:
The font vertical stem.

getXHeight
public abstract float getXHeight()

The height of "X".

Returns:
The height of "X".

Page 679 of 1521


de.intarsys.pdf.font.PDFontDescriptor

(continued from last page)

getFontFile
public byte[] getFontFile()

getFontFile2
public byte[] getFontFile2()

getFontFile3
public byte[] getFontFile3()

getFlags
public FontDescriptorFlags getFlags()

Page 680 of 1521


de.intarsys.pdf.font.PDFontDescriptor.MetaClass

de.intarsys.pdf.font
Class PDFontDescriptor.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.font.PDFontDescriptor.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass

public static class PDFontDescriptor.MetaClass


extends PDObject.MetaClass

The meta class implementation

Method Summary
Class getRootClass()

Methods
getRootClass
public Class getRootClass()

Page 681 of 1521


de.intarsys.pdf.font.PDFontDescriptorEmbedded

de.intarsys.pdf.font
Class PDFontDescriptorEmbedded
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.font.PDFontDescriptor
|
+-de.intarsys.pdf.font.PDFontDescriptorEmbedded
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDFontDescriptorEmbedded


extends PDFontDescriptor

The PDFontDescriptor that is used when an explicit font descriptor is available in the pdf file. This will happen most of the time,
only the builtin fonts MAY discard this object.

Nested Class Summary


class PDFontDescriptorEmbedded.MetaClass
PDFontDescriptorEmbedded.MetaClass

Field Summary
public static final DK_Ascent

public static final DK_AvgWidth

public static final DK_CapHeight

public static final DK_Descent

public static final DK_Flags

public static final DK_FontBBox

public static final DK_FontFamily

public static final DK_FontFile

public static final DK_FontFile2

public static final DK_FontFile3

public static final DK_FontName

Page 682 of 1521


de.intarsys.pdf.font.PDFontDescriptorEmbedded

public static final DK_ItalicAngle

public static final DK_Leading

public static final DK_Length1

public static final DK_Length2

public static final DK_Length3

public static final DK_MaxWidth

public static final DK_MissingWidth

public static final DK_StemH

public static final DK_StemV

public static final DK_XHeight

public static final META


The meta class instance

Method Summary
float getAscent()

float getAvgWidth()

float getCapHeight()

float getDescent()

int getFlagsValue()

CDSRectangle getFontBB()

String getFontFamily()

byte[] getFontFile()

byte[] getFontFile2()

byte[] getFontFile3()

String getFontName()

float getItalicAngle()

Page 683 of 1521


de.intarsys.pdf.font.PDFontDescriptorEmbedded

int getLeading()

int getMaxWidth()

int getMissingWidth()

int getStemH()

int getStemV()

float getXHeight()

void removeFontFile2()

void setAscent(int value)

void setAvgWidth(int value)

void setCapHeight(int value)

void setDescent(int value)

void setFlags(int value)

void setFlagsValue(int value)

void setFontBB(CDSRectangle rect)

void setFontFamily(String value)

void setFontFile(byte[] data)


This is the type 1 fontfile stream It will try to parse the input, which must be a pfb file.

void setFontFile2(byte[] data)

void setFontFile3(byte[] data)

void setFontName(String value)

void setItalicAngle(float value)

void setLeading(int value)

void setMaxWidth(int value)

void setMissingWidth(int value)

void setStemH(int value)

Page 684 of 1521


de.intarsys.pdf.font.PDFontDescriptorEmbedded

void setStemV(int value)

void setXHeight(int value)

Fields
META
public static final de.intarsys.pdf.font.PDFontDescriptorEmbedded.MetaClass META

The meta class instance

DK_Descent
public static final de.intarsys.pdf.cos.COSName DK_Descent

DK_CapHeight
public static final de.intarsys.pdf.cos.COSName DK_CapHeight

DK_AvgWidth
public static final de.intarsys.pdf.cos.COSName DK_AvgWidth

DK_Ascent
public static final de.intarsys.pdf.cos.COSName DK_Ascent

DK_XHeight
public static final de.intarsys.pdf.cos.COSName DK_XHeight

DK_StemV
public static final de.intarsys.pdf.cos.COSName DK_StemV

DK_StemH
public static final de.intarsys.pdf.cos.COSName DK_StemH

Page 685 of 1521


de.intarsys.pdf.font.PDFontDescriptorEmbedded

DK_MissingWidth
public static final de.intarsys.pdf.cos.COSName DK_MissingWidth

DK_MaxWidth
public static final de.intarsys.pdf.cos.COSName DK_MaxWidth

DK_Leading
public static final de.intarsys.pdf.cos.COSName DK_Leading

DK_ItalicAngle
public static final de.intarsys.pdf.cos.COSName DK_ItalicAngle

DK_FontName
public static final de.intarsys.pdf.cos.COSName DK_FontName

DK_FontBBox
public static final de.intarsys.pdf.cos.COSName DK_FontBBox

DK_Flags
public static final de.intarsys.pdf.cos.COSName DK_Flags

DK_FontFile
public static final de.intarsys.pdf.cos.COSName DK_FontFile

DK_FontFile2
public static final de.intarsys.pdf.cos.COSName DK_FontFile2

DK_FontFile3
public static final de.intarsys.pdf.cos.COSName DK_FontFile3

Page 686 of 1521


de.intarsys.pdf.font.PDFontDescriptorEmbedded

(continued from last page)

DK_Length1
public static final de.intarsys.pdf.cos.COSName DK_Length1

DK_Length2
public static final de.intarsys.pdf.cos.COSName DK_Length2

DK_Length3
public static final de.intarsys.pdf.cos.COSName DK_Length3

DK_FontFamily
public static final de.intarsys.pdf.cos.COSName DK_FontFamily

Methods
setAscent
public void setAscent(int value)

getAscent
public float getAscent()

The font ascent.

setAvgWidth
public void setAvgWidth(int value)

getAvgWidth
public float getAvgWidth()

The font average width.

setCapHeight
public void setCapHeight(int value)

Page 687 of 1521


de.intarsys.pdf.font.PDFontDescriptorEmbedded

getCapHeight
public float getCapHeight()

The font capital height.

setDescent
public void setDescent(int value)

getDescent
public float getDescent()

The font descent.

setFlags
public void setFlags(int value)

getFlagsValue
public int getFlagsValue()

The font flags.

setFlagsValue
public void setFlagsValue(int value)

setFontBB
public void setFontBB(CDSRectangle rect)

getFontBB
public CDSRectangle getFontBB()

The character enclosing rectangle.

setFontFamily
public void setFontFamily(String value)

getFontFamily
public String getFontFamily()

Page 688 of 1521


de.intarsys.pdf.font.PDFontDescriptorEmbedded

(continued from last page)

The font family name.

getFontFile
public byte[] getFontFile()

setFontFile
public void setFontFile(byte[] data)

This is the type 1 fontfile stream It will try to parse the input, which must be a pfb file. Upon parsing, the keys length1,
length2 and length3 will be determined. todo 2 Metadata key not supported

setFontFile2
public void setFontFile2(byte[] data)

getFontFile2
public byte[] getFontFile2()

setFontFile3
public void setFontFile3(byte[] data)

getFontFile3
public byte[] getFontFile3()

setFontName
public void setFontName(String value)

getFontName
public String getFontName()

The font name.

setItalicAngle
public void setItalicAngle(float value)

Page 689 of 1521


de.intarsys.pdf.font.PDFontDescriptorEmbedded

(continued from last page)

getItalicAngle
public float getItalicAngle()

The font italic angle.

setLeading
public void setLeading(int value)

getLeading
public int getLeading()

The font leading.

setMaxWidth
public void setMaxWidth(int value)

getMaxWidth
public int getMaxWidth()

The font character maximal width.

setMissingWidth
public void setMissingWidth(int value)

getMissingWidth
public int getMissingWidth()

The width to use when definition is missing.

setStemH
public void setStemH(int value)

getStemH
public int getStemH()

The font horizontal stem.

setStemV
public void setStemV(int value)

Page 690 of 1521


de.intarsys.pdf.font.PDFontDescriptorEmbedded

(continued from last page)

getStemV
public int getStemV()

The font vertical stem.

setXHeight
public void setXHeight(int value)

getXHeight
public float getXHeight()

The height of "X".

removeFontFile2
public void removeFontFile2()

Page 691 of 1521


de.intarsys.pdf.font.PDFontDescriptorEmbedded.MetaClass

de.intarsys.pdf.font
Class PDFontDescriptorEmbedded.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.font.PDFontDescriptor.MetaClass
|
+-de.intarsys.pdf.font.PDFontDescriptorEmbedded.MetaClass

public static class PDFontDescriptorEmbedded.MetaClass


extends PDFontDescriptor.MetaClass

The meta class implementation

Page 692 of 1521


de.intarsys.pdf.font.PDFontDescriptorType1

de.intarsys.pdf.font
Class PDFontDescriptorType1
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.font.PDFontDescriptor
|
+-de.intarsys.pdf.font.PDFontDescriptorType1
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDFontDescriptorType1


extends PDFontDescriptor

the PDFontDescriptor that is used when no explicit font descriptor is available in the pdf file. this will happen only when a builtin
font is used

Nested Class Summary


class PDFontDescriptorType1.MetaClass
PDFontDescriptorType1.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
float getAscent()

float getAvgWidth()

float getCapHeight()

float getDescent()

int getFlagsValue()

PDFontType1 getFont()

CDSRectangle getFontBB()

String getFontFamily()

String getFontName()

Page 693 of 1521


de.intarsys.pdf.font.PDFontDescriptorType1

float getItalicAngle()

int getLeading()

int getMaxWidth()

int getMissingWidth()

int getStemH()

int getStemV()

float getXHeight()

boolean isNonsymbolic()

boolean isSymbolic()

void setFlagsValue(int value)

Fields
META
public static final de.intarsys.pdf.font.PDFontDescriptorType1.MetaClass META

The meta class instance

Methods
getAscent
public float getAscent()

The font ascent.

getAvgWidth
public float getAvgWidth()

The font average width.

getCapHeight
public float getCapHeight()

The font capital height.

getDescent
public float getDescent()

Page 694 of 1521


de.intarsys.pdf.font.PDFontDescriptorType1

(continued from last page)

The font descent.

getFlagsValue
public int getFlagsValue()

The font flags.

setFlagsValue
public void setFlagsValue(int value)

getFont
public PDFontType1 getFont()

getFontBB
public CDSRectangle getFontBB()

The character enclosing rectangle.

getFontFamily
public String getFontFamily()

The font family name.

getFontName
public String getFontName()

The font name.

getItalicAngle
public float getItalicAngle()

The font italic angle.

getLeading
public int getLeading()

The font leading.

getMaxWidth
public int getMaxWidth()

The font character maximal width.

Page 695 of 1521


de.intarsys.pdf.font.PDFontDescriptorType1

(continued from last page)

getMissingWidth
public int getMissingWidth()

The width to use when definition is missing.

getStemH
public int getStemH()

The font horizontal stem.

getStemV
public int getStemV()

The font vertical stem.

getXHeight
public float getXHeight()

The height of "X".

isSymbolic
public boolean isSymbolic()

isNonsymbolic
public boolean isNonsymbolic()

Page 696 of 1521


de.intarsys.pdf.font.PDFontDescriptorType1.MetaClass

de.intarsys.pdf.font
Class PDFontDescriptorType1.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.font.PDFontDescriptor.MetaClass
|
+-de.intarsys.pdf.font.PDFontDescriptorType1.MetaClass

public static class PDFontDescriptorType1.MetaClass


extends PDFontDescriptor.MetaClass

The meta class implementation

Page 697 of 1521


de.intarsys.pdf.font.PDFontMMType1

de.intarsys.pdf.font
Class PDFontMMType1
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.font.PDFont
|
+-de.intarsys.pdf.font.PDFontType1
|
+-de.intarsys.pdf.font.PDFontMMType1
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IFont, IFont

public class PDFontMMType1


extends PDFontType1

The implementation of a multiple master type 1 font.

Nested Class Summary


class PDFontMMType1.MetaClass
PDFontMMType1.MetaClass

Field Summary
public static final META
The meta class instance

Fields
META
public static final de.intarsys.pdf.font.PDFontMMType1.MetaClass META

The meta class instance

Page 698 of 1521


de.intarsys.pdf.font.PDFontMMType1.MetaClass

de.intarsys.pdf.font
Class PDFontMMType1.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.font.PDFont.MetaClass
|
+-de.intarsys.pdf.font.PDFontType1.MetaClass
|
+-de.intarsys.pdf.font.PDFontMMType1.MetaClass

public static class PDFontMMType1.MetaClass


extends PDFontType1.MetaClass

The meta class implementation

Page 699 of 1521


de.intarsys.pdf.font.PDFontTools

de.intarsys.pdf.font
Class PDFontTools
java.lang.Object
|
+-de.intarsys.pdf.font.PDFontTools

public class PDFontTools


extends Object

Tool class for handling PDF fonts.

For more sophisticated help, see IFontOutlet.

Constructor Summary
public PDFontTools()

Method Summary
static PDFont getFont(PDDocument document, PDResources resources, COSName name)
The font name, looked up in resources.

static PDFont getFont(PDResources resources, COSName name)


The font name, looked up in resources.

static java.util.List getFonts(PDDocument doc)


Determine the fonts contained as objects within the document.

static float getGlyphHeight(PDFont font)


The font height in user space coordinates.

static float getGlyphHeightScaled(PDFont font, float size)


The scaled font height in user space coordinates.

static int getGlyphWidth(PDFont font, byte[] codepoints, int offset, int length)
The sum of the length of all glyphs referenced by length bytes from codepoints starting
at offset.

static float getGlyphWidthScaled(PDFont font, float size, byte[] codepoints, int


offset, int length)
The scaled sum of the length of all glyphs referenced by length bytes from codepoints
starting at offset.

static float getGlyphWidthScaled(PDFont font, float size, int codepoint)


The scaled width of the glyphs referenced by codepoint .

static java.util.List getUsedFonts(PDDocument doc, boolean considerTR)


Tries to determine which fonts are really used within the document The following criteria
are used to determine usage of a font.

Constructors

Page 700 of 1521


de.intarsys.pdf.font.PDFontTools

(continued from last page)

PDFontTools
public PDFontTools()

Methods
getFont
public static PDFont getFont(PDDocument document,
PDResources resources,
COSName name)

The font name, looked up in resources.

When no matching resource is found, a builtin font is created on the fly.

Parameters:
document
resources
name

Returns:
The font name, looked up in resources.

getFont
public static PDFont getFont(PDResources resources,
COSName name)

The font name, looked up in resources.

Parameters:
resources
name

Returns:
The font name, looked up in resources.

getUsedFonts
public static java.util.List getUsedFonts(PDDocument doc,
boolean considerTR)
Tries to determine which fonts are really used within the document The following criteria are used to determine usage of a
font.

• Any glyph of the font is referenced in


• the Contents stream of a page object
• the stream of a Form XObject
• the appearance stream of an annotation, including form fields
• the content stream of a Type 3 font glyph
• the stream of a tiling pattern

Parameters:
doc - The PDDocument to parse

Page 701 of 1521


de.intarsys.pdf.font.PDFontTools

(continued from last page)

considerTR - If true, considers font references with Text rendering mode 3 as unused

Returns:
Set of all used fonts

getGlyphHeightScaled
public static float getGlyphHeightScaled(PDFont font,
float size)

The scaled font height in user space coordinates.

Parameters:
font - The font to be used.
size - The font size

Returns:
The scaled font height in user space coordinates.

getGlyphHeight
public static float getGlyphHeight(PDFont font)

The font height in user space coordinates.

Parameters:
font - The font to be used.
size - The font size

Returns:
The scaled font height in user space coordinates.

getGlyphWidth
public static int getGlyphWidth(PDFont font,
byte[] codepoints,
int offset,
int length)

The sum of the length of all glyphs referenced by length bytes from codepoints starting at offset.

Parameters:
font
codepoints
offset
length

Returns:
The sum of the length of all glyphs referenced by length bytes from codepoints starting at offset.

getGlyphWidthScaled
public static float getGlyphWidthScaled(PDFont font,
float size,
byte[] codepoints,
int offset,
int length)

The scaled sum of the length of all glyphs referenced by length bytes from codepoints starting at offset.

Page 702 of 1521


de.intarsys.pdf.font.PDFontTools

(continued from last page)

Parameters:
font
size
codepoints
offset
length

Returns:
The scaled sum of the length of all glyphs referenced by length bytes from codepoints starting at offset.

getGlyphWidthScaled
public static float getGlyphWidthScaled(PDFont font,
float size,
int codepoint)

The scaled width of the glyphs referenced by codepoint .

Parameters:
font
size
codepoint

Returns:
The scaled sum of the length of all glyphs referenced by length bytes from codepoints starting at offset.

getFonts
public static java.util.List getFonts(PDDocument doc)

Determine the fonts contained as objects within the document.

Parameters:
doc - The PDDocument to parse

Returns:
Collection of all PDFont objects in the document.

Page 703 of 1521


de.intarsys.pdf.font.PDFontTrueType

de.intarsys.pdf.font
Class PDFontTrueType
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.font.PDFont
|
+-de.intarsys.pdf.font.PDFontTrueType
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IFont

public class PDFontTrueType


extends PDFont

basic implementation for true type support

todo 2 review initialization (sequence problems)

Nested Class Summary


class PDFontTrueType.MetaClass
PDFontTrueType.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
void compress()

static PDFontTrueType createNew(TTFont ttFont)


create a TrueType font object to be used in the pdf document

void embedFontProgramm()

String getFontFamilyName()

static String getFontFamilyName(String name)

String getFontName()

FontStyle getFontStyle()

static FontStyle getFontStyle(String name)

Page 704 of 1521


de.intarsys.pdf.font.PDFontTrueType

CID getNextCID(byte[] bytes, int offset)

TTFont getTTFont()

int getTTGlyphWidth(int codePoint)


returns the glyph width from the TT font with units and cmap to glyph indexing resolved

float getUnderlinePosition()

int getUnderlineThickness()

void initializeFromScratchFontDescriptor()

void removeFontProgramm()

void setTTFont(TTFont font)

Fields
META
public static final de.intarsys.pdf.font.PDFontTrueType.MetaClass META

The meta class instance

Methods
getFontFamilyName
public static String getFontFamilyName(String name)

getFontStyle
public static FontStyle getFontStyle(String name)

createNew
public static PDFontTrueType createNew(TTFont ttFont)

create a TrueType font object to be used in the pdf document

Parameters:
ttFont - the baseFontName of the font to use

Returns:
the new font created

Page 705 of 1521


de.intarsys.pdf.font.PDFontTrueType

(continued from last page)

getFontFamilyName
public String getFontFamilyName()

getFontName
public String getFontName()

getFontStyle
public FontStyle getFontStyle()

getNextCID
public CID getNextCID(byte[] bytes,
int offset)

getUnderlinePosition
public float getUnderlinePosition()

getUnderlineThickness
public int getUnderlineThickness()

getTTGlyphWidth
public int getTTGlyphWidth(int codePoint)

returns the glyph width from the TT font with units and cmap to glyph indexing resolved

compress
public void compress()

embedFontProgramm
public void embedFontProgramm()

removeFontProgramm
public void removeFontProgramm()

Page 706 of 1521


de.intarsys.pdf.font.PDFontTrueType

(continued from last page)

setTTFont
public void setTTFont(TTFont font)

getTTFont
public TTFont getTTFont()

initializeFromScratchFontDescriptor
public void initializeFromScratchFontDescriptor()

Page 707 of 1521


de.intarsys.pdf.font.PDFontTrueType.MetaClass

de.intarsys.pdf.font
Class PDFontTrueType.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.font.PDFont.MetaClass
|
+-de.intarsys.pdf.font.PDFontTrueType.MetaClass

public static class PDFontTrueType.MetaClass


extends PDFont.MetaClass

The meta class implementation

Page 708 of 1521


de.intarsys.pdf.font.PDFontType0

de.intarsys.pdf.font
Class PDFontType0
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.font.PDFont
|
+-de.intarsys.pdf.font.PDFontType0
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IFont

public class PDFontType0


extends PDFont

Nested Class Summary


class PDFontType0.MetaClass
PDFontType0.MetaClass

Field Summary
public static final DK_DescendantFonts

public static final META


The meta class instance

Constructor Summary
public PDFontType0(COSObject object)

Method Summary
CMap getCMap()

CIDFont getDescendantFont()

PDFontDescriptor getFontDescriptor()

String getFontFamilyName()

String getFontName()

FontStyle getFontStyle()

int getGlyphIndex(CID cid)

Page 709 of 1521


de.intarsys.pdf.font.PDFontType0

int getGlyphWidth(int codePoint)

CID getNextCID(byte[] bytes, int offset)

float getUnderlinePosition()

int getUnderlineThickness()

Fields
DK_DescendantFonts
public static final de.intarsys.pdf.cos.COSName DK_DescendantFonts

META
public static final de.intarsys.pdf.font.PDFontType0.MetaClass META

The meta class instance

Constructors
PDFontType0
public PDFontType0(COSObject object)

Methods
getCMap
public CMap getCMap()

getDescendantFont
public CIDFont getDescendantFont()

getFontDescriptor
public PDFontDescriptor getFontDescriptor()

getFontFamilyName
public String getFontFamilyName()

Page 710 of 1521


de.intarsys.pdf.font.PDFontType0

(continued from last page)

getFontName
public String getFontName()

getFontStyle
public FontStyle getFontStyle()

getGlyphWidth
public int getGlyphWidth(int codePoint)

return the glyph width of a codepoint in the receiver font

getNextCID
public CID getNextCID(byte[] bytes,
int offset)

getUnderlinePosition
public float getUnderlinePosition()

getUnderlineThickness
public int getUnderlineThickness()

getGlyphIndex
public int getGlyphIndex(CID cid)

Page 711 of 1521


de.intarsys.pdf.font.PDFontType0.MetaClass

de.intarsys.pdf.font
Class PDFontType0.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.font.PDFont.MetaClass
|
+-de.intarsys.pdf.font.PDFontType0.MetaClass

public static class PDFontType0.MetaClass


extends PDFont.MetaClass

The meta class implementation

Page 712 of 1521


de.intarsys.pdf.font.PDFontType1

de.intarsys.pdf.font
Class PDFontType1
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.font.PDFont
|
+-de.intarsys.pdf.font.PDFontType1
All Implemented Interfaces:
IFont, ICOSObjectListener, IAttributeSupport, IFont

Direct Known Subclasses:


PDFontMMType1

public class PDFontType1


extends PDFont
implements IFont, IAttributeSupport, ICOSObjectListener, IFont

basic implementation for type 1 support

Nested Class Summary


class PDFontType1.MetaClass
PDFontType1.MetaClass

Field Summary
public static FONT_Courier

public static FONT_Courier_Bold

public static FONT_Courier_BoldOblique

public static FONT_Courier_Oblique

public static FONT_Helvetica

public static FONT_Helvetica_Bold

public static FONT_Helvetica_BoldOblique

public static FONT_Helvetica_Oblique

public static FONT_Symbol

public static FONT_Times_Bold

Page 713 of 1521


de.intarsys.pdf.font.PDFontType1

public static FONT_Times_BoldItalic

public static FONT_Times_Italic

public static FONT_Times_Roman

public static FONT_ZapfDingbats

public static final FontAlternatives


Map of known alternative names for the builtin fonts

public static final FONTS_STANDARD

public static final META


The meta class instance

Method Summary
static PDFontType1 createNew(AFM afm)
Create a Type1 font from an existing AFM definition.

static PDFontType1 createNew(String name)


create a Type1 font object to be used in the pdf document

void embedFontProgram(java.io.InputStream is)

AFM getAfm()

String getFontFamilyName()

String getFontName()

FontStyle getFontStyle()

CID getNextCID(byte[] bytes, int offset)

float getUnderlinePosition()

int getUnderlineThickness()

void initializeFromScratchFontDescriptor()

boolean isStandardFont()

void setAfm(AFM afm)

Fields

Page 714 of 1521


de.intarsys.pdf.font.PDFontType1

(continued from last page)

FontAlternatives
public static final java.util.Map FontAlternatives

Map of known alternative names for the builtin fonts

FONT_Courier
public static java.lang.String FONT_Courier

FONT_Courier_Bold
public static java.lang.String FONT_Courier_Bold

FONT_Courier_BoldOblique
public static java.lang.String FONT_Courier_BoldOblique

FONT_Courier_Oblique
public static java.lang.String FONT_Courier_Oblique

FONT_Helvetica
public static java.lang.String FONT_Helvetica

FONT_Helvetica_Bold
public static java.lang.String FONT_Helvetica_Bold

FONT_Helvetica_BoldOblique
public static java.lang.String FONT_Helvetica_BoldOblique

FONT_Helvetica_Oblique
public static java.lang.String FONT_Helvetica_Oblique

FONT_Symbol
public static java.lang.String FONT_Symbol

Page 715 of 1521


de.intarsys.pdf.font.PDFontType1

(continued from last page)

FONT_Times_Bold
public static java.lang.String FONT_Times_Bold

FONT_Times_BoldItalic
public static java.lang.String FONT_Times_BoldItalic

FONT_Times_Italic
public static java.lang.String FONT_Times_Italic

FONT_Times_Roman
public static java.lang.String FONT_Times_Roman

FONT_ZapfDingbats
public static java.lang.String FONT_ZapfDingbats

FONTS_STANDARD
public static final java.lang.String FONTS_STANDARD

META
public static final de.intarsys.pdf.font.PDFontType1.MetaClass META

The meta class instance

Methods
createNew
public static PDFontType1 createNew(AFM afm)

Create a Type1 font from an existing AFM definition.

Parameters:
afm - the AFM font definition structure.

Returns:
the new font created

Page 716 of 1521


de.intarsys.pdf.font.PDFontType1

createNew
public static PDFontType1 createNew(String name)

create a Type1 font object to be used in the pdf document

Parameters:
name - the name of the font to use

Returns:
the new font created

embedFontProgram
public void embedFontProgram(java.io.InputStream is)

getAfm
public AFM getAfm()

getFontFamilyName
public String getFontFamilyName()

getFontName
public String getFontName()

getFontStyle
public FontStyle getFontStyle()

getNextCID
public CID getNextCID(byte[] bytes,
int offset)

getUnderlinePosition
public float getUnderlinePosition()

Page 717 of 1521


de.intarsys.pdf.font.PDFontType1

(continued from last page)

getUnderlineThickness
public int getUnderlineThickness()

initializeFromScratchFontDescriptor
public void initializeFromScratchFontDescriptor()

isStandardFont
public boolean isStandardFont()

Answer true if this is one of the 14 standard fonts. TODO 2 implement

setAfm
public void setAfm(AFM afm)

Page 718 of 1521


de.intarsys.pdf.font.PDFontType1.MetaClass

de.intarsys.pdf.font
Class PDFontType1.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.font.PDFont.MetaClass
|
+-de.intarsys.pdf.font.PDFontType1.MetaClass
Direct Known Subclasses:
MetaClass

public static class PDFontType1.MetaClass


extends PDFont.MetaClass

The meta class implementation

Page 719 of 1521


de.intarsys.pdf.font.PDFontType3

de.intarsys.pdf.font
Class PDFontType3
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.font.PDFont
|
+-de.intarsys.pdf.font.PDFontType3
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IFont

public class PDFontType3


extends PDFont

Nested Class Summary


class PDFontType3.MetaClass
PDFontType3.MetaClass

Field Summary
public static final DK_CharProcs

public static final DK_FontBBox

public static final DK_FontMatrix

public static final DK_Resources

public static final DK_ToUnicode

public static final META


The meta class instance

Constructor Summary
public PDFontType3(COSObject object)

Method Summary
COSDictionary cosGetCharProcs()

COSDictionary cosSetCharProcs(COSDictionary newDict)

String getFontFamilyName()

Page 720 of 1521


de.intarsys.pdf.font.PDFontType3

CDSMatrix getFontMatrix()

String getFontName()

FontStyle getFontStyle()

CID getNextCID(byte[] bytes, int offset)

float getUnderlinePosition()

int getUnderlineThickness()

boolean isEmbedded()

boolean isSubset()

void setMatrix(CDSMatrix fontMatrix)

String toString()

Fields
DK_FontBBox
public static final de.intarsys.pdf.cos.COSName DK_FontBBox

DK_FontMatrix
public static final de.intarsys.pdf.cos.COSName DK_FontMatrix

DK_CharProcs
public static final de.intarsys.pdf.cos.COSName DK_CharProcs

DK_Resources
public static final de.intarsys.pdf.cos.COSName DK_Resources

DK_ToUnicode
public static final de.intarsys.pdf.cos.COSName DK_ToUnicode

Page 721 of 1521


de.intarsys.pdf.font.PDFontType3

META
public static final de.intarsys.pdf.font.PDFontType3.MetaClass META

The meta class instance

Constructors
PDFontType3
public PDFontType3(COSObject object)

Parameters:
object

Methods
getUnderlinePosition
public float getUnderlinePosition()

getUnderlineThickness
public int getUnderlineThickness()

getFontFamilyName
public String getFontFamilyName()

getFontName
public String getFontName()

getFontStyle
public FontStyle getFontStyle()

isEmbedded
public boolean isEmbedded()

Answer true if this font's program is embedded within the document.

Page 722 of 1521


de.intarsys.pdf.font.PDFontType3

(continued from last page)

isSubset
public boolean isSubset()

Answer true if this font is partially embedded in the document.

toString
public String toString()

getNextCID
public CID getNextCID(byte[] bytes,
int offset)

cosGetCharProcs
public COSDictionary cosGetCharProcs()

cosSetCharProcs
public COSDictionary cosSetCharProcs(COSDictionary newDict)

getFontMatrix
public CDSMatrix getFontMatrix()

setMatrix
public void setMatrix(CDSMatrix fontMatrix)

Page 723 of 1521


de.intarsys.pdf.font.PDFontType3.MetaClass

de.intarsys.pdf.font
Class PDFontType3.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.font.PDFont.MetaClass
|
+-de.intarsys.pdf.font.PDFontType3.MetaClass

public static class PDFontType3.MetaClass


extends PDFont.MetaClass

The meta class implementation

Page 724 of 1521


de.intarsys.pdf.font.StreamBasedCMap

de.intarsys.pdf.font
Class StreamBasedCMap
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.font.CMap
|
+-de.intarsys.pdf.font.StreamBasedCMap
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class StreamBasedCMap


extends CMap

Nested Class Summary


class StreamBasedCMap.MetaClass
StreamBasedCMap.MetaClass

Field Summary
public static final DK_CIDSystemInfo

public static final DK_CMapName

public static final DK_UseCMap

public static final DK_WMode

public static final META


The meta class instance

Method Summary
CID getNextCID(byte[] bytes, int offset)

CID lookup(byte[] value)

Fields
META
public static final de.intarsys.pdf.font.StreamBasedCMap.MetaClass META

The meta class instance

Page 725 of 1521


de.intarsys.pdf.font.StreamBasedCMap

DK_CMapName
public static final de.intarsys.pdf.cos.COSName DK_CMapName

DK_CIDSystemInfo
public static final de.intarsys.pdf.cos.COSName DK_CIDSystemInfo

DK_WMode
public static final de.intarsys.pdf.cos.COSName DK_WMode

DK_UseCMap
public static final de.intarsys.pdf.cos.COSName DK_UseCMap

Methods
lookup
public CID lookup(byte[] value)

getNextCID
public CID getNextCID(byte[] bytes,
int offset)

Page 726 of 1521


de.intarsys.pdf.font.StreamBasedCMap.MetaClass

de.intarsys.pdf.font
Class StreamBasedCMap.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.font.CMap.MetaClass
|
+-de.intarsys.pdf.font.StreamBasedCMap.MetaClass

public static class StreamBasedCMap.MetaClass


extends CMap.MetaClass

The meta class implementation

Page 727 of 1521


de.intarsys.pdf.font.StreamBasedGIDMap

de.intarsys.pdf.font
Class StreamBasedGIDMap
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.font.CIDToGIDMap
|
+-de.intarsys.pdf.font.StreamBasedGIDMap
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class StreamBasedGIDMap


extends CIDToGIDMap

Nested Class Summary


class StreamBasedGIDMap.MetaClass
StreamBasedGIDMap.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
int getGlyphIndex(CID cid)

Fields
META
public static final de.intarsys.pdf.font.StreamBasedGIDMap.MetaClass META

The meta class instance

Methods
getGlyphIndex
public int getGlyphIndex(CID cid)

Page 728 of 1521


de.intarsys.pdf.font.StreamBasedGIDMap.MetaClass

de.intarsys.pdf.font
Class StreamBasedGIDMap.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.font.CIDToGIDMap.MetaClass
|
+-de.intarsys.pdf.font.StreamBasedGIDMap.MetaClass

public static class StreamBasedGIDMap.MetaClass


extends CIDToGIDMap.MetaClass

The meta class implementation

Page 729 of 1521


Package
de.intarsys.pdf.font.outlet
This package summarizes the handling of fonts. It may be used for example for looking up and create new fonts in the context of a
document while rendering new content.

Page 730 of 1521


de.intarsys.pdf.font.outlet.DocumentFontFactory

de.intarsys.pdf.font.outlet
Class DocumentFontFactory
java.lang.Object
|
+-de.intarsys.pdf.font.outlet.StandardFontFactory
|
+-de.intarsys.pdf.font.outlet.DocumentFontFactory
All Implemented Interfaces:
IFontFactory

public class DocumentFontFactory


extends StandardFontFactory

A IFontFactory that tries to reuse fonts already available in a PDDocument.

Method Summary
PDDocument getDoc()
The document whose fonts are managed.

Methods
getDoc
public PDDocument getDoc()

The document whose fonts are managed.

Returns:
The document whose fonts are managed.

Page 731 of 1521


de.intarsys.pdf.font.outlet.FontFactory

de.intarsys.pdf.font.outlet
Class FontFactory
java.lang.Object
|
+-de.intarsys.pdf.font.outlet.FontFactory

public class FontFactory


extends Object

A singleton to access the current IFontFactory.

Constructor Summary
public FontFactory()

Method Summary
static IFontFactory get()
The IFontFactory singleton.

static void set(IFontFactory factory)


Set the IFontFactory singleton.

Constructors
FontFactory
public FontFactory()

Methods
get
public static IFontFactory get()

The IFontFactory singleton.

Returns:
The IFontFactory singleton.

set
public static void set(IFontFactory factory)

Set the IFontFactory singleton.

Parameters:
factory - The IFontFactory singleton.

Page 732 of 1521


de.intarsys.pdf.font.outlet.FontOutlet

de.intarsys.pdf.font.outlet
Class FontOutlet
java.lang.Object
|
+-de.intarsys.pdf.font.outlet.FontOutlet

public class FontOutlet


extends Object

A singleton to access the current IFontOutlet.

Constructor Summary
public FontOutlet()

Method Summary
static IFontOutlet get()
The IFontOutlet singleton.

static void set(IFontOutlet outlet)


Set the IFontOutlet singleton.

Constructors
FontOutlet
public FontOutlet()

Methods
get
public static IFontOutlet get()

The IFontOutlet singleton.

Returns:
The IFontOutlet singleton.

set
public static void set(IFontOutlet outlet)

Set the IFontOutlet singleton.

Parameters:
outlet - The IFontOutlet singleton.

Page 733 of 1521


de.intarsys.pdf.font.outlet.FontQuery

de.intarsys.pdf.font.outlet
Class FontQuery
java.lang.Object
|
+-de.intarsys.pdf.font.outlet.FontQuery
All Implemented Interfaces:
IFontQuery

public class FontQuery


extends Object
implements IFontQuery

A query for requesting PDFont instances from an IFontFactory with the defined attributes.

Constructor Summary
public FontQuery(PDFont baseFont)
Create a new IFontQuery based on another PDFont.

public FontQuery(String family, String style)


Create a new IFontQuery denoting a font from the family in style style.

public FontQuery(String family, FontStyle style)


Create a new IFontQuery denoting a font from the family in style style.

Method Summary
Encoding getEncoding()

String getFontFamilyName()

FontStyle getFontStyle()

Encoding getOverrideEncoding()
The required encoding for the result font.

String getOverrideFontFamilyName()
The required font family for the result font.

FontStyle getOverrideFontStyle()
The required font style for the result font.

void setOverrideEncoding(Encoding overrideEncoding)


Set the encoding attribute for the font to be looked up.

void setOverrideFontFamilyName(String overrideFontFamilyName)


Set the font family attribute for the font to be looked up.

void setOverrideFontStyle(FontStyle overrideFontStyle)


Set the font style attribute for the font to be looked up.

Page 734 of 1521


de.intarsys.pdf.font.outlet.FontQuery

Constructors
FontQuery
public FontQuery(PDFont baseFont)

Create a new IFontQuery based on another PDFont. USe the setter methods to overwrite the attributes you want to be
different from baseFont.

Parameters:
baseFont - The font serivng as a template for this query.

FontQuery
public FontQuery(String family,
String style)

Create a new IFontQuery denoting a font from the family in style style.

Parameters:
baseFont - The font serivng as a template for this query.

FontQuery
public FontQuery(String family,
FontStyle style)

Create a new IFontQuery denoting a font from the family in style style.

Parameters:
baseFont - The font serivng as a template for this query.

Methods
getEncoding
public Encoding getEncoding()

getFontFamilyName
public String getFontFamilyName()

getFontStyle
public FontStyle getFontStyle()

setOverrideEncoding
public void setOverrideEncoding(Encoding overrideEncoding)

Set the encoding attribute for the font to be looked up.

Page 735 of 1521


de.intarsys.pdf.font.outlet.FontQuery

(continued from last page)

Parameters:
overrideEncoding - The required encoding for the result font.

getOverrideEncoding
public Encoding getOverrideEncoding()

The required encoding for the result font.

Returns:
The required encoding for the result font.

setOverrideFontFamilyName
public void setOverrideFontFamilyName(String overrideFontFamilyName)

Set the font family attribute for the font to be looked up.

Parameters:
overrideFontFamilyName - The required font family for the result font.

getOverrideFontFamilyName
public String getOverrideFontFamilyName()

The required font family for the result font.

Returns:
The required font family for the result font.

setOverrideFontStyle
public void setOverrideFontStyle(FontStyle overrideFontStyle)

Set the font style attribute for the font to be looked up.

Parameters:
overrideFontStyle - The required font style for the result font.

getOverrideFontStyle
public FontStyle getOverrideFontStyle()

The required font style for the result font.

Returns:
The required font style for the result font.

Page 736 of 1521


de.intarsys.pdf.font.outlet.IFontFactory

de.intarsys.pdf.font.outlet
Interface IFontFactory
All Known Implementing Classes:
StandardFontFactory

public interface IFontFactory


extends

A factory for PDFont instances.

The factory can create "relative" requests ("getXYZFlavor) as well as "absolute" request defining the complete font attributes.

Method Summary
PDFont getBoldFlavor(PDFont font)
A font based on font, but with "bold" style.

PDFont getFont(IFontQuery query)


A font satisfying the conditions defined in query.

PDFont getItalicFlavor(PDFont font)


A font based on font, but with "italic" style.

PDFont getRegularFlavor(PDFont font)


A font based on font, but with "regular" style.

void setEmbedNew(boolean embedNew)


Flag if the factory should create fonts that are embedded in the document.

Methods
getItalicFlavor
public PDFont getItalicFlavor(PDFont font)

A font based on font, but with "italic" style.

The font returned may be either a new one or a font already in use in a PDDocument. Thois decision is up to the factory.Be
careful when changing the font returned!

Parameters:
font - The base font to be "italicized".

Returns:
A font based on font, but with "italic" style.

getRegularFlavor
public PDFont getRegularFlavor(PDFont font)

Page 737 of 1521


de.intarsys.pdf.font.outlet.IFontFactory

(continued from last page)

A font based on font, but with "regular" style.

The font returned may be either a new one or a font already in use in a PDDocument. Thois decision is up to the factory.Be
careful when changing the font returned!

Parameters:
font - The base font to be "regularized".

Returns:
A font based on font, but with "regular" style.

getBoldFlavor
public PDFont getBoldFlavor(PDFont font)

A font based on font, but with "bold" style.

The font returned may be either a new one or a font already in use in a PDDocument. Thois decision is up to the factory.Be
careful when changing the font returned!

Parameters:
font - The base font to be "bolded".

Returns:
A font based on font, but with "bold" style.

getFont
public PDFont getFont(IFontQuery query)

A font satisfying the conditions defined in query.

The font returned may be either a new one or a font already in use in a PDDocument. Thois decision is up to the factory.Be
careful when changing the font returned!

Parameters:
query - A query defining the PDFont to be looked up.

Returns:
A font satisfying the conditions defined in query.

setEmbedNew
public void setEmbedNew(boolean embedNew)

Flag if the factory should create fonts that are embedded in the document.

Parameters:
embedNew - true if new fonts should be embedded.

Page 738 of 1521


de.intarsys.pdf.font.outlet.IFontOutlet

de.intarsys.pdf.font.outlet
Interface IFontOutlet
All Known Implementing Classes:
StandardFontOutlet

public interface IFontOutlet


extends

An object that creates IFontFactory instances specific for a PDDocument.

Method Summary
IFontFactory lookupFontFactory(PDDocument doc)
A IFontFactory suitable for doc.

Methods
lookupFontFactory
public IFontFactory lookupFontFactory(PDDocument doc)

A IFontFactory suitable for doc.

The result IFontFactory should try to reuse fonts already available in the document before it creates new ones.

Parameters:
doc - The document that serves as the context and container for the result fonts of the IFontFactory.

Returns:
A IFontFactory suitable for doc.

Page 739 of 1521


de.intarsys.pdf.font.outlet.IFontQuery

de.intarsys.pdf.font.outlet
Interface IFontQuery
All Known Implementing Classes:
FontQuery

public interface IFontQuery


extends

A "search" template or query to look up PDFont objects.

Method Summary
Encoding getEncoding()
The desired encoding for the PDFont.

String getFontFamilyName()
The desired font family for the PDFont.

FontStyle getFontStyle()
The desired font style for the PDFont.

Methods
getEncoding
public Encoding getEncoding()

The desired encoding for the PDFont.

Returns:
The desired encoding for the PDFont.

getFontFamilyName
public String getFontFamilyName()

The desired font family for the PDFont.

Returns:
The desired font family for the PDFont.

getFontStyle
public FontStyle getFontStyle()

The desired font style for the PDFont.

Returns:
The desired font style for the PDFont.

Page 740 of 1521


de.intarsys.pdf.font.outlet.StandardFontFactory

de.intarsys.pdf.font.outlet
Class StandardFontFactory
java.lang.Object
|
+-de.intarsys.pdf.font.outlet.StandardFontFactory
All Implemented Interfaces:
IFontFactory

Direct Known Subclasses:


DocumentFontFactory

public class StandardFontFactory


extends Object
implements IFontFactory

The standard factory managing and creating fonts.

This one relies on the building blocks for fonts defined in "de.intarsys.afm" and "de.intarsys.truetype".

The factory tries first to resolve the request within the cache of already loaded fonts. If not found, first Type1 (AFM), then
TrueType fonts are looked up.

Remember to properly set up the according registries if you want to access non standard fonts.

Method Summary
PDFont getBoldFlavor(PDFont font)

PDFont getFont(IFontQuery query)

PDFont getItalicFlavor(PDFont font)

PDFont getRegularFlavor(PDFont font)

void setEmbedNew(boolean embedNew)

Methods
getBoldFlavor
public PDFont getBoldFlavor(PDFont font)

setEmbedNew
public void setEmbedNew(boolean embedNew)

Page 741 of 1521


de.intarsys.pdf.font.outlet.StandardFontFactory

getFont
public PDFont getFont(IFontQuery query)

getItalicFlavor
public PDFont getItalicFlavor(PDFont font)

getRegularFlavor
public PDFont getRegularFlavor(PDFont font)

Page 742 of 1521


de.intarsys.pdf.font.outlet.StandardFontOutlet

de.intarsys.pdf.font.outlet
Class StandardFontOutlet
java.lang.Object
|
+-de.intarsys.pdf.font.outlet.StandardFontOutlet
All Implemented Interfaces:
IFontOutlet

public class StandardFontOutlet


extends Object
implements IFontOutlet

The standard outlet for PDDocument specific IFontFactory instances.

Constructor Summary
public StandardFontOutlet()

Method Summary
IFontFactory lookupFontFactory(PDDocument doc)

Constructors
StandardFontOutlet
public StandardFontOutlet()

Methods
lookupFontFactory
public IFontFactory lookupFontFactory(PDDocument doc)

Page 743 of 1521


Package
de.intarsys.pdf.parser
Everything related to reading PDF and COS data from data streams.

Page 744 of 1521


de.intarsys.pdf.parser.COSDocumentParser

de.intarsys.pdf.parser
Class COSDocumentParser
java.lang.Object
|
+-de.intarsys.pdf.parser.PDFParser
|
+-de.intarsys.pdf.parser.COSDocumentParser

public class COSDocumentParser


extends PDFParser

A parser for PDF data streams.

The parser will create a object representation of the pdf document using COS level objects.

The parser is a one pass, read everything implementation.

Constructor Summary
public COSDocumentParser(STDocument doc)

Method Summary
STDocument getDoc()

boolean isTokenXRefAt(IRandomAccess input, int offset)

COSObject parseIndirectObject(IRandomAccess input, ISystemSecurityHandler


securityHandler)
read a pdf style object from the input. see PDF Reference v1.4, chapter 3.2.9 Indirect
Objects COSIndirectObject ::= ObjNum GenNum "obj" Object "endobj"

int parseStartXRef(IRandomAccess input)


the startxref value.

COSDictionary parseTrailer(IRandomAccess input)


parse the trailer section from the current stream position. see PDF Reference v1.4, chapter
3.4.4 File Trailer DocumentTrailer ::= "trailer" COSDict "startxref" COSNumber

int searchLastStartXRef(IRandomAccess input)


Searches the offset to the first trailer in the last 1024 bytes of the document.

int searchLinearized(IRandomAccess input)


Deprecated. Don't use this anymore Returns the offset of the dictionary with linearization
parameters if any. Returns -1 otherwise.

Constructors
COSDocumentParser
public COSDocumentParser(STDocument doc)

Page 745 of 1521


de.intarsys.pdf.parser.COSDocumentParser

(continued from last page)

Methods
isTokenXRefAt
public boolean isTokenXRefAt(IRandomAccess input,
int offset)
throws java.io.IOException

parseIndirectObject
public COSObject parseIndirectObject(IRandomAccess input,
ISystemSecurityHandler securityHandler)
throws java.io.IOException,
COSLoadException

read a pdf style object from the input. see PDF Reference v1.4, chapter 3.2.9 Indirect Objects COSIndirectObject ::=
ObjNum GenNum "obj" Object "endobj"

Returns:
The parsed object.

Throws:
IOException
COSLoadException

searchLastStartXRef
public int searchLastStartXRef(IRandomAccess input)
throws java.io.IOException,
COSLoadException

Searches the offset to the first trailer in the last 1024 bytes of the document. The search goes backwards starting with the
last byte.

Returns:
the offset to the first trailer found

Throws:
IOException
COSLoadException

parseStartXRef
public int parseStartXRef(IRandomAccess input)
throws java.io.IOException,
COSLoadException

the startxref value.

Returns:
the startxref value

Throws:
IOException
COSLoadException

Page 746 of 1521


de.intarsys.pdf.parser.COSDocumentParser

searchLinearized
public int searchLinearized(IRandomAccess input)
throws java.io.IOException,
COSLoadException

Deprecated. Don't use this anymore Returns the offset of the dictionary with linearization parameters if any. Returns -1
otherwise.

Parameters:
input

Returns:
Returns the offset of the dictionary with linearization parameters if any.

Throws:
IOException
COSLoadException

parseTrailer
public COSDictionary parseTrailer(IRandomAccess input)
throws java.io.IOException,
COSLoadException

parse the trailer section from the current stream position. see PDF Reference v1.4, chapter 3.4.4 File Trailer
DocumentTrailer ::= "trailer" COSDict "startxref" COSNumber

Returns:
the trailer dictionary

Throws:
IOException
COSLoadException

getDoc
public STDocument getDoc()

Page 747 of 1521


de.intarsys.pdf.parser.COSLoadError

de.intarsys.pdf.parser
Class COSLoadError
java.lang.Object
|
+-java.lang.Throwable
|
+-java.lang.Exception
|
+-de.intarsys.pdf.parser.COSLoadException
|
+-de.intarsys.pdf.parser.COSLoadError
All Implemented Interfaces:
java.io.Serializable

public class COSLoadError


extends COSLoadException

Constructor Summary
public COSLoadError(String message)

public COSLoadError(String message, Throwable cause)

public COSLoadError()

public COSLoadError(Throwable cause)

Constructors
COSLoadError
public COSLoadError(String message)

COSLoadError
public COSLoadError(String message,
Throwable cause)

COSLoadError
public COSLoadError()

Page 748 of 1521


de.intarsys.pdf.parser.COSLoadError

(continued from last page)

COSLoadError
public COSLoadError(Throwable cause)

Page 749 of 1521


de.intarsys.pdf.parser.COSLoadException

de.intarsys.pdf.parser
Class COSLoadException
java.lang.Object
|
+-java.lang.Throwable
|
+-java.lang.Exception
|
+-de.intarsys.pdf.parser.COSLoadException
All Implemented Interfaces:
java.io.Serializable

Direct Known Subclasses:


COSLoadError, COSLoadWarning

public abstract class COSLoadException


extends Exception

An exceptional condition when parsing a PDF data stream.

Constructor Summary
public COSLoadException(String message)

public COSLoadException(String message, Throwable cause)

public COSLoadException()

public COSLoadException(Throwable cause)

Method Summary
Object getHint()

void setHint(Object hint)

Constructors
COSLoadException
public COSLoadException(String message)

COSLoadException
public COSLoadException(String message,
Throwable cause)

Page 750 of 1521


de.intarsys.pdf.parser.COSLoadException

(continued from last page)

COSLoadException
public COSLoadException()

COSLoadException
public COSLoadException(Throwable cause)

Methods
getHint
public Object getHint()

setHint
public void setHint(Object hint)

Page 751 of 1521


de.intarsys.pdf.parser.COSLoadWarning

de.intarsys.pdf.parser
Class COSLoadWarning
java.lang.Object
|
+-java.lang.Throwable
|
+-java.lang.Exception
|
+-de.intarsys.pdf.parser.COSLoadException
|
+-de.intarsys.pdf.parser.COSLoadWarning
All Implemented Interfaces:
java.io.Serializable

public class COSLoadWarning


extends COSLoadException

Constructor Summary
public COSLoadWarning(String message)

public COSLoadWarning(String message, Throwable cause)

public COSLoadWarning()

public COSLoadWarning(Throwable cause)

Constructors
COSLoadWarning
public COSLoadWarning(String message)

COSLoadWarning
public COSLoadWarning(String message,
Throwable cause)

COSLoadWarning
public COSLoadWarning()

Page 752 of 1521


de.intarsys.pdf.parser.COSLoadWarning

(continued from last page)

COSLoadWarning
public COSLoadWarning(Throwable cause)

Page 753 of 1521


de.intarsys.pdf.parser.CSContentParser

de.intarsys.pdf.parser
Class CSContentParser
java.lang.Object
|
+-de.intarsys.pdf.parser.PDFParser
|
+-de.intarsys.pdf.parser.CSContentParser

public class CSContentParser


extends PDFParser

A parser for .pdf type content streams.

Constructor Summary
public CSContentParser()
create a COSDocumentParser

Method Summary
CSContent parseStream(byte[] data)
parse a content stream.

CSContent parseStream(IRandomAccess input)


parse a content stream.

Constructors
CSContentParser
public CSContentParser()

create a COSDocumentParser

Methods
parseStream
public CSContent parseStream(byte[] data)
throws java.io.IOException,
COSLoadException

parse a content stream.

See PDF Reference v1.4, chapter 3.7 Content Streams

Parameters:
data - A byte array containing the encoded content stream

Returns:
the parsed content

Throws:

Page 754 of 1521


de.intarsys.pdf.parser.CSContentParser

(continued from last page)


IOException
COSLoadException

parseStream
public CSContent parseStream(IRandomAccess input)
throws java.io.IOException,
COSLoadException

parse a content stream.

See PDF Reference v1.4, chapter 3.7 Content Streams

Parameters:
input - a open IRandomAccessData positioned at the beginning of the content stream

Returns:
the parsed content

Throws:
IOException
COSLoadException

Page 755 of 1521


de.intarsys.pdf.parser.IPDFParserExceptionHandler

de.intarsys.pdf.parser
Interface IPDFParserExceptionHandler

public interface IPDFParserExceptionHandler


extends

Method Summary
void error(COSLoadError error)

void warning(COSLoadWarning warning)

Methods
error
public void error(COSLoadError error)
throws COSLoadException

warning
public void warning(COSLoadWarning warning)
throws COSLoadException

Page 756 of 1521


de.intarsys.pdf.parser.PDFParser

de.intarsys.pdf.parser
Class PDFParser
java.lang.Object
|
+-de.intarsys.pdf.parser.PDFParser
Direct Known Subclasses:
COSDocumentParser, CSContentParser

public abstract class PDFParser


extends Object

An abstract superclass for our two flavours of PDF Parsers.

Field Summary
public static final C_WARN_ARRAYSIZE

Value: ImplLimitArray

public static final C_WARN_ENDOBJ_MISSING

Value: 618c

public static final C_WARN_ENDSTREAMCORRUPT

Value: 617c

public static final C_WARN_ENDSTREAMEOL

Value: 617b

public static final C_WARN_ILLEGALHEX

Value: 616b

public static final C_WARN_NAMETOLONG

Value: ImplLimitName

public static final C_WARN_SINGLEEOL

Value: 614b

public static final C_WARN_SINGLEEOL_OBJ

Value: 618b

public static final C_WARN_SINGLESPACE

Value: 614a

public static final C_WARN_SINGLESPACE_OBJ

Value: 618a

Page 757 of 1521


de.intarsys.pdf.parser.PDFParser

public static final C_WARN_STREAMEOL

Value: 617a

public static final C_WARN_STREAMEXTERNAL

Value: 617d

public static final C_WARN_STREAMLENGTH

Value: 617e

public static final C_WARN_STRINGTOLONG

Value: ImplLimitString

public static final C_WARN_UNEVENHEX

Value: 616a

public static CHAR_BS

public static CHAR_CR

public static CHAR_FF

public static CHAR_HT

public static CHAR_LF

public static final TOKEN_endobj

public static final TOKEN_endstream

public static final TOKEN_EOF

public static final TOKEN_false

public static final TOKEN_FDFHEADER

public static final TOKEN_ndstream

public static final TOKEN_null

public static final TOKEN_obj

public static final TOKEN_PDFHEADER

public static final TOKEN_R

public static final TOKEN_s_tream

public static final TOKEN_startxref

Page 758 of 1521


de.intarsys.pdf.parser.PDFParser

public static final TOKEN_stream

public static final TOKEN_trailer

public static final TOKEN_true

public static final TOKEN_xref

Constructor Summary
public PDFParser()

Method Summary
IPDFParserExceptionHa getExceptionHandler()
ndler

void handleError(COSLoadError error)


Handle an error if an exceptionHandler is set.

void handleWarning(COSLoadWarning warning)


Handle a warning if an exceptionHandler is set.

static boolean isDelimiter(int i)


evaluate to true if i is a PDF Delimiter char.

static boolean isDigit(int i)


evaluate to true if i is a valid digit.

static boolean isEOL(int i)


evaluate to true if i is a valid line terminator.

static boolean isNumberStart(int i)


evaluate to true if i is a valid first char for a number token.

static boolean isOctalDigit(int i)


evaluate to true if i is a valid octal digit.

static boolean isTokenStart(int i)


evaluate to true if i is a valid string token start.

static boolean isWhitespace(int i)


evaluate to true if i is a valid whitespace.

Object parseElement(IRandomAccess input)


parse the basic elements from the current stream position.

STDocType parseHeader(IRandomAccess input)


pdf header see PDF Reference v1.4, chapter 3.4.1 Header COSHEader ::= "%PDF-"
version.

int readInteger(IRandomAccess input, boolean consumeSpaceAfter)


reads the next integer on input. consumes one trailing space if consumeSpaceAfter is set to
true.

Page 759 of 1521


de.intarsys.pdf.parser.PDFParser

void readSpaces(IRandomAccess input)


read all characters until EOF or non space char appears. the first non space char is pushed
back so the next char read is the first non space char.

byte[] readToken(IRandomAccess input)


read a single token.

byte[] readToken(IRandomAccess input, java.util.List messages)


derive of readToken, populates the messages list with non-fatal error messages

void setExceptionHandler(IPDFParserExceptionHandler exceptionHandler)

static COSObject toCOSObject(byte[] data)


parse the given byte array to a valid COSObject.

Fields
CHAR_CR
public static char CHAR_CR

CHAR_LF
public static char CHAR_LF

CHAR_HT
public static char CHAR_HT

CHAR_BS
public static char CHAR_BS

CHAR_FF
public static char CHAR_FF

TOKEN_PDFHEADER
public static final byte TOKEN_PDFHEADER

Page 760 of 1521


de.intarsys.pdf.parser.PDFParser

(continued from last page)

TOKEN_FDFHEADER
public static final byte TOKEN_FDFHEADER

TOKEN_EOF
public static final byte TOKEN_EOF

TOKEN_obj
public static final byte TOKEN_obj

TOKEN_endobj
public static final byte TOKEN_endobj

TOKEN_false
public static final byte TOKEN_false

TOKEN_true
public static final byte TOKEN_true

TOKEN_null
public static final byte TOKEN_null

TOKEN_startxref
public static final byte TOKEN_startxref

TOKEN_trailer
public static final byte TOKEN_trailer

TOKEN_xref
public static final byte TOKEN_xref

Page 761 of 1521


de.intarsys.pdf.parser.PDFParser

(continued from last page)

TOKEN_stream
public static final byte TOKEN_stream

TOKEN_s_tream
public static final byte TOKEN_s_tream

TOKEN_endstream
public static final byte TOKEN_endstream

TOKEN_ndstream
public static final byte TOKEN_ndstream

TOKEN_R
public static final byte TOKEN_R

C_WARN_UNEVENHEX
public static final java.lang.String C_WARN_UNEVENHEX

Constant value: 616a

C_WARN_ILLEGALHEX
public static final java.lang.String C_WARN_ILLEGALHEX

Constant value: 616b

C_WARN_STRINGTOLONG
public static final java.lang.String C_WARN_STRINGTOLONG

Constant value: ImplLimitString

C_WARN_NAMETOLONG
public static final java.lang.String C_WARN_NAMETOLONG

Constant value: ImplLimitName

Page 762 of 1521


de.intarsys.pdf.parser.PDFParser

C_WARN_ARRAYSIZE
public static final java.lang.String C_WARN_ARRAYSIZE

Constant value: ImplLimitArray

C_WARN_SINGLESPACE
public static final java.lang.String C_WARN_SINGLESPACE

Constant value: 614a

C_WARN_SINGLEEOL
public static final java.lang.String C_WARN_SINGLEEOL

Constant value: 614b

C_WARN_STREAMEOL
public static final java.lang.String C_WARN_STREAMEOL

Constant value: 617a

C_WARN_ENDSTREAMEOL
public static final java.lang.String C_WARN_ENDSTREAMEOL

Constant value: 617b

C_WARN_ENDSTREAMCORRUPT
public static final java.lang.String C_WARN_ENDSTREAMCORRUPT

Constant value: 617c

C_WARN_STREAMEXTERNAL
public static final java.lang.String C_WARN_STREAMEXTERNAL

Constant value: 617d

C_WARN_STREAMLENGTH
public static final java.lang.String C_WARN_STREAMLENGTH

Constant value: 617e

Page 763 of 1521


de.intarsys.pdf.parser.PDFParser

(continued from last page)

C_WARN_SINGLESPACE_OBJ
public static final java.lang.String C_WARN_SINGLESPACE_OBJ

Constant value: 618a

C_WARN_SINGLEEOL_OBJ
public static final java.lang.String C_WARN_SINGLEEOL_OBJ

Constant value: 618b

C_WARN_ENDOBJ_MISSING
public static final java.lang.String C_WARN_ENDOBJ_MISSING

Constant value: 618c

Constructors
PDFParser
public PDFParser()

Methods
isDelimiter
public final static boolean isDelimiter(int i)

evaluate to true if i is a PDF Delimiter char.

See pdf spec delimiter characters.

Parameters:
i - i a byte representation

Returns:
true if i is a PDF delimiter char

isDigit
public final static boolean isDigit(int i)

evaluate to true if i is a valid digit.

Parameters:
i - i a byte representation

Returns:
true if i is a valid digit

Page 764 of 1521


de.intarsys.pdf.parser.PDFParser

(continued from last page)

isEOL
public final static boolean isEOL(int i)

evaluate to true if i is a valid line terminator.

Parameters:
i - i a byte representation

Returns:
true if i is a valid line terminator

isNumberStart
public final static boolean isNumberStart(int i)

evaluate to true if i is a valid first char for a number token.

Parameters:
i - i a byte representation

Returns:
true if i is a valid first char for a number token

isOctalDigit
public final static boolean isOctalDigit(int i)

evaluate to true if i is a valid octal digit.

Parameters:
i - i a byte representation

Returns:
true if i is a valid octal digit

isTokenStart
public final static boolean isTokenStart(int i)

evaluate to true if i is a valid string token start.

Parameters:
i - i a byte representation

Returns:
true if i is a valid string token start

isWhitespace
public final static boolean isWhitespace(int i)

evaluate to true if i is a valid whitespace.

See pdf spec "white space characters"

Parameters:
i - i a byte representation

Page 765 of 1521


de.intarsys.pdf.parser.PDFParser

(continued from last page)

Returns:
true if i is a valid whitespace

toCOSObject
public static COSObject toCOSObject(byte[] data)
throws java.io.IOException,
COSLoadException

parse the given byte array to a valid COSObject.

Parameters:
data - a byte array containing COS encoded objects

Returns:
a COSObject

Throws:
IOException
COSLoadException

getExceptionHandler
public IPDFParserExceptionHandler getExceptionHandler()

handleError
public void handleError(COSLoadError error)
throws COSLoadException

Handle an error if an exceptionHandler is set.

Parameters:
error

Throws:
COSLoadException

handleWarning
public void handleWarning(COSLoadWarning warning)
throws COSLoadException

Handle a warning if an exceptionHandler is set.

Parameters:
warning

Throws:
COSLoadException

parseElement
public Object parseElement(IRandomAccess input)
throws java.io.IOException,
COSLoadException

Page 766 of 1521


de.intarsys.pdf.parser.PDFParser

(continued from last page)

parse the basic elements from the current stream position.

see PDF Reference v1.4, chapter 3.2 Objects

COSObject ::= COSToken | COSBoolean | COSString | COSNumber | COSName | COSNull | COSArray | COSDictionary |
COSStream

Returns:
the object parsed

Throws:
IOException
COSLoadException

parseHeader
public STDocType parseHeader(IRandomAccess input)
throws java.io.IOException,
COSLoadException

pdf header see PDF Reference v1.4, chapter 3.4.1 Header COSHEader ::= "%PDF-" version.

Throws:
IOException
COSLoadException

readInteger
public int readInteger(IRandomAccess input,
boolean consumeSpaceAfter)
throws java.io.IOException

reads the next integer on input. consumes one trailing space if consumeSpaceAfter is set to true. Consumes leading spaces
and comments.

Parameters:
input
consumeSpaceAfter

Returns:
The integer read.

Throws:
IOException

readSpaces
public void readSpaces(IRandomAccess input)
throws java.io.IOException

read all characters until EOF or non space char appears. the first non space char is pushed back so the next char read is the
first non space char.

Throws:
IOException

readToken
public byte[] readToken(IRandomAccess input)
throws java.io.IOException

Page 767 of 1521


de.intarsys.pdf.parser.PDFParser

(continued from last page)

read a single token.

Returns:
the array of characters belonging to the token

Throws:
IOException

readToken
public byte[] readToken(IRandomAccess input,
java.util.List messages)
throws java.io.IOException

derive of readToken, populates the messages list with non-fatal error messages

Parameters:
input
messages

Returns:
token bytes

Throws:
IOException

setExceptionHandler
public void setExceptionHandler(IPDFParserExceptionHandler exceptionHandler)

Page 768 of 1521


Package
de.intarsys.pdf.pd
The higher level building blocks of a PDF document. The PD level objects carry the PDF document semantics like "this is a page"
and "this is a image". The PD objects itself are built upon COS objects, sometimes primitives like COSString or COSName, but
most often COSDictionary and COSStream.

This implementation is guided by the following rules:

• META class structure:


Every PD class is accompanied with a META class defining META information and acting as a factory.
• Factory creation:
The PD level object is created or looked up using the factory methods provided by its META class.
• Identity:
A PD object is always 1:1 associated with a COSObject.
• COSObject and Java return types:
The return types of the PDObject level methods are as follows: All "cos" prefixed methods reference back to the COS level
and return COSObjects. All other methods return (or act upon) either higher level data structures like CDS or PD itself or
plain Java objects.
• COSObject, COSNull and plain null:
All methods with a COSObject in return signature will never return plain Java null, but COSNull. Methods that are already
narrowed to a specific subtype, like COSName, will return either an instance of that type or Java null.

Page 769 of 1521


de.intarsys.pdf.pd.AbstractBitFlags

de.intarsys.pdf.pd
Class AbstractBitFlags
java.lang.Object
|
+-de.intarsys.pdf.pd.AbstractBitFlags
Direct Known Subclasses:
AcroFormFieldFlags, AcroFormSigFlags, AnnotationFlags, OutlineItemFlags, SubmitFormFlags,
FontDescriptorFlags, AbstractAccessPermissions

public abstract class AbstractBitFlags


extends Object

AbstractBitFlags provides access to an integer containing bit wise flags. The concrete value is provided by an assoiated PDF object
along with access method to the value within the object.

Constructor Summary
public AbstractBitFlags()

Method Summary
boolean isSetAnd(int bitMask)
Checks if all the bits set in the bit mask are also set in the underlying integer.

boolean isSetOr(int bitMask)


Checks if one of the bits set in the bit mask are also set in the underlying integer.

Constructors
AbstractBitFlags
public AbstractBitFlags()

Methods
isSetAnd
public boolean isSetAnd(int bitMask)

Checks if all the bits set in the bit mask are also set in the underlying integer. A clear bit == 0 and a set bit == 1.

Parameters:
bitMask - a integer containing the bit mask to test

Returns:
true if all bits in the mask are set in the underlying integer

Page 770 of 1521


de.intarsys.pdf.pd.AbstractBitFlags

(continued from last page)

isSetOr
public boolean isSetOr(int bitMask)

Checks if one of the bits set in the bit mask are also set in the underlying integer. A clear bit == 0 and a set bit == 1.

Parameters:
bitMask - a integer containing the bit mask

Returns:
true if one of the bits in the mask are set in the underlying integer

Page 771 of 1521


de.intarsys.pdf.pd.AcroFormFieldFlags

de.intarsys.pdf.pd
Class AcroFormFieldFlags
java.lang.Object
|
+-de.intarsys.pdf.pd.AbstractBitFlags
|
+-de.intarsys.pdf.pd.AcroFormFieldFlags

public class AcroFormFieldFlags


extends AbstractBitFlags

The flags of a field in an acrobat form.

The flags are bits of an integer.


The following bits are defined (more may exist).

• 0: default
• 1: Readonly
• 2: Required
• 3: NoExport
• 13: Multiline
• 14: Password
• 15: NoToggleToOff
• 16: Radio
• 17: Pushbutton
• 18: Combo
• 19: Edit
• 20: Sort
• 21: FileSelect
• 22: MulitSelect
• 23: DoNotSpellChec
• 24: DoNotScroll
• 25: Comb
• 26: RadiosInUnison
• 27: CommitOnSelChange
• 28: RichText

Field Summary
public static final Bit_Comb

Value: 16777216

public static final Bit_Combo

Value: 131072

public static final Bit_CommitOnSelChange

Value: 67108864

public static final Bit_DoNotScroll

Value: 8388608

public static final Bit_DoNotSpellCheck

Value: 4194304

Page 772 of 1521


de.intarsys.pdf.pd.AcroFormFieldFlags

public static final Bit_Edit

Value: 262144

public static final Bit_FileSelect

Value: 1048576

public static final Bit_Multiline

Value: 4096

public static final Bit_MultiSelect

Value: 2097152

public static final Bit_NoExport

Value: 4

public static final Bit_NoToggleToOff

Value: 16384

public static final Bit_Password

Value: 8192

public static final Bit_Pushbutton

Value: 65536

public static final Bit_Radio

Value: 32768

public static final Bit_RadiosInUnison

Value: 33554432

public static final Bit_ReadOnly

Value: 1

public static final Bit_Required

Value: 2

public static final Bit_RichText

Value: 134217728

public static final Bit_Sort

Value: 524288

Constructor Summary
public AcroFormFieldFlags(PDAcroFormField field)

Method Summary

Page 773 of 1521


de.intarsys.pdf.pd.AcroFormFieldFlags

int getValue()

boolean isComb()

boolean isCombo()

boolean isCommitOnSelChange()

boolean isDoNotScroll()

boolean isEdit()

boolean isFileSelect()

boolean isMultiline()

boolean isMultiSelect()

boolean isNoExport()

boolean isNoToggleOff()

boolean isPassword()

boolean isPushbutton()

boolean isRadio()

boolean isRadiosInUnison()

boolean isReadOnly()

boolean isRequired()

void setComb(boolean f)

void setCombo(boolean f)

void setCommitOnSelChange(boolean f)

void setDoNotScroll(boolean f)

void setEdit(boolean edit)

void setFileSelect(boolean f)

void setMultiline(boolean f)

Page 774 of 1521


de.intarsys.pdf.pd.AcroFormFieldFlags

void setMultiSelect(boolean multiSelect)

void setNoExport(boolean f)

void setNoToggleToOff(boolean noToggleToOff)

void setPassword(boolean f)

void setPushbutton(boolean f)

void setRadio(boolean f)

void setReadOnly(boolean f)

void setRequired(boolean f)

Fields
Bit_ReadOnly
public static final int Bit_ReadOnly

Constant value: 1

Bit_Required
public static final int Bit_Required

Constant value: 2

Bit_NoExport
public static final int Bit_NoExport

Constant value: 4

Bit_Multiline
public static final int Bit_Multiline

Constant value: 4096

Bit_Password
public static final int Bit_Password

Constant value: 8192

Page 775 of 1521


de.intarsys.pdf.pd.AcroFormFieldFlags

Bit_NoToggleToOff
public static final int Bit_NoToggleToOff

Constant value: 16384

Bit_Radio
public static final int Bit_Radio

Constant value: 32768

Bit_Pushbutton
public static final int Bit_Pushbutton

Constant value: 65536

Bit_Combo
public static final int Bit_Combo

Constant value: 131072

Bit_Edit
public static final int Bit_Edit

Constant value: 262144

Bit_Sort
public static final int Bit_Sort

Constant value: 524288

Bit_FileSelect
public static final int Bit_FileSelect

Constant value: 1048576

Bit_MultiSelect
public static final int Bit_MultiSelect

Constant value: 2097152

Page 776 of 1521


de.intarsys.pdf.pd.AcroFormFieldFlags

(continued from last page)

Bit_DoNotSpellCheck
public static final int Bit_DoNotSpellCheck

Constant value: 4194304

Bit_DoNotScroll
public static final int Bit_DoNotScroll

Constant value: 8388608

Bit_Comb
public static final int Bit_Comb

Constant value: 16777216

Bit_RadiosInUnison
public static final int Bit_RadiosInUnison

Constant value: 33554432

Bit_CommitOnSelChange
public static final int Bit_CommitOnSelChange

Constant value: 67108864

Bit_RichText
public static final int Bit_RichText

Constant value: 134217728

Constructors
AcroFormFieldFlags
public AcroFormFieldFlags(PDAcroFormField field)

Methods
setCombo
public void setCombo(boolean f)

Page 777 of 1521


de.intarsys.pdf.pd.AcroFormFieldFlags

(continued from last page)

isCombo
public boolean isCombo()

isEdit
public boolean isEdit()

setEdit
public void setEdit(boolean edit)

isCommitOnSelChange
public boolean isCommitOnSelChange()

setCommitOnSelChange
public void setCommitOnSelChange(boolean f)

setDoNotScroll
public void setDoNotScroll(boolean f)

setComb
public void setComb(boolean f)

isDoNotScroll
public boolean isDoNotScroll()

isComb
public boolean isComb()

isMultiSelect
public boolean isMultiSelect()

Page 778 of 1521


de.intarsys.pdf.pd.AcroFormFieldFlags

(continued from last page)

setMultiSelect
public void setMultiSelect(boolean multiSelect)

setMultiline
public void setMultiline(boolean f)

isMultiline
public boolean isMultiline()

isPassword
public boolean isPassword()

isFileSelect
public boolean isFileSelect()

setNoExport
public void setNoExport(boolean f)

isNoExport
public boolean isNoExport()

isNoToggleOff
public boolean isNoToggleOff()

setNoToggleToOff
public void setNoToggleToOff(boolean noToggleToOff)

Page 779 of 1521


de.intarsys.pdf.pd.AcroFormFieldFlags

(continued from last page)

setPushbutton
public void setPushbutton(boolean f)

isPushbutton
public boolean isPushbutton()

setPassword
public void setPassword(boolean f)

setFileSelect
public void setFileSelect(boolean f)

setRadio
public void setRadio(boolean f)

isRadio
public boolean isRadio()

isRadiosInUnison
public boolean isRadiosInUnison()

setReadOnly
public void setReadOnly(boolean f)

setRequired
public void setRequired(boolean f)

isReadOnly
public boolean isReadOnly()

Page 780 of 1521


de.intarsys.pdf.pd.AcroFormFieldFlags

(continued from last page)

isRequired
public boolean isRequired()

getValue
public int getValue()

By implementing this method the subclass provides the integer which contains the bit flags.

Page 781 of 1521


de.intarsys.pdf.pd.AcroFormSigFlags

de.intarsys.pdf.pd
Class AcroFormSigFlags
java.lang.Object
|
+-de.intarsys.pdf.pd.AbstractBitFlags
|
+-de.intarsys.pdf.pd.AcroFormSigFlags

public class AcroFormSigFlags


extends AbstractBitFlags

The flags of a signature field.

The flags are bits of an integer.


The following bits are defined (more may exist).

• 0: default
• 1: SignatureExists
• 2: AppendOnly

Field Summary
public static Bit_AppendOnly

public static Bit_SignatureExists

Constructor Summary
public AcroFormSigFlags(PDAcroForm form)

Method Summary
boolean isAppendOnly()

boolean isSignatureExists()

void setAppendOnly(boolean appendOnly)


excerpt from PDF 1.7 spec (p. 674): If set, the document contains signatures that may be
invalidated if the file is saved (written) in a way that alters its previous contents, as opposed
to an incremental update.

void setSignatureExists(boolean signatureExists)


excerpt from PDF 1.7 spec (p. 674): If set, the document contains at least one signature
field.

Fields
Bit_SignatureExists
public static int Bit_SignatureExists

Page 782 of 1521


de.intarsys.pdf.pd.AcroFormSigFlags

(continued from last page)

Bit_AppendOnly
public static int Bit_AppendOnly

Constructors
AcroFormSigFlags
public AcroFormSigFlags(PDAcroForm form)

Methods
setAppendOnly
public void setAppendOnly(boolean appendOnly)

excerpt from PDF 1.7 spec (p. 674):

If set, the document contains signatures that may be invalidated if the file is saved (written) in a way that alters its previous
contents, as opposed to an incremental update. Merely updating the file by appending new information to the end of the
previous version is safe (see Section G.6, Updating Example). Viewer applications can use this flag to present a user
requesting a full save with an additional alert box warning that signatures will be invalidated and requiring explicit
confirmation before continuing with the operation.

Parameters:
appendOnly

isAppendOnly
public boolean isAppendOnly()

Returns:
appendOnly flag

See Also:
setAppendOnly(boolean)

setSignatureExists
public void setSignatureExists(boolean signatureExists)

excerpt from PDF 1.7 spec (p. 674):

If set, the document contains at least one signature field. This flag allows a viewer application to enable user interface
items (such as menu items or pushbuttons) related to signature processing without having to scan the entire document for
the presence of signature fields.

Parameters:
signatureExists

Page 783 of 1521


de.intarsys.pdf.pd.AcroFormSigFlags

isSignatureExists
public boolean isSignatureExists()

Returns:
signatureExists flag

See Also:
setSignatureExists(boolean)

Page 784 of 1521


de.intarsys.pdf.pd.AnnotationFlags

de.intarsys.pdf.pd
Class AnnotationFlags
java.lang.Object
|
+-de.intarsys.pdf.pd.AbstractBitFlags
|
+-de.intarsys.pdf.pd.AnnotationFlags

public class AnnotationFlags


extends AbstractBitFlags

The flags of an annotation.

The flags are bits of an integer.


The following bits are defined (more may exist).

• 0: default
• 1: Invisible
• 2: Hidden
• 3: Print
• 4: NoZoom
• 5: NoRotate
• 6: NoView
• 7: ReadOnly
• 8: Locked
• 9: ToggleNoView

Field Summary
public static final Bit_Hidden

Value: 2

public static final Bit_Invisible

Value: 1

public static final Bit_Locked

Value: 128

public static final Bit_LockedContents

Value: 512

public static final Bit_NoRotate

Value: 16

public static final Bit_NoView

Value: 32

public static final Bit_NoZoom

Value: 8

Page 785 of 1521


de.intarsys.pdf.pd.AnnotationFlags

public static final Bit_Print

Value: 4

public static final Bit_ReadOnly

Value: 64

public static final Bit_ToggleNoView

Value: 256

Constructor Summary
public AnnotationFlags(PDAnnotation annotation)

Method Summary
boolean isHidden()

boolean isInvisible()

boolean isLocked()

boolean isLockedContents()

boolean isNoRotate()

boolean isNoView()

boolean isNoZoom()

boolean isPrint()

boolean isReadOnly()

boolean isToggleNoView()

void setHidden(boolean f)

void setInvisible(boolean f)

void setLocked(boolean f)

void setLockedContents(boolean f)

void setNoRotate(boolean f)

void setNoView(boolean f)

Page 786 of 1521


de.intarsys.pdf.pd.AnnotationFlags

void setNoZoom(boolean f)

void setPrint(boolean f)

void setReadOnly(boolean f)

void setToggleNoView(boolean f)

Fields
Bit_Invisible
public static final int Bit_Invisible

Constant value: 1

Bit_Hidden
public static final int Bit_Hidden

Constant value: 2

Bit_Print
public static final int Bit_Print

Constant value: 4

Bit_NoZoom
public static final int Bit_NoZoom

Constant value: 8

Bit_NoRotate
public static final int Bit_NoRotate

Constant value: 16

Bit_NoView
public static final int Bit_NoView

Constant value: 32

Page 787 of 1521


de.intarsys.pdf.pd.AnnotationFlags

(continued from last page)

Bit_ReadOnly
public static final int Bit_ReadOnly

Constant value: 64

Bit_Locked
public static final int Bit_Locked

Constant value: 128

Bit_ToggleNoView
public static final int Bit_ToggleNoView

Constant value: 256

Bit_LockedContents
public static final int Bit_LockedContents

Constant value: 512

Constructors
AnnotationFlags
public AnnotationFlags(PDAnnotation annotation)

Methods
setHidden
public void setHidden(boolean f)

isHidden
public boolean isHidden()

setInvisible
public void setInvisible(boolean f)

Page 788 of 1521


de.intarsys.pdf.pd.AnnotationFlags

(continued from last page)

isInvisible
public boolean isInvisible()

setLocked
public void setLocked(boolean f)

isLocked
public boolean isLocked()

setNoRotate
public void setNoRotate(boolean f)

isNoRotate
public boolean isNoRotate()

setNoView
public void setNoView(boolean f)

isNoView
public boolean isNoView()

setNoZoom
public void setNoZoom(boolean f)

isNoZoom
public boolean isNoZoom()

setPrint
public void setPrint(boolean f)

Page 789 of 1521


de.intarsys.pdf.pd.AnnotationFlags

(continued from last page)

isPrint
public boolean isPrint()

setReadOnly
public void setReadOnly(boolean f)

isReadOnly
public boolean isReadOnly()

setToggleNoView
public void setToggleNoView(boolean f)

setLockedContents
public void setLockedContents(boolean f)

isToggleNoView
public boolean isToggleNoView()

isLockedContents
public boolean isLockedContents()

Page 790 of 1521


de.intarsys.pdf.pd.DefaultAppearance

de.intarsys.pdf.pd
Class DefaultAppearance
java.lang.Object
|
+-de.intarsys.pdf.pd.DefaultAppearance

public class DefaultAppearance


extends Object

A internal representation of the parsed CSContent for the default appearance content stream fragment in a PDAcroFormField.

Nested Class Summary


class DefaultAppearance.DefaultAppearanceDevice
DefaultAppearance.DefaultAppearanceDevice

Constructor Summary
public DefaultAppearance(PDAcroFormNode node)

Method Summary
PDFont getFont()

float[] getFontColorValues()
parse the requested font color from the default appearance string

COSName getFontName()

float getFontSize()

PDAcroFormNode getNode()

void setFont(PDFont font)

void setFontColorValues(float[] color)

void setFontName(COSName pFontName)

void setFontSize(float pFontSize)

Constructors
DefaultAppearance
public DefaultAppearance(PDAcroFormNode node)

Page 791 of 1521


de.intarsys.pdf.pd.DefaultAppearance

(continued from last page)

Methods
getFont
public PDFont getFont()

getFontColorValues
public float[] getFontColorValues()

parse the requested font color from the default appearance string

Returns:
the font color used in the default appearance

Throws:
IllegalStateException

getFontName
public COSName getFontName()

getFontSize
public float getFontSize()

getNode
public PDAcroFormNode getNode()

setFont
public void setFont(PDFont font)

setFontColorValues
public void setFontColorValues(float[] color)

setFontName
public void setFontName(COSName pFontName)

Page 792 of 1521


de.intarsys.pdf.pd.DefaultAppearance

setFontSize
public void setFontSize(float pFontSize)

Page 793 of 1521


de.intarsys.pdf.pd.DefaultAppearance.DefaultAppearanceDevice

de.intarsys.pdf.pd
Class DefaultAppearance.DefaultAppearanceDevice
java.lang.Object
|
+-de.intarsys.pdf.content.CSDeviceAdapter
|
+-de.intarsys.pdf.content.CSVirtualDevice
|
+-de.intarsys.pdf.pd.DefaultAppearance.DefaultAppearanceDevice
All Implemented Interfaces:
ICSDevice

public class DefaultAppearance.DefaultAppearanceDevice


extends CSVirtualDevice

Constructor Summary
public DefaultAppearance.DefaultAppearanceDevice()

Method Summary
void setNonStrokeColorSpace(COSName name, PDColorSpace colorSpace)

void setNonStrokeColorValues(float[] values)

void setStrokeColorSpace(COSName name, PDColorSpace colorSpace)

void setStrokeColorValues(float[] values)

void textSetFont(COSName name, PDFont paramFont, float size)

Constructors
DefaultAppearance.DefaultAppearanceDevice
public DefaultAppearance.DefaultAppearanceDevice()

Methods
textSetFont
public void textSetFont(COSName name,
PDFont paramFont,
float size)

Page 794 of 1521


de.intarsys.pdf.pd.DefaultAppearance.DefaultAppearanceDevice

setNonStrokeColorSpace
public void setNonStrokeColorSpace(COSName name,
PDColorSpace colorSpace)

setNonStrokeColorValues
public void setNonStrokeColorValues(float[] values)

setStrokeColorSpace
public void setStrokeColorSpace(COSName name,
PDColorSpace colorSpace)

setStrokeColorValues
public void setStrokeColorValues(float[] values)

Page 795 of 1521


de.intarsys.pdf.pd.IAdditionalActionSupport

de.intarsys.pdf.pd
Interface IAdditionalActionSupport
All Known Implementing Classes:
PDAcroFormField, PDAnnotation, PDDocument, PDPage

public interface IAdditionalActionSupport


extends

A PD object that supports additional actions. Additional actions are actions associated with a variety of trigger events.

Field Summary
public static final DK_AA

Method Summary
PDAdditionalActions getAdditionalActions()

java.util.Set getSupportedTriggerEvents()

void setAdditionalActions(PDAdditionalActions actions)

Fields
DK_AA
public static final de.intarsys.pdf.cos.COSName DK_AA

Methods
getAdditionalActions
public PDAdditionalActions getAdditionalActions()

setAdditionalActions
public void setAdditionalActions(PDAdditionalActions actions)

getSupportedTriggerEvents
public java.util.Set getSupportedTriggerEvents()

Page 796 of 1521


de.intarsys.pdf.pd.IResourcesProvider

de.intarsys.pdf.pd
Interface IResourcesProvider
All Subinterfaces:
IContentStreamProvider

public interface IResourcesProvider


extends

An interface for all owner of PDResources.

Method Summary
PDResources getResources()

void setResources(PDResources resources)

Methods
getResources
public PDResources getResources()

setResources
public void setResources(PDResources resources)

Page 797 of 1521


de.intarsys.pdf.pd.OutlineItemFlags

de.intarsys.pdf.pd
Class OutlineItemFlags
java.lang.Object
|
+-de.intarsys.pdf.pd.AbstractBitFlags
|
+-de.intarsys.pdf.pd.OutlineItemFlags

public class OutlineItemFlags


extends AbstractBitFlags

The flags of an outline item.

The flags are bits of an integer.


The following bits are defined (more may exist).

• 0: show in italic
• 1: show in bold

Field Summary
public static final Bit_Bold

Value: 2

public static final Bit_Italic

Value: 1

Constructor Summary
public OutlineItemFlags(PDOutlineItem outlineItem)

Method Summary
boolean isBold()

boolean isItalic()

void setBold(boolean flag)

void setItalic(boolean flag)

Fields
Bit_Italic
public static final int Bit_Italic

Page 798 of 1521


de.intarsys.pdf.pd.OutlineItemFlags

(continued from last page)

Constant value: 1

Bit_Bold
public static final int Bit_Bold

Constant value: 2

Constructors
OutlineItemFlags
public OutlineItemFlags(PDOutlineItem outlineItem)

Methods
setItalic
public void setItalic(boolean flag)

isItalic
public boolean isItalic()

setBold
public void setBold(boolean flag)

isBold
public boolean isBold()

Page 799 of 1521


de.intarsys.pdf.pd.PDAcroForm

de.intarsys.pdf.pd
Class PDAcroForm
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAcroFormNode
|
+-de.intarsys.pdf.pd.PDAcroForm
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDAcroForm


extends PDAcroFormNode

The logical AcroForm hosted in a PDF document.

Nested Class Summary


class PDAcroForm.MetaClass
PDAcroForm.MetaClass

Field Summary
public static final DK_CO
The name of the CalculationOrder entry.

public static final DK_Fields


The name of the fields entry.

public static final DK_NeedAppearances


The name of the NeedApperances entry.

public static final DK_SigFlags


The name of the SignatureFlags entry.

public static final DK_XFA


The name of the XFAResources entry.

public static final META


The meta class instance

Method Summary
void addField(PDAcroFormField field)

COSObject cosGetXfa()
The /XFA entry of this.

PDAcroForm getAcroForm()

Page 800 of 1521


de.intarsys.pdf.pd.PDAcroForm

java.util.List getCalculationOrder()
A collection containing the PDAcroFormField objects in their calculation order or null if no
/C events are defined.

PDResources getDefaultResources()
The default resource dictionary.

java.util.List getFields()
A list of all direct PDAcroFormField instances associated with this object.

java.util.List getGenericChildren()

boolean getNeedAppearances()
true if /NeedAppearances is set for this form.

AcroFormSigFlags getSigFlags()
The flags associated with an AcroForm.

void invalidateCaches()

boolean isSignatureExists()
true if this form has a signature field.

boolean isSigned()
true if this form has a signed signature field.

boolean removeField(PDAcroFormField field)

void setDefaultResources(PDResources newResources)


Assign the default resource dictionary to be used with the form.

void setGenericParent(PDObject parent)

void setNeedAppearances(boolean newNeedAppearances)


Set the /NeedAppearances field for the form.

String toString()

Fields
DK_Fields
public static final de.intarsys.pdf.cos.COSName DK_Fields

The name of the fields entry.

DK_NeedAppearances
public static final de.intarsys.pdf.cos.COSName DK_NeedAppearances

The name of the NeedApperances entry.

Page 801 of 1521


de.intarsys.pdf.pd.PDAcroForm

(continued from last page)

DK_SigFlags
public static final de.intarsys.pdf.cos.COSName DK_SigFlags

The name of the SignatureFlags entry.

For a list of possible flags:

See Also:
AcroFormSigFlags

DK_CO
public static final de.intarsys.pdf.cos.COSName DK_CO

The name of the CalculationOrder entry.

DK_XFA
public static final de.intarsys.pdf.cos.COSName DK_XFA

The name of the XFAResources entry.

META
public static final de.intarsys.pdf.pd.PDAcroForm.MetaClass META

The meta class instance

Methods
getAcroForm
public PDAcroForm getAcroForm()

The PDAcroForm for this node.

setDefaultResources
public void setDefaultResources(PDResources newResources)

Assign the default resource dictionary to be used with the form.

Parameters:
newResources - The new default resource dictionary.

getDefaultResources
public PDResources getDefaultResources()

The default resource dictionary.

With 1.5 this is no longer supported as an entry in field dictionaries, only in the form itself.

Returns:
The default resource dictionary.

Page 802 of 1521


de.intarsys.pdf.pd.PDAcroForm

(continued from last page)

getCalculationOrder
public java.util.List getCalculationOrder()

A collection containing the PDAcroFormField objects in their calculation order or null if no /C events are defined.

Returns:
A collection containing the PDAcroFormField objects in their calculation order or null if no /C events are defined.

getFields
public java.util.List getFields()

A list of all direct PDAcroFormField instances associated with this object.

Returns:
A list of all direct PDAcroFormField instances associated with this object.

getGenericChildren
public java.util.List getGenericChildren()

Get a collection of PDObject children if the receiver is a node in a hierarchical structure (like page nodes or form fields).

This enables the generic implementation of inherited field values and so on.

A concrete PDObject implementation supporting inheritance should implement this method.

setGenericParent
public void setGenericParent(PDObject parent)

Set the parent of the receiver if it is a node in a hierarchical structure (like page nodes or form fields).

A concrete PDObject implementation supporting inheritance should implement this method.

setNeedAppearances
public void setNeedAppearances(boolean newNeedAppearances)

Set the /NeedAppearances field for the form. When true, a viewer application is required to re-create the visual
appearances for the fields.

Parameters:
newNeedAppearances - The new state for /NewwdAppearances

getNeedAppearances
public boolean getNeedAppearances()

true if /NeedAppearances is set for this form.

Returns:
true if /NeedAppearances is set for this form.

getSigFlags
public AcroFormSigFlags getSigFlags()

The flags associated with an AcroForm.

Page 803 of 1521


de.intarsys.pdf.pd.PDAcroForm

(continued from last page)

Returns:
The flags associated with an AcroForm.

addField
public void addField(PDAcroFormField field)

Insert a PDAcroFormField in the receiver node.

removeField
public boolean removeField(PDAcroFormField field)

Remove a PDAcroFormField from the receiver.

toString
public String toString()

invalidateCaches
public void invalidateCaches()

Invalidate all local caches as the base object may have changed.

cosGetXfa
public COSObject cosGetXfa()

The /XFA entry of this.

Returns:
The /XFA entry of this.

isSigned
public boolean isSigned()

true if this form has a signed signature field.

Returns:
true if this form has a signed signature field.

isSignatureExists
public boolean isSignatureExists()

true if this form has a signature field. This is NOT the same as the flag in the SigFlags entry but may be used to compute
this entry.

Returns:
true if this form has a signature field.

Page 804 of 1521


de.intarsys.pdf.pd.PDAcroForm.MetaClass

de.intarsys.pdf.pd
Class PDAcroForm.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAcroFormNode.MetaClass
|
+-de.intarsys.pdf.pd.PDAcroForm.MetaClass

public static class PDAcroForm.MetaClass


extends PDAcroFormNode.MetaClass

The meta class implementation

Page 805 of 1521


de.intarsys.pdf.pd.PDAcroFormField

de.intarsys.pdf.pd
Class PDAcroFormField
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAcroFormNode
|
+-de.intarsys.pdf.pd.PDAcroFormField
All Implemented Interfaces:
IAdditionalActionSupport, ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


PDAFButtonField, PDAFChoiceField, PDAFIntermediateNode, PDAFSignatureField, PDAFTextField

public abstract class PDAcroFormField


extends PDAcroFormNode
implements IAttributeSupport, ICOSObjectListener, IAdditionalActionSupport

Abstract superclass for the different field types in an AcroForm.

Nested Class Summary


class PDAcroFormField.MetaClass
PDAcroFormField.MetaClass

Field Summary
public static final ACROFORMFIELD_ACTION_TRIGGERS
supported additional action triggers

public static final ALIGNMENT_CENTER


alignment constant: 1: Centered
Value: 1

public static final ALIGNMENT_LEFT


alignment constant: 0: Left-justified
Value: 0

public static final ALIGNMENT_RIGHT


alignment constant: 2: Right-justified
Value: 2

public static final CN_FT_Btn


Field type Button

public static final CN_FT_Ch


Field type Choice

public static final CN_FT_Sig


Field type Signature

Page 806 of 1521


de.intarsys.pdf.pd.PDAcroFormField

public static final CN_FT_Tx


Field type Text

public static final DK_DS


The name for the DefaultStyle entry.

public static final DK_DV


The key for the DefaultValue entry.

public static final DK_Ff


The name of the FieldFlags entry.

public static final DK_FT


The name for field types entry.

public static final DK_Kids


The name for the childrens entry.

public static final DK_MaxLen


The name for the MaximumLength entry.

public static final DK_Parent


The name for the parent entry.

public static final DK_RV


The name for RichTextString value entry.

public static final DK_T


The name for the partial field name entry, also called the local name.

public static final DK_TM


The name for the mapping entry.

public static final DK_TU


The name for the AlternateFieldName entry.

public static final DK_V


The name for the fields value entry.

public static final META


The meta class instance

Method Summary
void addAnnotation(PDWidgetAnnotation annot)
Insert a new PDAnnotation object for the form field.

void addField(PDAcroFormField field)

int basicGetFieldFlags()
Get the integer representing the field flags.

void basicSetFieldFlags(int newFlags)


Assign the integer representing the field flags.

PDAcroFormField copy()
Copy the receiver.

Page 807 of 1521


de.intarsys.pdf.pd.PDAcroFormField

COSObject cosGetDefaultValue()
Tries to return a valid /DV entry:

abstract COSName cosGetExpectedFieldType()


The AcroForm field type expected for this.

COSName cosGetFieldType()
The real AcroForm field type of this.

COSObject cosGetValue()
Tries to return a valid /V entry:

COSObject cosSetValue(COSObject newValue)


Sets the /V entry in this node and removes all /V entries in child nodes.

void dispose(boolean disposeEmptyAncestors)


Deprecated.

PDAcroForm getAcroForm()

PDAdditionalActions getAdditionalActions()

String getAlternateFieldName()
The fields alternate name.

PDAnnotation getAnyAnnotation()
Deprecated.

String getDefaultValueString()
The value from cosGetDefaultValue() converted to a String

AcroFormFieldFlags getFieldFlags()
The flags associated with the form field.

java.util.List getGenericChildren()

PDObject getGenericParent()

java.util.List getKids()
The child nodes of this (named after the /Kids key in the defining COSDictionary);

String getLocalName()
The local name for this node.

String getLocalName(boolean canonical)


The local name for this node.

PDAcroFormNode getLogicalParent()
The logical parent node of this PDAcroFormField.

PDAcroFormField getLogicalRoot()
The logical root node of this PDAcroFormField.

Integer getMaxLen()
The maximum length for this field or null if not defined.

PDAcroFormField getParent()
The parent node of this.

Page 808 of 1521


de.intarsys.pdf.pd.PDAcroFormField

String getQualifiedName()
A fully qualified name for this.

String getQualifiedName(boolean canonical)


A fully qualified name for this.

java.util.Set getSupportedTriggerEvents()

String getValueString()
The value from cosGetValue() converted to a String

void invalidateCaches()

boolean isAlignmentCenter()
true if variable text in this is centered.

boolean isAlignmentLeft()
true if variable text in this is left aligned.

boolean isAlignmentRight()
true if variable text in this is right aligned.

boolean isAnnotation()
Returns true when the field is an annotation

boolean isComb()
Convenience to access "comb" flag.

boolean isDoNotScroll()
Convenience to access "DoNotScroll" flag.

boolean isMultiline()
Convenience to access "Multiline" flag.

boolean isNoExport()
Convenience to access "NoExport" flag.

boolean isReadOnly()
Convenience to access "ReadOnly" flag.

boolean isTypeBtn()
Return true if this is a field of type "Btn".

boolean isTypeCh()
Return true if this is a field of type "Ch".

boolean isTypeSig()
Return true if this is a field of type "Sig".

boolean isTypeTx()
Return true if this is a text field.

boolean removeField(PDAcroFormField field)

void reset()
Reset this to its default value.

void setAdditionalActions(PDAdditionalActions actions)

Page 809 of 1521


de.intarsys.pdf.pd.PDAcroFormField

void setAlignmentCenter()
Make variable text centered.

void setAlignmentLeft()
Make variable text left aligned.

void setAlignmentRight()
Make variable text right aligned.

void setAlternateFieldName(String newAlternateFieldName)


Asssign a alternate field name.

void setComb(boolean f)
Convenience method to access "Comb" flag.

void setDefaultValue(String value)


Assign a new default value.

void setDoNotScroll(boolean f)
Convenience method to access "DoNotScroll" flag.

void setLocalName(String newLocalName)


Assign a new local name.

void setMaxLength(Integer newMaxLength)


Set the maximum length for this field.

void setMultiline(boolean f)
Convenience method to access "Multiline" flag.

void setNoExport(boolean f)
Convenience method to access "NoExport" flag.

void setReadOnly(boolean f)
Convenience method to access "ReadOnly" flag.

void setValueString(String value)


Set the value of this.

void setValueStrings(java.util.List values)


Set the value of this to a java.util.List of java.lang.String objects.

String toString()

Fields
DK_FT
public static final de.intarsys.pdf.cos.COSName DK_FT

The name for field types entry.

CN_FT_Btn
public static final de.intarsys.pdf.cos.COSName CN_FT_Btn

Field type Button

Page 810 of 1521


de.intarsys.pdf.pd.PDAcroFormField

CN_FT_Tx
public static final de.intarsys.pdf.cos.COSName CN_FT_Tx

Field type Text

CN_FT_Ch
public static final de.intarsys.pdf.cos.COSName CN_FT_Ch

Field type Choice

CN_FT_Sig
public static final de.intarsys.pdf.cos.COSName CN_FT_Sig

Field type Signature

DK_Parent
public static final de.intarsys.pdf.cos.COSName DK_Parent

The name for the parent entry.

DK_Kids
public static final de.intarsys.pdf.cos.COSName DK_Kids

The name for the childrens entry.

DK_T
public static final de.intarsys.pdf.cos.COSName DK_T

The name for the partial field name entry, also called the local name.

DK_TU
public static final de.intarsys.pdf.cos.COSName DK_TU

The name for the AlternateFieldName entry.

DK_TM
public static final de.intarsys.pdf.cos.COSName DK_TM

The name for the mapping entry.

DK_Ff
public static final de.intarsys.pdf.cos.COSName DK_Ff

The name of the FieldFlags entry.

For a list of possible flags:

See Also:

Page 811 of 1521


de.intarsys.pdf.pd.PDAcroFormField

(continued from last page)


AcroFormFieldFlags

DK_V
public static final de.intarsys.pdf.cos.COSName DK_V

The name for the fields value entry.

DK_DV
public static final de.intarsys.pdf.cos.COSName DK_DV

The key for the DefaultValue entry.

ALIGNMENT_LEFT
public static final int ALIGNMENT_LEFT

alignment constant: 0: Left-justified


Constant value: 0

ALIGNMENT_CENTER
public static final int ALIGNMENT_CENTER

alignment constant: 1: Centered


Constant value: 1

ALIGNMENT_RIGHT
public static final int ALIGNMENT_RIGHT

alignment constant: 2: Right-justified


Constant value: 2

DK_DS
public static final de.intarsys.pdf.cos.COSName DK_DS

The name for the DefaultStyle entry.

DK_RV
public static final de.intarsys.pdf.cos.COSName DK_RV

The name for RichTextString value entry.

ACROFORMFIELD_ACTION_TRIGGERS
public static final java.util.Set ACROFORMFIELD_ACTION_TRIGGERS

supported additional action triggers

META
public static final de.intarsys.pdf.pd.PDAcroFormField.MetaClass META

The meta class instance

Page 812 of 1521


de.intarsys.pdf.pd.PDAcroFormField

DK_MaxLen
public static final de.intarsys.pdf.cos.COSName DK_MaxLen

The name for the MaximumLength entry.

Methods
addAnnotation
public void addAnnotation(PDWidgetAnnotation annot)

Insert a new PDAnnotation object for the form field. The annotation represents the visual component displaying the
logical form field. A form field can be represented by more than one annotation.

Parameters:
annot - The PDAnnotation to add to the field.

addField
public void addField(PDAcroFormField field)

Insert a PDAcroFormField in the receiver node.

basicGetFieldFlags
public int basicGetFieldFlags()

Get the integer representing the field flags.

Returns:
Get the integer representing the field flags.

basicSetFieldFlags
public void basicSetFieldFlags(int newFlags)

Assign the integer representing the field flags.

Parameters:
newFlags - The new flags

copy
public PDAcroFormField copy()

Copy the receiver.

The copy made does NOT contain any children information.

Returns:
A copy of the receiver.

cosGetDefaultValue
public COSObject cosGetDefaultValue()

Page 813 of 1521


de.intarsys.pdf.pd.PDAcroFormField

(continued from last page)


Tries to return a valid /DV entry:

1. returns its own /DV entry, if it is not null


2. returns the /DV entry of its logical root, if it is not null
3. returns the first /DV entry found of the logical roots kids
4. null if nothing was found

Returns:
see description

cosGetExpectedFieldType
public abstract COSName cosGetExpectedFieldType()

The AcroForm field type expected for this.

Returns:
The AcroForm field type expected for this.

cosGetFieldType
public COSName cosGetFieldType()

The real AcroForm field type of this.

Returns:
The real AcroForm field type of this.

cosGetValue
public COSObject cosGetValue()
Tries to return a valid /V entry:

1. returns its own /V entry, if it is not null


2. returns the /V entry of its logical root, if it is not null
3. returns the first /V entry found of the logical roots kids
4. null if nothing was found

Returns:
see description

cosSetValue
public COSObject cosSetValue(COSObject newValue)

Sets the /V entry in this node and removes all /V entries in child nodes.

Parameters:
newValue

Returns:
The /V entry previously associated with this.

Page 814 of 1521


de.intarsys.pdf.pd.PDAcroFormField

(continued from last page)

dispose
public void dispose(boolean disposeEmptyAncestors)

Deprecated.

Parameters:
disposeEmptyAncestors

getAcroForm
public PDAcroForm getAcroForm()

The PDAcroForm for this node.

getAdditionalActions
public PDAdditionalActions getAdditionalActions()

getAlternateFieldName
public String getAlternateFieldName()

The fields alternate name.

Returns:
The fields alternate name.

getAnyAnnotation
public PDAnnotation getAnyAnnotation()

Deprecated.

a acro form field may be associated with a widget annotation. somewhere down in the hierarchy there MUST be an
annotation. this method returns the first annotation available.

Returns:
the first associated annotation object if available (or null)

getFieldFlags
public AcroFormFieldFlags getFieldFlags()

The flags associated with the form field.

Returns:
The flags associated with the form field.

getGenericChildren
public java.util.List getGenericChildren()

Page 815 of 1521


de.intarsys.pdf.pd.PDAcroFormField

(continued from last page)

Get a collection of PDObject children if the receiver is a node in a hierarchical structure (like page nodes or form fields).

This enables the generic implementation of inherited field values and so on.

A concrete PDObject implementation supporting inheritance should implement this method.

getGenericParent
public PDObject getGenericParent()

The parent of the receiver if it is a node in a hierarchical structure (like page nodes or form fields).

A concrete PDObject implementation supporting inheritance should implement this method.

getKids
public java.util.List getKids()

The child nodes of this (named after the /Kids key in the defining COSDictionary);

Returns:
The child nodes of this.

getLocalName
public String getLocalName()

The local name for this node. This method returns null for an non existing or empty /T entry in the defining
COSDictionary.

Returns:
The local name for this node.

getLocalName
public String getLocalName(boolean canonical)

The local name for this node. This method returns null for an non existing or empty /T entry in the base COSDictionary.
The name is transformed to canonical form if canonical is true.

Parameters:
canonical - Flag if the name shoul be in canonical form.

Returns:
The local name for this node.

getLogicalParent
public PDAcroFormNode getLogicalParent()

The logical parent node of this PDAcroFormField.

The logical parent is the next node up the parent hierarchy that has a different qualified name, this means it is a node that
does not designate the same logical field as the receiver.

Returns:
the logical parent, or the form itself.

Page 816 of 1521


de.intarsys.pdf.pd.PDAcroFormField

(continued from last page)

getLogicalRoot
public PDAcroFormField getLogicalRoot()

The logical root node of this PDAcroFormField.

The logical root is the last node up the parent hierarchy that has the name qualified name, this means the topmost node that
designates the same logical field as the receiver.

Returns:
the root field, or this.

getMaxLen
public Integer getMaxLen()

The maximum length for this field or null if not defined.

Returns:
The maximum length for this field or null if not defined.

getParent
public PDAcroFormField getParent()

The parent node of this.

AcroForm fields are arranged in a hierarchical structure, beginning with the root AcroForm. Fields under the AcroForm
return null as their parent.

Returns:
The parent node of this.

getQualifiedName
public String getQualifiedName()

A fully qualified name for this.

The name of a acro form field is the concatenation of every node's name in the hierarchy, separated with '.'.

Returns:
A fully qualified name for this.

getQualifiedName
public String getQualifiedName(boolean canonical)

A fully qualified name for this. If requested, the name is in canonical format.

The name of a acro form field is the concatenation of every node's name in the hierarchy, separated with '.'.

Parameters:
canonical - Flag if the name is in canonical format

Returns:
A fully qualified name for this.

Page 817 of 1521


de.intarsys.pdf.pd.PDAcroFormField

(continued from last page)

getSupportedTriggerEvents
public java.util.Set getSupportedTriggerEvents()

getValueString
public String getValueString()

The value from cosGetValue() converted to a String

Returns:
The value from cosGetValue() converted to a String

getDefaultValueString
public String getDefaultValueString()

The value from cosGetDefaultValue() converted to a String

Returns:
The value from cosGetDefaultValue() converted to a String

invalidateCaches
public void invalidateCaches()

Invalidate all local caches as the base object may have changed.

isAlignmentCenter
public boolean isAlignmentCenter()

true if variable text in this is centered.

Returns:
true if variable text in this is centered.

isAlignmentLeft
public boolean isAlignmentLeft()

true if variable text in this is left aligned.

Returns:
true if variable text in this is left aligned.

isAlignmentRight
public boolean isAlignmentRight()

true if variable text in this is right aligned.

Returns:
true if variable text in this is right aligned.

Page 818 of 1521


de.intarsys.pdf.pd.PDAcroFormField

(continued from last page)

isAnnotation
public boolean isAnnotation()

Returns true when the field is an annotation

Returns:
true when the field is an annotation

isComb
public boolean isComb()

Convenience to access "comb" flag.

isDoNotScroll
public boolean isDoNotScroll()

Convenience to access "DoNotScroll" flag.

isMultiline
public boolean isMultiline()

Convenience to access "Multiline" flag.

isNoExport
public boolean isNoExport()

Convenience to access "NoExport" flag.

isReadOnly
public boolean isReadOnly()

Convenience to access "ReadOnly" flag.

isTypeBtn
public boolean isTypeBtn()

Return true if this is a field of type "Btn".

"Btn" means this is a button style object.

Returns:
Return true if this is a field of type "Btn".

isTypeCh
public boolean isTypeCh()

Return true if this is a field of type "Ch".

"Ch" means this is a choice object.

Returns:

Page 819 of 1521


de.intarsys.pdf.pd.PDAcroFormField

(continued from last page)

Return true if this is a field of type "Ch".

isTypeSig
public boolean isTypeSig()

Return true if this is a field of type "Sig".

"Sig" means this is a text style object.

Returns:
Return true if this is a field of type "Sig".

isTypeTx
public boolean isTypeTx()

Return true if this is a text field.

"Tx" means this is a text style object.

Returns:
Return true if this is a field of type "Tx".

removeField
public boolean removeField(PDAcroFormField field)

Remove a PDAcroFormField from the receiver.

reset
public void reset()

Reset this to its default value.

setAdditionalActions
public void setAdditionalActions(PDAdditionalActions actions)

setAlignmentCenter
public void setAlignmentCenter()

Make variable text centered.

setAlignmentLeft
public void setAlignmentLeft()

Make variable text left aligned.

setAlignmentRight
public void setAlignmentRight()

Make variable text right aligned.

Page 820 of 1521


de.intarsys.pdf.pd.PDAcroFormField

setAlternateFieldName
public void setAlternateFieldName(String newAlternateFieldName)

Asssign a alternate field name.

Parameters:
newAlternateFieldName - The new alternate field name

setComb
public void setComb(boolean f)

Convenience method to access "Comb" flag.

setDefaultValue
public void setDefaultValue(String value)

Assign a new default value. The default value is used if no value (/V) is available.

Parameters:
value - The new default value.

setDoNotScroll
public void setDoNotScroll(boolean f)

Convenience method to access "DoNotScroll" flag.

setLocalName
public void setLocalName(String newLocalName)

Assign a new local name.

Parameters:
newLocalName - The new local name

setMaxLength
public void setMaxLength(Integer newMaxLength)

Set the maximum length for this field.

Parameters:
newMaxLength - The new maximum length

setMultiline
public void setMultiline(boolean f)

Convenience method to access "Multiline" flag.

setNoExport
public void setNoExport(boolean f)

Page 821 of 1521


de.intarsys.pdf.pd.PDAcroFormField

(continued from last page)

Convenience method to access "NoExport" flag.

setReadOnly
public void setReadOnly(boolean f)

Convenience method to access "ReadOnly" flag.

setValueString
public void setValueString(String value)

Set the value of this.

Parameters:
value - The new value of this, represented by a java.lang.String.

setValueStrings
public void setValueStrings(java.util.List values)

Set the value of this to a java.util.List of java.lang.String objects.

Parameters:
values - The new value.

toString
public String toString()

Page 822 of 1521


de.intarsys.pdf.pd.PDAcroFormField.MetaClass

de.intarsys.pdf.pd
Class PDAcroFormField.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAcroFormNode.MetaClass
|
+-de.intarsys.pdf.pd.PDAcroFormField.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass, MetaClass, MetaClass, MetaClass

public static class PDAcroFormField.MetaClass


extends PDAcroFormNode.MetaClass

The meta class implementation

Page 823 of 1521


de.intarsys.pdf.pd.PDAcroFormNode

de.intarsys.pdf.pd
Class PDAcroFormNode
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAcroFormNode
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


PDAcroForm, PDAcroFormField

public abstract class PDAcroFormNode


extends PDObject

Abstract superclass to factor out commons between AcroForm and AcroForm field.

Nested Class Summary


class PDAcroFormNode.MetaClass
PDAcroFormNode.MetaClass

Field Summary
public static final DK_DA
The name for the DefaultAppereance entry.

public static final DK_DR


The name for the default resources.

public static final DK_Encoding


The name for the Encoding.

public static final DK_Font


The name for the fonts.

public static final DK_Q


The name for the Quadding entry.

public static final META


The meta class instance

Method Summary
abstract void addField(PDAcroFormField field)
Insert a PDAcroFormField in the receiver node.

static String canonicalize(String name)


Create a canonical form of the field name.

Page 824 of 1521


de.intarsys.pdf.pd.PDAcroFormNode

java.util.List collectLeafFields()
The list of all final nodes (fields) within this node.

abstract PDAcroForm getAcroForm()


The PDAcroForm for this node.

PDAnnotation getAnnotation(int index)


Get an annotation from the tree beyond this identified by index.

java.util.List getAnnotations()
A list of all annotations in the tree beyond this.

CSContent getDefaultAppearanceContent()
The CSContent fragment defining the default appearance to be used for variable text
fields.

PDFont getDefaultAppearanceFont()
The font object defined by the default appearance.

float[] getDefaultAppearanceFontColor()
The font color defined by the default appearance.

COSName getDefaultAppearanceFontName()
The font name used by the default appearance to select a font from the resources.

float getDefaultAppearanceFontSize()
The font size defined by the default appearance,

PDAcroFormField getField(String path)


The sub-node identified by path.

PDAcroFormField getField(String name, boolean canonicalName)


The sub-node identified by path.

int getQuadding()
The justification of variable text within the field.

void invalidateCaches()

abstract boolean removeField(PDAcroFormField field)


Remove a PDAcroFormField from the receiver.

void setDefaultAppearanceContent(CSContent pContent)


Set the content stream fragment to be used as the default appearance with variable text
fields.

void setDefaultAppearanceFont(PDFont font)


Set the font to be used as the default font in variable text fields.

void setDefaultAppearanceFontColor(float[] color)


Set the font color to be used as the default font color in variable text fields.

void setDefaultAppearanceFontSize(float size)


Set the font size to be used as the default font size in variable text fields.

void setQuadding(int quadding)


Set the justification of variable text within the field.

Page 825 of 1521


de.intarsys.pdf.pd.PDAcroFormNode

(continued from last page)

Fields
DK_Encoding
public static final de.intarsys.pdf.cos.COSName DK_Encoding

The name for the Encoding.

DK_DR
public static final de.intarsys.pdf.cos.COSName DK_DR

The name for the default resources.

DK_Font
public static final de.intarsys.pdf.cos.COSName DK_Font

The name for the fonts.

DK_DA
public static final de.intarsys.pdf.cos.COSName DK_DA

The name for the DefaultAppereance entry.

DK_Q
public static final de.intarsys.pdf.cos.COSName DK_Q

The name for the Quadding entry.

META
public static final de.intarsys.pdf.pd.PDAcroFormNode.MetaClass META

The meta class instance

Methods
canonicalize
public static String canonicalize(String name)

Create a canonical form of the field name.

Parameters:
name - The field name to be converted.

Returns:
The canonical for of the field name.

addField
public abstract void addField(PDAcroFormField field)

Insert a PDAcroFormField in the receiver node.

Page 826 of 1521


de.intarsys.pdf.pd.PDAcroFormNode

(continued from last page)

Parameters:
field - The field to be inserted.

removeField
public abstract boolean removeField(PDAcroFormField field)

Remove a PDAcroFormField from the receiver.

Parameters:
field - The field to remove.

Returns:
true if field was removed.

getAcroForm
public abstract PDAcroForm getAcroForm()

The PDAcroForm for this node.

Returns:
The PDAcroForm for this node.

getAnnotation
public PDAnnotation getAnnotation(int index)

Get an annotation from the tree beyond this identified by index.

Returns:
An annotation from the tree beyond this identified by index.

getAnnotations
public java.util.List getAnnotations()

A list of all annotations in the tree beyond this.

Returns:
A list of all annotations in the tree beyond this.

getDefaultAppearanceContent
public CSContent getDefaultAppearanceContent()

The CSContent fragment defining the default appearance to be used for variable text fields.

Returns:
The CSContent fragment defining the default appearance to be used for variable text fields.

getDefaultAppearanceFont
public PDFont getDefaultAppearanceFont()

The font object defined by the default appearance.

Page 827 of 1521


de.intarsys.pdf.pd.PDAcroFormNode

(continued from last page)

Returns:
The font object defined by the default appearance.

getDefaultAppearanceFontColor
public float[] getDefaultAppearanceFontColor()

The font color defined by the default appearance.

Returns:
The font color defined by the default appearance.

getDefaultAppearanceFontName
public COSName getDefaultAppearanceFontName()

The font name used by the default appearance to select a font from the resources.

Returns:
The font name used by the default appearance to select a font from the resources.

getDefaultAppearanceFontSize
public float getDefaultAppearanceFontSize()

The font size defined by the default appearance,

Returns:
The font size defined by the default appearance,

getField
public PDAcroFormField getField(String path)

The sub-node identified by path. The path may be a navigation path containing multiple segments separated by a ".",
each segment identifying a sub node in the node found so far.

The navigation starts at this and the first path segment is matched against the node's children. Example:
AcroForm | + Field1 | + Group1 | + FieldA | + FieldB When requesting the form itself,
Field1 is addressed form.getField("Field1"); FieldA can be looked up
form.getField("Group1.FieldA"); or group = form.getField("Group1");
group.getField("FieldA");

Parameters:
path - The navigation path to the field.

Returns:
The sub-node identified by path.

getField
public PDAcroFormField getField(String name,
boolean canonicalName)

The sub-node identified by path. The path may be a navigation path containing multiple segments separated by a ".",
each segment identifying a sub node in the node found so far. If canonicalName is true, the name will be transformed to
a canonical format before lookup.

Parameters:
name - The navigation path to the field.

Page 828 of 1521


de.intarsys.pdf.pd.PDAcroFormNode

(continued from last page)

canonicalName - Flag if lookup uses canonical form.

Returns:
The sub-node identified by path

collectLeafFields
public java.util.List collectLeafFields()

The list of all final nodes (fields) within this node.

Returns:
The list of all final nodes (fields) within this node.

getQuadding
public int getQuadding()
The justification of variable text within the field.

• 0
• left (default)
• 1
• centered
• 2
• right

Returns:
An int representing the intended quadding for this field

invalidateCaches
public void invalidateCaches()

Invalidate all local caches as the base object may have changed.

setDefaultAppearanceContent
public void setDefaultAppearanceContent(CSContent pContent)

Set the content stream fragment to be used as the default appearance with variable text fields.

Parameters:
pContent - The new default appearance content.

setDefaultAppearanceFont
public void setDefaultAppearanceFont(PDFont font)

Set the font to be used as the default font in variable text fields.

Parameters:
font - The font to be used as the default font in variable text fields.

Page 829 of 1521


de.intarsys.pdf.pd.PDAcroFormNode

(continued from last page)

setDefaultAppearanceFontColor
public void setDefaultAppearanceFontColor(float[] color)

Set the font color to be used as the default font color in variable text fields.

Parameters:
color - The font color to be used as the default font color in variable text fields.

setDefaultAppearanceFontSize
public void setDefaultAppearanceFontSize(float size)

Set the font size to be used as the default font size in variable text fields.

Parameters:
size - The font size to be used as the default font size in variable text fields.

setQuadding
public void setQuadding(int quadding)

Set the justification of variable text within the field.

Parameters:
quadding - THe new quadding value

Page 830 of 1521


de.intarsys.pdf.pd.PDAcroFormNode.MetaClass

de.intarsys.pdf.pd
Class PDAcroFormNode.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAcroFormNode.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass, MetaClass, MetaClass

public static class PDAcroFormNode.MetaClass


extends PDObject.MetaClass

The meta class implementation

Method Summary
Class getRootClass()

Methods
getRootClass
public Class getRootClass()

Page 831 of 1521


de.intarsys.pdf.pd.PDAction

de.intarsys.pdf.pd
Class PDAction
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAction
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


PDActionAny, PDActionGoTo, PDActionGoToR, PDActionJavaScript, PDActionLaunch, PDActionNamed,
PDActionResetForm, PDActionSubmitForm, PDActionURI

public abstract class PDAction


extends PDObject

A PDF document can be interative by defining actions for different events. This is an abstract superclass for the implementation of
the various action types.

Nested Class Summary


class PDAction.MetaClass
PDAction.MetaClass

Field Summary
public static final CN_Type_Action

public static final DK_Next

public static final DK_S

public static final META


The meta class instance

Method Summary
void addNext(PDAction action)
Add a new PDAction to be executed after this.

COSName cosGetActionType()
The real action type.

abstract COSName cosGetExpectedActionType()


The action type expected for a PDAction of the instantiated class.

java.util.List getNext()
The java.util.List of PDAction instances that must be executed after this.

Page 832 of 1521


de.intarsys.pdf.pd.PDAction

void removeNext(PDAction action)


Remove a PDAction from the actions to be executed after this.

Fields
META
public static final de.intarsys.pdf.pd.PDAction.MetaClass META

The meta class instance

DK_S
public static final de.intarsys.pdf.cos.COSName DK_S

DK_Next
public static final de.intarsys.pdf.cos.COSName DK_Next

CN_Type_Action
public static final de.intarsys.pdf.cos.COSName CN_Type_Action

Methods
cosGetExpectedActionType
public abstract COSName cosGetExpectedActionType()

The action type expected for a PDAction of the instantiated class.

Returns:
The action type expected for a PDAction of the instantiated class.

cosGetActionType
public COSName cosGetActionType()

The real action type.

Returns:
The real action type.

getNext
public java.util.List getNext()

The java.util.List of PDAction instances that must be executed after this.

Page 833 of 1521


de.intarsys.pdf.pd.PDAction

(continued from last page)

Returns:
The java.util.List of PDAction instances that must be executed after this.

addNext
public void addNext(PDAction action)

Add a new PDAction to be executed after this.

Parameters:
action - The new PDAction

removeNext
public void removeNext(PDAction action)

Remove a PDAction from the actions to be executed after this.

Parameters:
action - The PDAction to be removed

Page 834 of 1521


de.intarsys.pdf.pd.PDAction.MetaClass

de.intarsys.pdf.pd
Class PDAction.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAction.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass, MetaClass, MetaClass, MetaClass, MetaClass, MetaClass, MetaClass, MetaClass

public static class PDAction.MetaClass


extends PDObject.MetaClass

The meta class implementation

Method Summary
Class getRootClass()

Methods
getRootClass
public Class getRootClass()

Page 835 of 1521


de.intarsys.pdf.pd.PDActionAny

de.intarsys.pdf.pd
Class PDActionAny
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAction
|
+-de.intarsys.pdf.pd.PDActionAny
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDActionAny


extends PDAction

A generic action implementation to be used when no specific implementation needed or around.

Nested Class Summary


class PDActionAny.MetaClass
PDActionAny.MetaClass

Field Summary
public static final CN_ActionType_GoTo3DView

public static final CN_ActionType_GoToE


all currently undefined or not implemented action types

public static final CN_ActionType_Hide

public static final CN_ActionType_ImportData

public static final CN_ActionType_Movie

public static final CN_ActionType_no_op

public static final CN_ActionType_Rendition

public static final CN_ActionType_set_state

public static final CN_ActionType_SetOCGState

public static final CN_ActionType_Sound

public static final CN_ActionType_Thread

Page 836 of 1521


de.intarsys.pdf.pd.PDActionAny

public static final CN_ActionType_Trans

public static final META


The meta class instance

Method Summary
COSName cosGetExpectedActionType()

static PDActionAny createNew(COSName actionType)

Fields
CN_ActionType_GoToE
public static final de.intarsys.pdf.cos.COSName CN_ActionType_GoToE

all currently undefined or not implemented action types

CN_ActionType_Thread
public static final de.intarsys.pdf.cos.COSName CN_ActionType_Thread

CN_ActionType_Sound
public static final de.intarsys.pdf.cos.COSName CN_ActionType_Sound

CN_ActionType_Movie
public static final de.intarsys.pdf.cos.COSName CN_ActionType_Movie

CN_ActionType_Hide
public static final de.intarsys.pdf.cos.COSName CN_ActionType_Hide

CN_ActionType_ImportData
public static final de.intarsys.pdf.cos.COSName CN_ActionType_ImportData

CN_ActionType_SetOCGState
public static final de.intarsys.pdf.cos.COSName CN_ActionType_SetOCGState

Page 837 of 1521


de.intarsys.pdf.pd.PDActionAny

CN_ActionType_Rendition
public static final de.intarsys.pdf.cos.COSName CN_ActionType_Rendition

CN_ActionType_Trans
public static final de.intarsys.pdf.cos.COSName CN_ActionType_Trans

CN_ActionType_GoTo3DView
public static final de.intarsys.pdf.cos.COSName CN_ActionType_GoTo3DView

CN_ActionType_set_state
public static final de.intarsys.pdf.cos.COSName CN_ActionType_set_state

CN_ActionType_no_op
public static final de.intarsys.pdf.cos.COSName CN_ActionType_no_op

META
public static final de.intarsys.pdf.pd.PDActionAny.MetaClass META

The meta class instance

Methods
cosGetExpectedActionType
public COSName cosGetExpectedActionType()

The action type expected for a PDAction of the instantiated class.

createNew
public static PDActionAny createNew(COSName actionType)

Page 838 of 1521


de.intarsys.pdf.pd.PDActionAny.MetaClass

de.intarsys.pdf.pd
Class PDActionAny.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAction.MetaClass
|
+-de.intarsys.pdf.pd.PDActionAny.MetaClass

public static class PDActionAny.MetaClass


extends PDAction.MetaClass

The meta class implementation

Page 839 of 1521


de.intarsys.pdf.pd.PDActionGoTo

de.intarsys.pdf.pd
Class PDActionGoTo
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAction
|
+-de.intarsys.pdf.pd.PDActionGoTo
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDActionGoTo


extends PDAction

The GoTo action.

When executed the action focuses a viewer to a new destination.

Nested Class Summary


class PDActionGoTo.MetaClass
PDActionGoTo.MetaClass

Field Summary
public static final CN_ActionType_GoTo

public static final DK_D

public static final META


The meta class instance

Method Summary
COSName cosGetExpectedActionType()

PDDestination getDestination()

void invalidateCaches()

Fields
META
public static final de.intarsys.pdf.pd.PDActionGoTo.MetaClass META

The meta class instance

Page 840 of 1521


de.intarsys.pdf.pd.PDActionGoTo

CN_ActionType_GoTo
public static final de.intarsys.pdf.cos.COSName CN_ActionType_GoTo

DK_D
public static final de.intarsys.pdf.cos.COSName DK_D

Methods
cosGetExpectedActionType
public COSName cosGetExpectedActionType()

The action type expected for a PDAction of the instantiated class.

getDestination
public PDDestination getDestination()

invalidateCaches
public void invalidateCaches()

Invalidate all local caches as the base object may have changed.

Page 841 of 1521


de.intarsys.pdf.pd.PDActionGoTo.MetaClass

de.intarsys.pdf.pd
Class PDActionGoTo.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAction.MetaClass
|
+-de.intarsys.pdf.pd.PDActionGoTo.MetaClass

public static class PDActionGoTo.MetaClass


extends PDAction.MetaClass

The meta class implementation

Page 842 of 1521


de.intarsys.pdf.pd.PDActionGoToR

de.intarsys.pdf.pd
Class PDActionGoToR
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAction
|
+-de.intarsys.pdf.pd.PDActionGoToR
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDActionGoToR


extends PDAction

The GoToR action.

When executed the action focuses a viewer to a new destination.

Nested Class Summary


class PDActionGoToR.MetaClass
PDActionGoToR.MetaClass

Field Summary
public static final CN_ActionType_GoToR

public static final DK_D

public static final DK_F

public static final DK_NewWindow

public static final META


The meta class instance

Method Summary
COSName cosGetExpectedActionType()

PDDestination getDestination()

java.io.File getFile()

void invalidateCaches()

boolean isNewWindow()

Page 843 of 1521


de.intarsys.pdf.pd.PDActionGoToR

Fields
META
public static final de.intarsys.pdf.pd.PDActionGoToR.MetaClass META

The meta class instance

CN_ActionType_GoToR
public static final de.intarsys.pdf.cos.COSName CN_ActionType_GoToR

DK_D
public static final de.intarsys.pdf.cos.COSName DK_D

DK_F
public static final de.intarsys.pdf.cos.COSName DK_F

DK_NewWindow
public static final de.intarsys.pdf.cos.COSName DK_NewWindow

Methods
cosGetExpectedActionType
public COSName cosGetExpectedActionType()

The action type expected for a PDAction of the instantiated class.

getDestination
public PDDestination getDestination()

getFile
public java.io.File getFile()

isNewWindow
public boolean isNewWindow()

Page 844 of 1521


de.intarsys.pdf.pd.PDActionGoToR

(continued from last page)

invalidateCaches
public void invalidateCaches()

Invalidate all local caches as the base object may have changed.

Page 845 of 1521


de.intarsys.pdf.pd.PDActionGoToR.MetaClass

de.intarsys.pdf.pd
Class PDActionGoToR.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAction.MetaClass
|
+-de.intarsys.pdf.pd.PDActionGoToR.MetaClass

public static class PDActionGoToR.MetaClass


extends PDAction.MetaClass

The meta class implementation

Page 846 of 1521


de.intarsys.pdf.pd.PDActionJavaScript

de.intarsys.pdf.pd
Class PDActionJavaScript
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAction
|
+-de.intarsys.pdf.pd.PDActionJavaScript
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDActionJavaScript


extends PDAction

The JavaScript action.

When executed the action executes a user defined JavaScript.

Nested Class Summary


class PDActionJavaScript.MetaClass
PDActionJavaScript.MetaClass

Field Summary
public static final CN_ActionType_JavaScript

public static final DK_JS

public static final META


The meta class instance

Method Summary
COSName cosGetExpectedActionType()

static createNew(String script)


PDActionJavaScript

static String decodeSource(COSObject cosSource)

String getJavaScript()

void setJavaScript(String newJavaScript)

Fields

Page 847 of 1521


de.intarsys.pdf.pd.PDActionJavaScript

(continued from last page)

CN_ActionType_JavaScript
public static final de.intarsys.pdf.cos.COSName CN_ActionType_JavaScript

DK_JS
public static final de.intarsys.pdf.cos.COSName DK_JS

META
public static final de.intarsys.pdf.pd.PDActionJavaScript.MetaClass META

The meta class instance

Methods
createNew
public static PDActionJavaScript createNew(String script)

decodeSource
public static String decodeSource(COSObject cosSource)

cosGetExpectedActionType
public COSName cosGetExpectedActionType()

The action type expected for a PDAction of the instantiated class.

getJavaScript
public String getJavaScript()

setJavaScript
public void setJavaScript(String newJavaScript)

Page 848 of 1521


de.intarsys.pdf.pd.PDActionJavaScript.MetaClass

de.intarsys.pdf.pd
Class PDActionJavaScript.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAction.MetaClass
|
+-de.intarsys.pdf.pd.PDActionJavaScript.MetaClass

public static class PDActionJavaScript.MetaClass


extends PDAction.MetaClass

The meta class implementation

Page 849 of 1521


de.intarsys.pdf.pd.PDActionLaunch

de.intarsys.pdf.pd
Class PDActionLaunch
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAction
|
+-de.intarsys.pdf.pd.PDActionLaunch
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDActionLaunch


extends PDAction

The Launch action.

When executed the action opens a file.

Nested Class Summary


class PDActionLaunch.MetaClass
PDActionLaunch.MetaClass

Field Summary
public static final CN_ActionType_Launch

public static final DK_F

public static final DK_NewWindow

public static final META


The meta class instance

Method Summary
COSName cosGetExpectedActionType()

java.io.File getFile()

boolean isNewWindow()

Fields

Page 850 of 1521


de.intarsys.pdf.pd.PDActionLaunch

(continued from last page)

META
public static final de.intarsys.pdf.pd.PDActionLaunch.MetaClass META

The meta class instance

CN_ActionType_Launch
public static final de.intarsys.pdf.cos.COSName CN_ActionType_Launch

DK_F
public static final de.intarsys.pdf.cos.COSName DK_F

DK_NewWindow
public static final de.intarsys.pdf.cos.COSName DK_NewWindow

Methods
cosGetExpectedActionType
public COSName cosGetExpectedActionType()

The action type expected for a PDAction of the instantiated class.

getFile
public java.io.File getFile()

isNewWindow
public boolean isNewWindow()

Page 851 of 1521


de.intarsys.pdf.pd.PDActionLaunch.MetaClass

de.intarsys.pdf.pd
Class PDActionLaunch.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAction.MetaClass
|
+-de.intarsys.pdf.pd.PDActionLaunch.MetaClass

public static class PDActionLaunch.MetaClass


extends PDAction.MetaClass

The meta class implementation

Page 852 of 1521


de.intarsys.pdf.pd.PDActionNamed

de.intarsys.pdf.pd
Class PDActionNamed
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAction
|
+-de.intarsys.pdf.pd.PDActionNamed
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDActionNamed


extends PDAction

A named action.

When executed the action performs one of the defined named actions within the document.

Nested Class Summary


class PDActionNamed.MetaClass
PDActionNamed.MetaClass

Field Summary
public static final CN_ActionType_Named

public static final CN_Name_FirstPage

public static final CN_Name_LastPage

public static final CN_Name_NextPage

public static final CN_Name_PrevPage

public static final DK_Name

public static final META


The meta class instance

Method Summary
COSName cosGetExpectedActionType()

COSName cosGetName()

COSName cosSetName(COSName name)

Page 853 of 1521


de.intarsys.pdf.pd.PDActionNamed

static PDActionNamed createNew(String name)

Fields
META
public static final de.intarsys.pdf.pd.PDActionNamed.MetaClass META

The meta class instance

CN_ActionType_Named
public static final de.intarsys.pdf.cos.COSName CN_ActionType_Named

DK_Name
public static final de.intarsys.pdf.cos.COSName DK_Name

CN_Name_NextPage
public static final de.intarsys.pdf.cos.COSName CN_Name_NextPage

CN_Name_PrevPage
public static final de.intarsys.pdf.cos.COSName CN_Name_PrevPage

CN_Name_FirstPage
public static final de.intarsys.pdf.cos.COSName CN_Name_FirstPage

CN_Name_LastPage
public static final de.intarsys.pdf.cos.COSName CN_Name_LastPage

Methods
cosGetExpectedActionType
public COSName cosGetExpectedActionType()

The action type expected for a PDAction of the instantiated class.

Page 854 of 1521


de.intarsys.pdf.pd.PDActionNamed

(continued from last page)

createNew
public static PDActionNamed createNew(String name)

cosGetName
public COSName cosGetName()

cosSetName
public COSName cosSetName(COSName name)

Page 855 of 1521


de.intarsys.pdf.pd.PDActionNamed.MetaClass

de.intarsys.pdf.pd
Class PDActionNamed.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAction.MetaClass
|
+-de.intarsys.pdf.pd.PDActionNamed.MetaClass

public static class PDActionNamed.MetaClass


extends PDAction.MetaClass

The meta class implementation

Page 856 of 1521


de.intarsys.pdf.pd.PDActionResetForm

de.intarsys.pdf.pd
Class PDActionResetForm
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAction
|
+-de.intarsys.pdf.pd.PDActionResetForm
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDActionResetForm


extends PDAction

The ResetForm action.

When executed the action clears all field in an AcroForm.

Nested Class Summary


class PDActionResetForm.MetaClass
PDActionResetForm.MetaClass

Field Summary
public static final CN_ActionType_ResetForm

public static final DK_Fields

public static final DK_Flags

public static final META


The meta class instance

Method Summary
COSName cosGetExpectedActionType()

static createNew()
PDActionResetForm

java.util.List getFields()
A list of field names (plain Java String) to be resetted or null.

boolean isExclude()

Fields

Page 857 of 1521


de.intarsys.pdf.pd.PDActionResetForm

(continued from last page)

META
public static final de.intarsys.pdf.pd.PDActionResetForm.MetaClass META

The meta class instance

CN_ActionType_ResetForm
public static final de.intarsys.pdf.cos.COSName CN_ActionType_ResetForm

DK_Fields
public static final de.intarsys.pdf.cos.COSName DK_Fields

DK_Flags
public static final de.intarsys.pdf.cos.COSName DK_Flags

Methods
createNew
public static PDActionResetForm createNew()

cosGetExpectedActionType
public COSName cosGetExpectedActionType()

The action type expected for a PDAction of the instantiated class.

isExclude
public boolean isExclude()

getFields
public java.util.List getFields()

A list of field names (plain Java String) to be resetted or null.

Returns:
A list of field names (plain Java String) to be resetted or null.

Page 858 of 1521


de.intarsys.pdf.pd.PDActionResetForm.MetaClass

de.intarsys.pdf.pd
Class PDActionResetForm.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAction.MetaClass
|
+-de.intarsys.pdf.pd.PDActionResetForm.MetaClass

public static class PDActionResetForm.MetaClass


extends PDAction.MetaClass

The meta class implementation

Page 859 of 1521


de.intarsys.pdf.pd.PDActionSubmitForm

de.intarsys.pdf.pd
Class PDActionSubmitForm
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAction
|
+-de.intarsys.pdf.pd.PDActionSubmitForm
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDActionSubmitForm


extends PDAction

The SubmitForm action.

When executed the action submit the documents AcroForm acording to the defined flags.

Nested Class Summary


class PDActionSubmitForm.MetaClass
PDActionSubmitForm.MetaClass

Field Summary
public static final CN_ActionType_SubmitForm

public static final DK_F

public static final DK_Fields

public static final DK_Flags

public static final META


The meta class instance

Method Summary
COSName cosGetExpectedActionType()

static createNew(java.net.URL url)


PDActionSubmitForm

java.util.List getFields()
A list of field names (plain Java String) to be resetted or null.

java.net.URL getUrl()

Page 860 of 1521


de.intarsys.pdf.pd.PDActionSubmitForm

boolean isCanonicalFormat()

boolean isEmbedForm()

boolean isExclFKey()

boolean isExclNonUserAnnots()

boolean isExportFormat()

boolean isGetMethod()

boolean isInclude()

boolean isIncludeAnnotations()

boolean isIncludeAppendSaves()

boolean isIncludeNoValueFields()

boolean isNotDEFINED()

boolean isSubmitCoordinates()

boolean isSubmitPDF()

boolean isXFDF()

void setCanonicalFormat(boolean flag)

void setEmbedForm(boolean flag)

void setExclFKey(boolean flag)

void setExclNonUserAnnots(boolean flag)

void setExportFormat(boolean flag)

void setGetMethod(boolean flag)

void setInclude(boolean flag)

void setIncludeAnnotations(boolean flag)

void setIncludeAppendSaves(boolean flag)

void setIncludeNoValueFields(boolean flag)

Page 861 of 1521


de.intarsys.pdf.pd.PDActionSubmitForm

void setNotDEFINED(boolean flag)

void setSubmitCoordinates(boolean flag)

void setSubmitPDF(boolean flag)

void setUrl(java.net.URL url)

void setXFDF(boolean flag)

Fields
META
public static final de.intarsys.pdf.pd.PDActionSubmitForm.MetaClass META

The meta class instance

CN_ActionType_SubmitForm
public static final de.intarsys.pdf.cos.COSName CN_ActionType_SubmitForm

DK_F
public static final de.intarsys.pdf.cos.COSName DK_F

DK_Fields
public static final de.intarsys.pdf.cos.COSName DK_Fields

DK_Flags
public static final de.intarsys.pdf.cos.COSName DK_Flags

Methods
cosGetExpectedActionType
public COSName cosGetExpectedActionType()

The action type expected for a PDAction of the instantiated class.

setCanonicalFormat
public void setCanonicalFormat(boolean flag)

Page 862 of 1521


de.intarsys.pdf.pd.PDActionSubmitForm

(continued from last page)

isCanonicalFormat
public boolean isCanonicalFormat()

setEmbedForm
public void setEmbedForm(boolean flag)

isEmbedForm
public boolean isEmbedForm()

setExclFKey
public void setExclFKey(boolean flag)

isExclFKey
public boolean isExclFKey()

setExclNonUserAnnots
public void setExclNonUserAnnots(boolean flag)

isExclNonUserAnnots
public boolean isExclNonUserAnnots()

setExportFormat
public void setExportFormat(boolean flag)

isExportFormat
public boolean isExportFormat()

Page 863 of 1521


de.intarsys.pdf.pd.PDActionSubmitForm

(continued from last page)

setGetMethod
public void setGetMethod(boolean flag)

isGetMethod
public boolean isGetMethod()

setInclude
public void setInclude(boolean flag)

isInclude
public boolean isInclude()

setIncludeAnnotations
public void setIncludeAnnotations(boolean flag)

isIncludeAnnotations
public boolean isIncludeAnnotations()

setIncludeAppendSaves
public void setIncludeAppendSaves(boolean flag)

isIncludeAppendSaves
public boolean isIncludeAppendSaves()

setIncludeNoValueFields
public void setIncludeNoValueFields(boolean flag)

isIncludeNoValueFields
public boolean isIncludeNoValueFields()

Page 864 of 1521


de.intarsys.pdf.pd.PDActionSubmitForm

(continued from last page)

setNotDEFINED
public void setNotDEFINED(boolean flag)

isNotDEFINED
public boolean isNotDEFINED()

setSubmitCoordinates
public void setSubmitCoordinates(boolean flag)

isSubmitCoordinates
public boolean isSubmitCoordinates()

setSubmitPDF
public void setSubmitPDF(boolean flag)

isSubmitPDF
public boolean isSubmitPDF()

setUrl
public void setUrl(java.net.URL url)

getUrl
public java.net.URL getUrl()

setXFDF
public void setXFDF(boolean flag)

Page 865 of 1521


de.intarsys.pdf.pd.PDActionSubmitForm

(continued from last page)

isXFDF
public boolean isXFDF()

createNew
public static PDActionSubmitForm createNew(java.net.URL url)

getFields
public java.util.List getFields()

A list of field names (plain Java String) to be resetted or null.

Returns:
A list of field names (plain Java String) to be resetted or null.

Page 866 of 1521


de.intarsys.pdf.pd.PDActionSubmitForm.MetaClass

de.intarsys.pdf.pd
Class PDActionSubmitForm.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAction.MetaClass
|
+-de.intarsys.pdf.pd.PDActionSubmitForm.MetaClass

public static class PDActionSubmitForm.MetaClass


extends PDAction.MetaClass

The meta class implementation

Page 867 of 1521


de.intarsys.pdf.pd.PDActionURI

de.intarsys.pdf.pd
Class PDActionURI
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAction
|
+-de.intarsys.pdf.pd.PDActionURI
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDActionURI


extends PDAction

The URI action.

When executed the action focuses a viewer to a new destination.

Nested Class Summary


class PDActionURI.MetaClass
PDActionURI.MetaClass

Field Summary
public static final CN_ActionType_URI

public static final DK_IsMap

public static final DK_URI

public static final META


The meta class instance

Method Summary
COSName cosGetExpectedActionType()

static PDActionURI createNew(String uri)

String getURI()

boolean isMap()

void setMap(boolean map)

void setURI(String uri)

Page 868 of 1521


de.intarsys.pdf.pd.PDActionURI

Fields
META
public static final de.intarsys.pdf.pd.PDActionURI.MetaClass META

The meta class instance

CN_ActionType_URI
public static final de.intarsys.pdf.cos.COSName CN_ActionType_URI

DK_URI
public static final de.intarsys.pdf.cos.COSName DK_URI

DK_IsMap
public static final de.intarsys.pdf.cos.COSName DK_IsMap

Methods
cosGetExpectedActionType
public COSName cosGetExpectedActionType()

The action type expected for a PDAction of the instantiated class.

createNew
public static PDActionURI createNew(String uri)

getURI
public String getURI()

setURI
public void setURI(String uri)

isMap
public boolean isMap()

Page 869 of 1521


de.intarsys.pdf.pd.PDActionURI

(continued from last page)

setMap
public void setMap(boolean map)

Page 870 of 1521


de.intarsys.pdf.pd.PDActionURI.MetaClass

de.intarsys.pdf.pd
Class PDActionURI.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAction.MetaClass
|
+-de.intarsys.pdf.pd.PDActionURI.MetaClass

public static class PDActionURI.MetaClass


extends PDAction.MetaClass

The meta class implementation

Page 871 of 1521


de.intarsys.pdf.pd.PDAdditionalActions

de.intarsys.pdf.pd
Class PDAdditionalActions
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAdditionalActions
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDAdditionalActions


extends PDObject

An object defining the association of an event to an action for a PDF document object, for example a PDPage.

Nested Class Summary


class PDAdditionalActions.MetaClass
PDAdditionalActions.MetaClass

Field Summary
public static final CN_T_Mouse_Down

public static final CN_trigger_Bl

public static final CN_trigger_C

public static final CN_trigger_D

public static final CN_trigger_DC

public static final CN_trigger_DP

public static final CN_trigger_DS

public static final CN_trigger_E

public static final CN_trigger_F

public static final CN_trigger_Fo

public static final CN_trigger_K

public static final CN_trigger_O

Page 872 of 1521


de.intarsys.pdf.pd.PDAdditionalActions

public static final CN_trigger_PC

public static final CN_trigger_PI

public static final CN_trigger_PO

public static final CN_trigger_PV

public static final CN_trigger_U

public static final CN_trigger_V

public static final CN_trigger_WC


WC is the same as DC - not specified, but used by acrobat

public static final CN_trigger_WP

public static final CN_trigger_WS

public static final CN_trigger_X

public static final META


The meta class instance

Method Summary
void addAction(COSName trigger, PDAction action)

void clearAction(COSName trigger)

PDAction getAction(COSName trigger)

static String getEventName(COSName reason)

static String getEventType(COSName reason)

void setAction(COSName trigger, PDAction action)

Fields
CN_trigger_E
public static final de.intarsys.pdf.cos.COSName CN_trigger_E

CN_trigger_X
public static final de.intarsys.pdf.cos.COSName CN_trigger_X

Page 873 of 1521


de.intarsys.pdf.pd.PDAdditionalActions

(continued from last page)

CN_trigger_D
public static final de.intarsys.pdf.cos.COSName CN_trigger_D

CN_trigger_U
public static final de.intarsys.pdf.cos.COSName CN_trigger_U

CN_trigger_Fo
public static final de.intarsys.pdf.cos.COSName CN_trigger_Fo

CN_trigger_Bl
public static final de.intarsys.pdf.cos.COSName CN_trigger_Bl

CN_trigger_PO
public static final de.intarsys.pdf.cos.COSName CN_trigger_PO

CN_trigger_PC
public static final de.intarsys.pdf.cos.COSName CN_trigger_PC

CN_trigger_PV
public static final de.intarsys.pdf.cos.COSName CN_trigger_PV

CN_trigger_PI
public static final de.intarsys.pdf.cos.COSName CN_trigger_PI

CN_trigger_O
public static final de.intarsys.pdf.cos.COSName CN_trigger_O

Page 874 of 1521


de.intarsys.pdf.pd.PDAdditionalActions

(continued from last page)

CN_trigger_K
public static final de.intarsys.pdf.cos.COSName CN_trigger_K

CN_trigger_F
public static final de.intarsys.pdf.cos.COSName CN_trigger_F

CN_trigger_V
public static final de.intarsys.pdf.cos.COSName CN_trigger_V

CN_trigger_C
public static final de.intarsys.pdf.cos.COSName CN_trigger_C

CN_trigger_DC
public static final de.intarsys.pdf.cos.COSName CN_trigger_DC

CN_trigger_WC
public static final de.intarsys.pdf.cos.COSName CN_trigger_WC

WC is the same as DC - not specified, but used by acrobat

CN_trigger_WS
public static final de.intarsys.pdf.cos.COSName CN_trigger_WS

CN_trigger_DS
public static final de.intarsys.pdf.cos.COSName CN_trigger_DS

CN_trigger_WP
public static final de.intarsys.pdf.cos.COSName CN_trigger_WP

CN_trigger_DP
public static final de.intarsys.pdf.cos.COSName CN_trigger_DP

Page 875 of 1521


de.intarsys.pdf.pd.PDAdditionalActions

(continued from last page)

CN_T_Mouse_Down
public static final de.intarsys.pdf.cos.COSName CN_T_Mouse_Down

META
public static final de.intarsys.pdf.pd.PDAdditionalActions.MetaClass META

The meta class instance

Methods
getEventName
public static String getEventName(COSName reason)

getEventType
public static String getEventType(COSName reason)

getAction
public PDAction getAction(COSName trigger)

addAction
public void addAction(COSName trigger,
PDAction action)

setAction
public void setAction(COSName trigger,
PDAction action)

clearAction
public void clearAction(COSName trigger)

Page 876 of 1521


de.intarsys.pdf.pd.PDAdditionalActions.MetaClass

de.intarsys.pdf.pd
Class PDAdditionalActions.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAdditionalActions.MetaClass

public static class PDAdditionalActions.MetaClass


extends PDObject.MetaClass

The meta class implementation

Page 877 of 1521


de.intarsys.pdf.pd.PDAFButtonField

de.intarsys.pdf.pd
Class PDAFButtonField
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAcroFormNode
|
+-de.intarsys.pdf.pd.PDAcroFormField
|
+-de.intarsys.pdf.pd.PDAFButtonField
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IAdditionalActionSupport

public class PDAFButtonField


extends PDAcroFormField

A logical button within an AcroForm.

Nested Class Summary


class PDAFButtonField.MetaClass
PDAFButtonField.MetaClass

Field Summary
public static final DK_Opt

public static final META


The meta class instance

Method Summary
COSName cosGetExpectedFieldType()

COSObject cosSetValue(COSObject state)

java.util.Set getAvailableButtonAppearanceStates()
The java.util.Set of possible states the button can enter.

java.util.Set getAvailableButtonAppearanceStatesNoOff()
The java.util.Set of possible non - off states the button can enter.

boolean isCheckbox()
Return true when this is an object with checkbox behavior.

boolean isChecked()
true if this is checked.

boolean isPushbutton()
true if this is a pushbutton.

Page 878 of 1521


de.intarsys.pdf.pd.PDAFButtonField

boolean isRadio()
true if this is a radio button.

boolean isTypeBtn()

void reset()

void setPushbutton(boolean f)
Make this a push button.

void setValueString(String value)

Fields
META
public static final de.intarsys.pdf.pd.PDAFButtonField.MetaClass META

The meta class instance

DK_Opt
public static final de.intarsys.pdf.cos.COSName DK_Opt

Methods
isCheckbox
public boolean isCheckbox()

Return true when this is an object with checkbox behavior.

Returns:
true when this is an object with checkbox behavior.

cosGetExpectedFieldType
public COSName cosGetExpectedFieldType()

The AcroForm field type expected for this.

setPushbutton
public void setPushbutton(boolean f)

Make this a push button.

Parameters:
f

Page 879 of 1521


de.intarsys.pdf.pd.PDAFButtonField

(continued from last page)

isPushbutton
public boolean isPushbutton()

true if this is a pushbutton.

Returns:
true if this is a pushbutton.

isRadio
public boolean isRadio()

true if this is a radio button.

Returns:
true if this is a radio button.

isTypeBtn
public boolean isTypeBtn()

Return true if this is a field of type "Btn".

"Btn" means this is a button style object.

cosSetValue
public COSObject cosSetValue(COSObject state)

Sets the /V entry in this node and removes all /V entries in child nodes.

setValueString
public void setValueString(String value)

Set the value of this.

getAvailableButtonAppearanceStates
public java.util.Set getAvailableButtonAppearanceStates()

The java.util.Set of possible states the button can enter.

Returns:
The java.util.Set of possible states the button can enter.

getAvailableButtonAppearanceStatesNoOff
public java.util.Set getAvailableButtonAppearanceStatesNoOff()

The java.util.Set of possible non - off states the button can enter.

Returns:
The java.util.Set of possible non - off states the button can enter.

Page 880 of 1521


de.intarsys.pdf.pd.PDAFButtonField

(continued from last page)

reset
public void reset()

Reset this to its default value.

isChecked
public boolean isChecked()

true if this is checked.

Returns:
true if this is checked.

Page 881 of 1521


de.intarsys.pdf.pd.PDAFButtonField.MetaClass

de.intarsys.pdf.pd
Class PDAFButtonField.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAcroFormNode.MetaClass
|
+-de.intarsys.pdf.pd.PDAcroFormField.MetaClass
|
+-de.intarsys.pdf.pd.PDAFButtonField.MetaClass

public static class PDAFButtonField.MetaClass


extends PDAcroFormField.MetaClass

Page 882 of 1521


de.intarsys.pdf.pd.PDAFChoiceField

de.intarsys.pdf.pd
Class PDAFChoiceField
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAcroFormNode
|
+-de.intarsys.pdf.pd.PDAcroFormField
|
+-de.intarsys.pdf.pd.PDAFChoiceField
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IAdditionalActionSupport

public class PDAFChoiceField


extends PDAcroFormField

A logical choice field within an AcroForm.

Nested Class Summary


class PDAFChoiceField.MetaClass
PDAFChoiceField.MetaClass

Field Summary
public static final DK_I

public static final DK_Opt

public static final DK_TI

public static final META


The meta class instance

Method Summary
COSName cosGetExpectedFieldType()

java.util.List getExportValues()
A List containing the option export values as Strings.

java.util.List getOptionNames()
A List containing the option names as Strings.

java.util.List getValueList()
The value stored in this field as a java.util.List of java.lang.String objects

void invalidateCaches()

Page 883 of 1521


de.intarsys.pdf.pd.PDAFChoiceField

boolean isCombo()
Convenience method to access "Combo" flag.

boolean isCommitOnSelChange()
Convenience method to access "CommitOnSelChange" flag.

boolean isEdit()
Convenience method to access "Edit" flag.

boolean isMultiSelect()
Convenience method to access "MultiSelect" flag.

boolean isTypeCh()

void setOptions(java.util.Map options)


Assign the currently active options.

void setOptions(String[] names, String[] values)


Assign the currently active options.

void setValueString(String value)

void setValueStrings(java.util.List values)

Fields
DK_Opt
public static final de.intarsys.pdf.cos.COSName DK_Opt

DK_TI
public static final de.intarsys.pdf.cos.COSName DK_TI

DK_I
public static final de.intarsys.pdf.cos.COSName DK_I

META
public static final de.intarsys.pdf.pd.PDAFChoiceField.MetaClass META

The meta class instance

Methods

Page 884 of 1521


de.intarsys.pdf.pd.PDAFChoiceField

(continued from last page)

cosGetExpectedFieldType
public COSName cosGetExpectedFieldType()

The AcroForm field type expected for this.

getExportValues
public java.util.List getExportValues()

A List containing the option export values as Strings.

Returns:
a List containing the option export values as Strings. The result will never be null.

getOptionNames
public java.util.List getOptionNames()

A List containing the option names as Strings.

Returns:
a List containing the option names as Strings. The result will never be null.

getValueList
public java.util.List getValueList()

The value stored in this field as a java.util.List of java.lang.String objects

Returns:
The value stored in this field as a java.util.List of java.lang.String objects

invalidateCaches
public void invalidateCaches()

Invalidate all local caches as the base object may have changed.

isCombo
public boolean isCombo()

Convenience method to access "Combo" flag.

isCommitOnSelChange
public boolean isCommitOnSelChange()

Convenience method to access "CommitOnSelChange" flag.

isEdit
public boolean isEdit()

Convenience method to access "Edit" flag.

Page 885 of 1521


de.intarsys.pdf.pd.PDAFChoiceField

isMultiSelect
public boolean isMultiSelect()

Convenience method to access "MultiSelect" flag.

isTypeCh
public boolean isTypeCh()

Return true if this is a field of type "Ch".

"Ch" means this is a choice object.

setOptions
public void setOptions(java.util.Map options)

Assign the currently active options.

Parameters:
options - A java.util.Map containing the new options.

setOptions
public void setOptions(String[] names,
String[] values)

Assign the currently active options.

Parameters:
names
values

setValueString
public void setValueString(String value)

Set the value of this.

setValueStrings
public void setValueStrings(java.util.List values)

Set the value of this to a java.util.List of java.lang.String objects.

Page 886 of 1521


de.intarsys.pdf.pd.PDAFChoiceField.MetaClass

de.intarsys.pdf.pd
Class PDAFChoiceField.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAcroFormNode.MetaClass
|
+-de.intarsys.pdf.pd.PDAcroFormField.MetaClass
|
+-de.intarsys.pdf.pd.PDAFChoiceField.MetaClass

public static class PDAFChoiceField.MetaClass


extends PDAcroFormField.MetaClass

Page 887 of 1521


de.intarsys.pdf.pd.PDAFIntermediateNode

de.intarsys.pdf.pd
Class PDAFIntermediateNode
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAcroFormNode
|
+-de.intarsys.pdf.pd.PDAcroFormField
|
+-de.intarsys.pdf.pd.PDAFIntermediateNode
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IAdditionalActionSupport

public class PDAFIntermediateNode


extends PDAcroFormField

Just an intermediate, structural node in the acro form hierarchy.

Nested Class Summary


class PDAFIntermediateNode.MetaClass
PDAFIntermediateNode.MetaClass

Field Summary
public static final META
The meta class instance

Constructor Summary
public PDAFIntermediateNode(COSObject object)

Method Summary
COSName cosGetExpectedFieldType()

Fields
META
public static final de.intarsys.pdf.pd.PDAFIntermediateNode.MetaClass META

The meta class instance

Constructors

Page 888 of 1521


de.intarsys.pdf.pd.PDAFIntermediateNode

(continued from last page)

PDAFIntermediateNode
public PDAFIntermediateNode(COSObject object)

Methods
cosGetExpectedFieldType
public COSName cosGetExpectedFieldType()

The AcroForm field type expected for this.

Page 889 of 1521


de.intarsys.pdf.pd.PDAFIntermediateNode.MetaClass

de.intarsys.pdf.pd
Class PDAFIntermediateNode.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAcroFormNode.MetaClass
|
+-de.intarsys.pdf.pd.PDAcroFormField.MetaClass
|
+-de.intarsys.pdf.pd.PDAFIntermediateNode.MetaClass

public static class PDAFIntermediateNode.MetaClass


extends PDAcroFormField.MetaClass

Page 890 of 1521


de.intarsys.pdf.pd.PDAFSignatureField

de.intarsys.pdf.pd
Class PDAFSignatureField
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAcroFormNode
|
+-de.intarsys.pdf.pd.PDAcroFormField
|
+-de.intarsys.pdf.pd.PDAFSignatureField
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IAdditionalActionSupport

public class PDAFSignatureField


extends PDAcroFormField

A logical signature field within an AcroForm.

Nested Class Summary


class PDAFSignatureField.MetaClass
PDAFSignatureField.MetaClass

Field Summary
public static final DK_Lock

public static final DK_SV

public static final META


The meta class instance

Method Summary
void clearSignature()

COSName cosGetExpectedFieldType()

COSObject cosSetValue(COSObject newValue)

PDSignature getSignature()
The associated PDSignature if available.

void invalidateCaches()

boolean isSigned()
true if this field is already signed.

Page 891 of 1521


de.intarsys.pdf.pd.PDAFSignatureField

boolean isTypeSig()

void setSignature(PDSignature newSignature)


Assign a new signature value.

Fields
DK_Lock
public static final de.intarsys.pdf.cos.COSName DK_Lock

DK_SV
public static final de.intarsys.pdf.cos.COSName DK_SV

META
public static final de.intarsys.pdf.pd.PDAFSignatureField.MetaClass META

The meta class instance

Methods
cosGetExpectedFieldType
public COSName cosGetExpectedFieldType()

The AcroForm field type expected for this.

cosSetValue
public COSObject cosSetValue(COSObject newValue)

Sets the /V entry in this node and removes all /V entries in child nodes.

getSignature
public PDSignature getSignature()

The associated PDSignature if available.

Returns:
The associated PDSignature if available.

isSigned
public boolean isSigned()

true if this field is already signed.

Returns:

Page 892 of 1521


de.intarsys.pdf.pd.PDAFSignatureField

(continued from last page)

true if this field is already signed.

isTypeSig
public boolean isTypeSig()

Return true if this is a field of type "Sig".

"Sig" means this is a text style object.

setSignature
public void setSignature(PDSignature newSignature)

Assign a new signature value.

Parameters:
newSignature - The new signature value.

invalidateCaches
public void invalidateCaches()

Invalidate all local caches as the base object may have changed.

clearSignature
public void clearSignature()

Page 893 of 1521


de.intarsys.pdf.pd.PDAFSignatureField.MetaClass

de.intarsys.pdf.pd
Class PDAFSignatureField.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAcroFormNode.MetaClass
|
+-de.intarsys.pdf.pd.PDAcroFormField.MetaClass
|
+-de.intarsys.pdf.pd.PDAFSignatureField.MetaClass

public static class PDAFSignatureField.MetaClass


extends PDAcroFormField.MetaClass

Page 894 of 1521


de.intarsys.pdf.pd.PDAFTextField

de.intarsys.pdf.pd
Class PDAFTextField
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAcroFormNode
|
+-de.intarsys.pdf.pd.PDAcroFormField
|
+-de.intarsys.pdf.pd.PDAFTextField
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IAdditionalActionSupport

public class PDAFTextField


extends PDAcroFormField

A logical text field within an AcroForm.

Nested Class Summary


class PDAFTextField.MetaClass
PDAFTextField.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
COSName cosGetExpectedFieldType()

String getDefaultValueString()

String getValueString()

boolean isTypeTx()

void reset()

void setDefaultValue(String value)

void setValueString(String value)

Fields

Page 895 of 1521


de.intarsys.pdf.pd.PDAFTextField

(continued from last page)

META
public static final de.intarsys.pdf.pd.PDAFTextField.MetaClass META

The meta class instance

Methods
cosGetExpectedFieldType
public COSName cosGetExpectedFieldType()

The AcroForm field type expected for this.

setValueString
public void setValueString(String value)

Set the value of this.

setDefaultValue
public void setDefaultValue(String value)

Assign a new default value. The default value is used if no value (/V) is available.

getValueString
public String getValueString()

The value from cosGetValue() converted to a String

getDefaultValueString
public String getDefaultValueString()

The value from cosGetDefaultValue() converted to a String

isTypeTx
public boolean isTypeTx()

Return true if this is a text field.

"Tx" means this is a text style object.

reset
public void reset()

Reset this to its default value.

Page 896 of 1521


de.intarsys.pdf.pd.PDAFTextField.MetaClass

de.intarsys.pdf.pd
Class PDAFTextField.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAcroFormNode.MetaClass
|
+-de.intarsys.pdf.pd.PDAcroFormField.MetaClass
|
+-de.intarsys.pdf.pd.PDAFTextField.MetaClass

public static class PDAFTextField.MetaClass


extends PDAcroFormField.MetaClass

The meta class implementation

Page 897 of 1521


de.intarsys.pdf.pd.PDAnnotation

de.intarsys.pdf.pd
Class PDAnnotation
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAnnotation
All Implemented Interfaces:
IAdditionalActionSupport, ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


PDAnyAnnotation, PDLinkAnnotation, PDMarkupAnnotation, PDPopupAnnotation, PDWidgetAnnotation

public abstract class PDAnnotation


extends PDObject
implements IAttributeSupport, ICOSObjectListener, IAdditionalActionSupport

An Annotation is an abstract object that allows a PDF document to be changed and extended in a variety of ways. Annotations are
recorded with a page in the PDF document. The behavior of an annotation depends on the subtype.

Nested Class Summary


class PDAnnotation.MetaClass
PDAnnotation.MetaClass

Field Summary
public static final ANNOTATION_ACTION_TRIGGERS
supported additional action triggers

public static final CN_Type_Annot

public static final DK_A

public static final DK_AP

public static final DK_AS

public static final DK_Border

public static final DK_BS

public static final DK_C

public static final DK_CA

public static final DK_Contents

Page 898 of 1521


de.intarsys.pdf.pd.PDAnnotation

public static final DK_F


The name for the F entry.

public static final DK_IC

public static final DK_M

public static final DK_NM

public static final DK_OC

public static final DK_P

public static final DK_Rect

public static final DK_StructParent

public static final META


The meta class instance

Method Summary
void addAction(PDAction newAction)
Add a PDAction to be executed when this is "activated".

int basicGetFlags()
The annotation flags in its integer representation.

void basicSetFlags(int newFlags)


Assign the annotation flags in integer representation.

boolean canReceiveFocus()
true if this can receive the focus in an interactive viewer.

PDAnnotation copy()
Create a copy of the receiver.

void dispose()
Deprecated.

PDAction getAction()
The PDAction to be executed when this is "activated".

PDAdditionalActions getAdditionalActions()

PDAppearance getAppearance()
The visual appearance of this.

COSName getAppearanceState()
The visual appearance state of this.

java.util.Set getAppearanceStates()
All defined appearance states in this.

Page 899 of 1521


de.intarsys.pdf.pd.PDAnnotation

PDBorderStyle getBorderStyle()
The annotations border style.

COSName getBorderStyleName()
The name of the border style.

float getBorderStyleWidth()
The width of the annotations border.

float[] getColor()
The color values for this.

String getContents()
The contents java.lang.String for this.

AnnotationFlags getFlags()
The annotation flags.

CDSDate getModified()
The last modification date.

String getName()
The annotations name.

CDSRectangle getNormalizedRectangle()
Convenience method to access a normalized copy of the receivers rectangle.

PDPage getPage()
Try to access the PDPage we are on.

CDSRectangle getRectangle()
The CDSRectangle for the visual appearance of this.

abstract String getSubtypeLabel()


A java.lang.String representation of this.

java.util.Set getSupportedTriggerEvents()

void invalidateCaches()

boolean isHidden()
Convenience method to access "Hidden" flag.

boolean isInvisible()
Convenience method to access "Invisible" flag.

boolean isLocked()
Convenience method to access "Locked" flag.

boolean isMarkupAnnotation()
true if this is a PDMarkupAnnotation.

boolean isNoRotate()
Convenience method to access "NoRotate" flag.

boolean isNoView()
Convenience method to access "NoView" flag.

Page 900 of 1521


de.intarsys.pdf.pd.PDAnnotation

boolean isNoZoom()
Convenience method to access "NoZoom" flag.

boolean isPrint()
Convenience method to access "Print" flag.

boolean isReadOnly()
Convenience method to access "ReadOnly" flag.

boolean isToggleNoView()
Convenience method to access "ToggleNoView" flag.

boolean isWidgetAnnotation()
true if this is a PDWidgetAnnotation.

void setAction(PDAction newAction)


Set the PDAction for the "activation" of this.

void setAdditionalActions(PDAdditionalActions actions)

void setAppearance(PDAppearance newAppearance)


Assign a PDAppearance to this.

void setAppearanceState(COSName newAppearanceState)


Select a concrete PDForm from the PDAppearance.

void setBorderStyle(PDBorderStyle newBorderStyle)


Assign a PDBorderStyle.

void setBorderStyleName(COSName newStyle)


Assign a border style name.

void setBorderStyleWidth(float newWidth)


Assign a border width.

void setColor(float[] color)


Assign a color.

void setContents(String newContents)


Assign a content java.lang.String.

void setHidden(boolean f)
Convenience method to access "Hidden" flag.

void setInvisible(boolean f)
Convenience method to access "Invisible" flag.

void setLocked(boolean f)
Convenience method to access "Locked" flag.

void setName(String newName)


Assign a name.

void setNoRotate(boolean f)
Convenience method to access "NoRotate" flag.

void setNoView(boolean f)
Convenience method to access "NoView" flag.

Page 901 of 1521


de.intarsys.pdf.pd.PDAnnotation

void setNoZoom(boolean f)
Convenience method to access "NoZoom" flag.

void setPrint(boolean f)
Convenience method to access "Print" flag.

void setReadOnly(boolean readOnly)


Convenience method to access "ReadOnly" flag.

void setRectangle(CDSRectangle newRectangle)


Assign a CDSRectangle for the visual appearance of this.

void setToggleNoView(boolean f)
Convenience method to access "ToggleNoView" flag.

boolean supportsPrint()
true if print flag can be selected/changed for this kind of annotation.

String toString()

void touch()
Assign the current date as the date of last modification.

Fields
META
public static final de.intarsys.pdf.pd.PDAnnotation.MetaClass META

The meta class instance

DK_Contents
public static final de.intarsys.pdf.cos.COSName DK_Contents

DK_P
public static final de.intarsys.pdf.cos.COSName DK_P

DK_Rect
public static final de.intarsys.pdf.cos.COSName DK_Rect

DK_NM
public static final de.intarsys.pdf.cos.COSName DK_NM

Page 902 of 1521


de.intarsys.pdf.pd.PDAnnotation

(continued from last page)

DK_M
public static final de.intarsys.pdf.cos.COSName DK_M

DK_F
public static final de.intarsys.pdf.cos.COSName DK_F
The name for the F entry.

Currently:

• Bit 1: Invisible
• Bit 2: Hidden
• Bit 3: Print
• Bit 4: NoZoom
• Bit 5: NoRotate
• Bit 6: NoView
• Bit 7: ReadOnly
• Bit 8: Locked
• Bit 9: ToggleNoView

DK_BS
public static final de.intarsys.pdf.cos.COSName DK_BS

DK_Border
public static final de.intarsys.pdf.cos.COSName DK_Border

DK_AP
public static final de.intarsys.pdf.cos.COSName DK_AP

DK_AS
public static final de.intarsys.pdf.cos.COSName DK_AS

DK_C
public static final de.intarsys.pdf.cos.COSName DK_C

DK_CA
public static final de.intarsys.pdf.cos.COSName DK_CA

Page 903 of 1521


de.intarsys.pdf.pd.PDAnnotation

(continued from last page)

DK_IC
public static final de.intarsys.pdf.cos.COSName DK_IC

DK_A
public static final de.intarsys.pdf.cos.COSName DK_A

DK_StructParent
public static final de.intarsys.pdf.cos.COSName DK_StructParent

DK_OC
public static final de.intarsys.pdf.cos.COSName DK_OC

CN_Type_Annot
public static final de.intarsys.pdf.cos.COSName CN_Type_Annot

ANNOTATION_ACTION_TRIGGERS
public static final java.util.Set ANNOTATION_ACTION_TRIGGERS

supported additional action triggers

Methods
addAction
public void addAction(PDAction newAction)

Add a PDAction to be executed when this is "activated".

Parameters:
newAction - The PDAction to be executed.

basicGetFlags
public int basicGetFlags()

The annotation flags in its integer representation.

Returns:
The annotation flags in its integer representation.

Page 904 of 1521


de.intarsys.pdf.pd.PDAnnotation

basicSetFlags
public void basicSetFlags(int newFlags)

Assign the annotation flags in integer representation.

Parameters:
newFlags - The new annotation flags.

canReceiveFocus
public boolean canReceiveFocus()

true if this can receive the focus in an interactive viewer.

Returns:
true if this can receive the focus in an interactive viewer.

copy
public PDAnnotation copy()

Create a copy of the receiver.

Returns:
A copy of the receiver.

dispose
public void dispose()

Deprecated.

getAction
public PDAction getAction()

The PDAction to be executed when this is "activated".

Returns:
The PDAction to be executed when this is "activated".

getAdditionalActions
public PDAdditionalActions getAdditionalActions()

getAppearance
public PDAppearance getAppearance()

The visual appearance of this.

Returns:

Page 905 of 1521


de.intarsys.pdf.pd.PDAnnotation

(continued from last page)

The PDAction to be executed when this is "activated".

getAppearanceState
public COSName getAppearanceState()

The visual appearance state of this. This state selects an appearance within its PDAppearance.

Returns:
The visual appearance state of this.

getAppearanceStates
public java.util.Set getAppearanceStates()

All defined appearance states in this.

Returns:
All defined appearance states in this.

getBorderStyle
public PDBorderStyle getBorderStyle()

The annotations border style.

Returns:
The annotations border style.

getBorderStyleName
public COSName getBorderStyleName()

The name of the border style.

Returns:
The name of the border style.

getBorderStyleWidth
public float getBorderStyleWidth()

The width of the annotations border.

Returns:
The width of the annotations border.

getColor
public float[] getColor()

The color values for this.

Returns:
The color values for this.

Page 906 of 1521


de.intarsys.pdf.pd.PDAnnotation

(continued from last page)

getContents
public String getContents()

The contents java.lang.String for this.

Returns:
The contents java.lang.String for this.

getFlags
public AnnotationFlags getFlags()

The annotation flags.

Returns:
The annotation flags.

getModified
public CDSDate getModified()

The last modification date.

Returns:
The last modification date.

getName
public String getName()

The annotations name.

Returns:
The annotations name.

getNormalizedRectangle
public CDSRectangle getNormalizedRectangle()

Convenience method to access a normalized copy of the receivers rectangle.

getPage
public PDPage getPage()

Try to access the PDPage we are on. This may return null, as this reference is not required by the spec.

Returns:
Try to access the PDPage we are on.

getRectangle
public CDSRectangle getRectangle()

The CDSRectangle for the visual appearance of this.

Returns:

Page 907 of 1521


de.intarsys.pdf.pd.PDAnnotation

(continued from last page)

The CDSRectangle for the visual appearance of this.

getSubtypeLabel
public abstract String getSubtypeLabel()

A java.lang.String representation of this.

Returns:
A java.lang.String representation of this.

getSupportedTriggerEvents
public java.util.Set getSupportedTriggerEvents()

invalidateCaches
public void invalidateCaches()

Invalidate all local caches as the base object may have changed.

isHidden
public boolean isHidden()

Convenience method to access "Hidden" flag.

isInvisible
public boolean isInvisible()

Convenience method to access "Invisible" flag.

isLocked
public boolean isLocked()

Convenience method to access "Locked" flag.

isMarkupAnnotation
public boolean isMarkupAnnotation()

true if this is a PDMarkupAnnotation.

Returns:
true if this is a PDMarkupAnnotation.

isNoRotate
public boolean isNoRotate()

Convenience method to access "NoRotate" flag.

Page 908 of 1521


de.intarsys.pdf.pd.PDAnnotation

(continued from last page)

isNoView
public boolean isNoView()

Convenience method to access "NoView" flag.

isNoZoom
public boolean isNoZoom()

Convenience method to access "NoZoom" flag.

isPrint
public boolean isPrint()

Convenience method to access "Print" flag.

supportsPrint
public boolean supportsPrint()

true if print flag can be selected/changed for this kind of annotation.

Returns:
true if print flag can be selected/changed for this kind of annotation.

isReadOnly
public boolean isReadOnly()

Convenience method to access "ReadOnly" flag.

isToggleNoView
public boolean isToggleNoView()

Convenience method to access "ToggleNoView" flag.

isWidgetAnnotation
public boolean isWidgetAnnotation()

true if this is a PDWidgetAnnotation.

Returns:
true if this is a PDWidgetAnnotation.

setAction
public void setAction(PDAction newAction)

Set the PDAction for the "activation" of this.

Parameters:
newAction - Set the PDAction for the "activation" of this.

Page 909 of 1521


de.intarsys.pdf.pd.PDAnnotation

(continued from last page)

setAdditionalActions
public void setAdditionalActions(PDAdditionalActions actions)

setAppearance
public void setAppearance(PDAppearance newAppearance)

Assign a PDAppearance to this.

Parameters:
newAppearance - The new PDAppearance.

setAppearanceState
public void setAppearanceState(COSName newAppearanceState)

Select a concrete PDForm from the PDAppearance.

Parameters:
newAppearanceState - The new state name.

setBorderStyle
public void setBorderStyle(PDBorderStyle newBorderStyle)

Assign a PDBorderStyle.

Parameters:
newBorderStyle - The new PDBorderStyle

setBorderStyleName
public void setBorderStyleName(COSName newStyle)

Assign a border style name.

Parameters:
newStyle - The new border style name.

setBorderStyleWidth
public void setBorderStyleWidth(float newWidth)

Assign a border width.

Parameters:
newWidth - The new Border width.

setColor
public void setColor(float[] color)

Assign a color.

Parameters:

Page 910 of 1521


de.intarsys.pdf.pd.PDAnnotation

(continued from last page)

color - The new color values.

setContents
public void setContents(String newContents)

Assign a content java.lang.String.

Parameters:
newContents - The new content java.lang.String.

setHidden
public void setHidden(boolean f)

Convenience method to access "Hidden" flag.

setInvisible
public void setInvisible(boolean f)

Convenience method to access "Invisible" flag.

setLocked
public void setLocked(boolean f)

Convenience method to access "Locked" flag.

setName
public void setName(String newName)

Assign a name.

Parameters:
newName - The new name.

setNoRotate
public void setNoRotate(boolean f)

Convenience method to access "NoRotate" flag.

setNoView
public void setNoView(boolean f)

Convenience method to access "NoView" flag.

setNoZoom
public void setNoZoom(boolean f)

Convenience method to access "NoZoom" flag.

Page 911 of 1521


de.intarsys.pdf.pd.PDAnnotation

(continued from last page)

setPrint
public void setPrint(boolean f)

Convenience method to access "Print" flag.

setReadOnly
public void setReadOnly(boolean readOnly)

Convenience method to access "ReadOnly" flag.

setRectangle
public void setRectangle(CDSRectangle newRectangle)

Assign a CDSRectangle for the visual appearance of this.

Parameters:
newRectangle - Assign a CDSRectangle for the visual appearance of this.

setToggleNoView
public void setToggleNoView(boolean f)

Convenience method to access "ToggleNoView" flag.

toString
public String toString()

touch
public void touch()

Assign the current date as the date of last modification.

Page 912 of 1521


de.intarsys.pdf.pd.PDAnnotation.MetaClass

de.intarsys.pdf.pd
Class PDAnnotation.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAnnotation.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass, MetaClass, MetaClass, MetaClass

public static class PDAnnotation.MetaClass


extends PDObject.MetaClass

The meta class implementation

Method Summary
Class getRootClass()

Methods
getRootClass
public Class getRootClass()

Page 913 of 1521


de.intarsys.pdf.pd.PDAnnotationTools

de.intarsys.pdf.pd
Class PDAnnotationTools
java.lang.Object
|
+-de.intarsys.pdf.pd.PDAnnotationTools

public class PDAnnotationTools


extends Object

Tool class for common tasks with PDAnnotation objects.

Field Summary
public static final CAPTION_CHECK

Value: 4

public static final CAPTION_CIRCLE

Value: l

public static final CAPTION_CROSS

Value: 8

public static final CAPTION_DIAMOND

Value: u

public static final CAPTION_SQUARE

Value: n

public static final CAPTION_STAR

Value: H

Method Summary
static PDAppearance getAppearance(PDAnnotation annotation)
The PDAppearance for annotation.

static float[] getBorderColor(PDWidgetAnnotation annotation)

static float[] getBorderColorNegative(PDWidgetAnnotation annotation)

static float[] getFillColor(PDWidgetAnnotation annotation)

static float[] getFillColorNegative(PDWidgetAnnotation annotation)

static PDAnnotation getNextAnnotation(PDAnnotation annotation)


Returns the next annotation following annotation on the same page.

Page 914 of 1521


de.intarsys.pdf.pd.PDAnnotationTools

static PDAnnotation getNextAnnotationAllPages(PDAnnotation annotation)


Returns the next annotation following annotation in the whole document.

static PDPage getPage(PDAnnotation annotation)

static PDAnnotation getPreviousAnnotation(PDAnnotation annotation)


Returns the annotation preceding annotation on the same page.

static PDAnnotation getPreviousAnnotationAllPages(PDAnnotation annotation)


Returns the annotation preceding annotation in the whole document.

static COSName getStateChecked(PDWidgetAnnotation annotation)


Lookup the state that is used to represent "not off" in annotation.

static boolean isAnnotationSpec14(COSDictionary dict)


Checks a COSDictionary for being a subtyped known annotation as of Spec PDF 1.4

static boolean isStateChecked(COSName state)


true if state represents a state that is not "/Off".

Fields
CAPTION_CHECK
public static final java.lang.String CAPTION_CHECK

Constant value: 4

CAPTION_CIRCLE
public static final java.lang.String CAPTION_CIRCLE

Constant value: l

CAPTION_CROSS
public static final java.lang.String CAPTION_CROSS

Constant value: 8

CAPTION_DIAMOND
public static final java.lang.String CAPTION_DIAMOND

Constant value: u

CAPTION_SQUARE
public static final java.lang.String CAPTION_SQUARE

Constant value: n

Page 915 of 1521


de.intarsys.pdf.pd.PDAnnotationTools

CAPTION_STAR
public static final java.lang.String CAPTION_STAR

Constant value: H

Methods
getPage
public static PDPage getPage(PDAnnotation annotation)

getNextAnnotation
public static PDAnnotation getNextAnnotation(PDAnnotation annotation)

Returns the next annotation following annotation on the same page. Returns null if no annotation following
annotation could be found or annotation is the last one on the page.

Parameters:
annotation

Returns:
the next annotation or null

getNextAnnotationAllPages
public static PDAnnotation getNextAnnotationAllPages(PDAnnotation annotation)

Returns the next annotation following annotation in the whole document. Returns null if no annotation following
annotation could be found in the document.

Parameters:
annotation

Returns:
the next annotation or null

getPreviousAnnotation
public static PDAnnotation getPreviousAnnotation(PDAnnotation annotation)

Returns the annotation preceding annotation on the same page. Returns null if no annotation preceding annotation
could be found or annotation is the first one on the page.

Parameters:
annotation

Returns:
the preceding annotation or null

getPreviousAnnotationAllPages
public static PDAnnotation getPreviousAnnotationAllPages(PDAnnotation annotation)

Page 916 of 1521


de.intarsys.pdf.pd.PDAnnotationTools

(continued from last page)

Returns the annotation preceding annotation in the whole document. Returns null if no annotation preceding
annotation could be found in the document.

Parameters:
annotation

Returns:
the previous annotation or null

isAnnotationSpec14
public static boolean isAnnotationSpec14(COSDictionary dict)

Checks a COSDictionary for being a subtyped known annotation as of Spec PDF 1.4

Parameters:
dict

Returns:
true if known as of Spec PDF 1.4

getBorderColor
public static float[] getBorderColor(PDWidgetAnnotation annotation)

getBorderColorNegative
public static float[] getBorderColorNegative(PDWidgetAnnotation annotation)

getFillColor
public static float[] getFillColor(PDWidgetAnnotation annotation)

getFillColorNegative
public static float[] getFillColorNegative(PDWidgetAnnotation annotation)

getAppearance
public static PDAppearance getAppearance(PDAnnotation annotation)

The PDAppearance for annotation. If no PDAppearance is yet available, a new one is created but NOT associated with
the annotation. This behavior is intended to allow for dynamic appearance creation when rendering without changing the
document itself.

Returns:
The PDAppearance for annotation.

Page 917 of 1521


de.intarsys.pdf.pd.PDAnnotationTools

(continued from last page)

getStateChecked
public static COSName getStateChecked(PDWidgetAnnotation annotation)

Lookup the state that is used to represent "not off" in annotation.

Parameters:
annotation - The annotation to inspect for its "not off" state.

Returns:
Lookup the state that is used to represent "not off" in annotation.

isStateChecked
public static boolean isStateChecked(COSName state)

true if state represents a state that is not "/Off". "/Off" is the only legal way to switch of a toggle button, so anything
else is "on".

Parameters:
state - The state to inspect if it is not "/Off".

Returns:
true if state represents a state that is not "/Off".

Page 918 of 1521


de.intarsys.pdf.pd.PDAnyAnnotation

de.intarsys.pdf.pd
Class PDAnyAnnotation
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAnnotation
|
+-de.intarsys.pdf.pd.PDAnyAnnotation
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IAdditionalActionSupport

public class PDAnyAnnotation


extends PDAnnotation

A generic annotation implementation.

Nested Class Summary


class PDAnyAnnotation.MetaClass
PDAnyAnnotation.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
String getSubtypeLabel()

Fields
META
public static final de.intarsys.pdf.pd.PDAnyAnnotation.MetaClass META

The meta class instance

Methods
getSubtypeLabel
public String getSubtypeLabel()

A java.lang.String representation of this.

Page 919 of 1521


de.intarsys.pdf.pd.PDAnyAnnotation.MetaClass

de.intarsys.pdf.pd
Class PDAnyAnnotation.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAnnotation.MetaClass
|
+-de.intarsys.pdf.pd.PDAnyAnnotation.MetaClass

public static class PDAnyAnnotation.MetaClass


extends PDAnnotation.MetaClass

The meta class implementation

Page 920 of 1521


de.intarsys.pdf.pd.PDAppearance

de.intarsys.pdf.pd
Class PDAppearance
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAppearance
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDAppearance


extends PDObject

The PDAppearance describes the visual content of a PDAnnotation.

The annotation supports different visual feedback dependent on the kind of user interaction currently in effect. - Normal - Down
- Rollover Additionaly, each of these appearances is supported for the different logical states an annotation can enter (for
example "On" and "Off" in a checkbox).

The PDForm objects responsible for this feedback are described here.

Nested Class Summary


class PDAppearance.MetaClass
PDAppearance.MetaClass

Field Summary
public static final DK_D

public static final DK_N

public static final DK_R

public static final META


The meta class instance

Method Summary
PDForm getAppearance(COSName key, COSName state)
The PDForm for state state.

PDForm getDownAppearance(COSName state)

PDForm getNormalAppearance(COSName state)

PDForm getRolloverAppearance(COSName state)

Page 921 of 1521


de.intarsys.pdf.pd.PDAppearance

boolean isDefined()
true if this appearance dictionary has valid contents.

void setDownAppearance(COSName state, PDForm form)

void setNormalAppearance(COSName state, PDForm form)

void setRolloverAppearance(COSName state, PDForm form)

Fields
DK_N
public static final de.intarsys.pdf.cos.COSName DK_N

DK_R
public static final de.intarsys.pdf.cos.COSName DK_R

DK_D
public static final de.intarsys.pdf.cos.COSName DK_D

META
public static final de.intarsys.pdf.pd.PDAppearance.MetaClass META

The meta class instance

Methods
getAppearance
public PDForm getAppearance(COSName key,
COSName state)

The PDForm for state state. key defines the interaction context and is one of "/D", "/R" or "/N". If no PDForm is
available, return the PDForm for the "/N" context.

Parameters:
key - The interaction context
state - The PDAnnotation state.

Returns:
The PDForm for state state.

Page 922 of 1521


de.intarsys.pdf.pd.PDAppearance

(continued from last page)

setDownAppearance
public void setDownAppearance(COSName state,
PDForm form)

getDownAppearance
public PDForm getDownAppearance(COSName state)

setNormalAppearance
public void setNormalAppearance(COSName state,
PDForm form)

getNormalAppearance
public PDForm getNormalAppearance(COSName state)

setRolloverAppearance
public void setRolloverAppearance(COSName state,
PDForm form)

getRolloverAppearance
public PDForm getRolloverAppearance(COSName state)

isDefined
public boolean isDefined()

true if this appearance dictionary has valid contents. From time to time there may be an empty /AP stub around, in this
case this method returns false.

Returns:
true if this appearance dictionary has valid contents.

Page 923 of 1521


de.intarsys.pdf.pd.PDAppearance.MetaClass

de.intarsys.pdf.pd
Class PDAppearance.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAppearance.MetaClass

public static class PDAppearance.MetaClass


extends PDObject.MetaClass

The meta class implementation

Page 924 of 1521


de.intarsys.pdf.pd.PDAppearanceCharacteristics

de.intarsys.pdf.pd
Class PDAppearanceCharacteristics
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAppearanceCharacteristics
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDAppearanceCharacteristics


extends PDObject

More details on the appearance of an annotation.

Nested Class Summary


class PDAppearanceCharacteristics.MetaClass
PDAppearanceCharacteristics.MetaClass

Field Summary
public static final DK_AC

public static final DK_BC

public static final DK_BG

public static final DK_CA

public static final DK_I

public static final DK_IF

public static final DK_IX

public static final DK_R

public static final DK_RC

public static final DK_RI

public static final DK_TP


The name for the caption entry.

public static final META


The meta class instance

Page 925 of 1521


de.intarsys.pdf.pd.PDAppearanceCharacteristics

public static final TP_CAPTION_ABOVE_ICON

Value: 3

public static final TP_CAPTION_BELOW_ICON

Value: 2

public static final TP_CAPTION_LEFT_OF_ICON

Value: 5

public static final TP_CAPTION_ONLY

Value: 0

public static final TP_CAPTION_OVERLAIS_ICON

Value: 6

public static final TP_CAPTION_RIGHT_OF_ICON

Value: 4

public static final TP_ICON_ONLY

Value: 1

Method Summary
COSStream cosGetDownIcon()

COSStream cosGetNormalIcon()

COSStream cosGetRolloverIcon()

COSStream cosSetDownIcon(COSStream newDownIcon)

COSStream cosSetNormalIcon(COSStream newNormalIcon)

COSStream cosSetRolloverIcon(COSStream newRolloverIcon)

float[] getBackgroundColor()

float[] getBorderColor()

String getDownCaption()

PDIconFit getIconFit()

String getNormalCaption()

String getRolloverCaption()

int getRotation()

Page 926 of 1521


de.intarsys.pdf.pd.PDAppearanceCharacteristics

int getTextPosition()

void setBackgroundColor(float[] newBackgroundColor)

void setBorderColor(float[] newBorderColor)

void setDownCaption(String newDownCaption)

void setIconFit(PDIconFit newIconFit)

void setNormalCaption(String newNormalCaption)

void setRolloverCaption(String newRolloverCaption)

void setRotation(int newRotation)

void setTextPosition(int newPositionTextIcon)

Fields
DK_AC
public static final de.intarsys.pdf.cos.COSName DK_AC

DK_BC
public static final de.intarsys.pdf.cos.COSName DK_BC

DK_BG
public static final de.intarsys.pdf.cos.COSName DK_BG

DK_CA
public static final de.intarsys.pdf.cos.COSName DK_CA

DK_I
public static final de.intarsys.pdf.cos.COSName DK_I

Page 927 of 1521


de.intarsys.pdf.pd.PDAppearanceCharacteristics

(continued from last page)

DK_IF
public static final de.intarsys.pdf.cos.COSName DK_IF

DK_IX
public static final de.intarsys.pdf.cos.COSName DK_IX

DK_R
public static final de.intarsys.pdf.cos.COSName DK_R

DK_RC
public static final de.intarsys.pdf.cos.COSName DK_RC

DK_RI
public static final de.intarsys.pdf.cos.COSName DK_RI

TP_CAPTION_ONLY
public static final int TP_CAPTION_ONLY

Constant value: 0

TP_ICON_ONLY
public static final int TP_ICON_ONLY

Constant value: 1

TP_CAPTION_BELOW_ICON
public static final int TP_CAPTION_BELOW_ICON

Constant value: 2

TP_CAPTION_ABOVE_ICON
public static final int TP_CAPTION_ABOVE_ICON

Constant value: 3

Page 928 of 1521


de.intarsys.pdf.pd.PDAppearanceCharacteristics

(continued from last page)

TP_CAPTION_RIGHT_OF_ICON
public static final int TP_CAPTION_RIGHT_OF_ICON

Constant value: 4

TP_CAPTION_LEFT_OF_ICON
public static final int TP_CAPTION_LEFT_OF_ICON

Constant value: 5

TP_CAPTION_OVERLAIS_ICON
public static final int TP_CAPTION_OVERLAIS_ICON

Constant value: 6

DK_TP
public static final de.intarsys.pdf.cos.COSName DK_TP
The name for the caption entry.

The name could have following values (not complete):

• 0: No icon, caption only


• 1: No caption; icon only
• 2: Caption below the icon
• 3: Caption above the icon
• 4: Caption to the right of the icon
• 5: Caption to the left of the icon
• 6: Caption overlaid directly on the icon

META
public static final de.intarsys.pdf.pd.PDAppearanceCharacteristics.MetaClass META

The meta class instance

Methods
getBackgroundColor
public float[] getBackgroundColor()

getBorderColor
public float[] getBorderColor()

Page 929 of 1521


de.intarsys.pdf.pd.PDAppearanceCharacteristics

(continued from last page)

getDownCaption
public String getDownCaption()

cosGetDownIcon
public COSStream cosGetDownIcon()

getIconFit
public PDIconFit getIconFit()

getNormalCaption
public String getNormalCaption()

cosGetNormalIcon
public COSStream cosGetNormalIcon()

getTextPosition
public int getTextPosition()

getRolloverCaption
public String getRolloverCaption()

cosGetRolloverIcon
public COSStream cosGetRolloverIcon()

getRotation
public int getRotation()

setBackgroundColor
public void setBackgroundColor(float[] newBackgroundColor)

Page 930 of 1521


de.intarsys.pdf.pd.PDAppearanceCharacteristics

(continued from last page)

setBorderColor
public void setBorderColor(float[] newBorderColor)

setDownCaption
public void setDownCaption(String newDownCaption)

cosSetDownIcon
public COSStream cosSetDownIcon(COSStream newDownIcon)

setIconFit
public void setIconFit(PDIconFit newIconFit)

setNormalCaption
public void setNormalCaption(String newNormalCaption)

cosSetNormalIcon
public COSStream cosSetNormalIcon(COSStream newNormalIcon)

setTextPosition
public void setTextPosition(int newPositionTextIcon)

setRolloverCaption
public void setRolloverCaption(String newRolloverCaption)

cosSetRolloverIcon
public COSStream cosSetRolloverIcon(COSStream newRolloverIcon)

Page 931 of 1521


de.intarsys.pdf.pd.PDAppearanceCharacteristics

(continued from last page)

setRotation
public void setRotation(int newRotation)

Page 932 of 1521


de.intarsys.pdf.pd.PDAppearanceCharacteristics.MetaClass

de.intarsys.pdf.pd
Class PDAppearanceCharacteristics.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAppearanceCharacteristics.MetaClass

public static class PDAppearanceCharacteristics.MetaClass


extends PDObject.MetaClass

The meta class implementation

Page 933 of 1521


de.intarsys.pdf.pd.PDAppearanceTools

de.intarsys.pdf.pd
Class PDAppearanceTools
java.lang.Object
|
+-de.intarsys.pdf.pd.PDAppearanceTools

public class PDAppearanceTools


extends Object

A tool class for common tasks with PDAppearance instances.

Constructor Summary
public PDAppearanceTools()

Method Summary
static PDForm getDownAppearance(PDAppearance appearance, COSName state)
Given a PDAppearance, return the /D (down) appearance for the state "state".

static PDForm getNormalAppearance(PDAppearance appearance, COSName state)


Given a PDAppearance, return the /N (normal) appearance for the state "state".

static PDForm getRolloverAppearance(PDAppearance appearance, COSName state)


Given a PDAppearance, return the /R (rollover) appearance for the state "state".

static void renameState(PDAppearance appearance, String oldState, String newState)

Constructors
PDAppearanceTools
public PDAppearanceTools()

Methods
getDownAppearance
public static PDForm getDownAppearance(PDAppearance appearance,
COSName state)

Given a PDAppearance, return the /D (down) appearance for the state "state".

Parameters:
appearance - The PDAppearance structure containing the appearance descriptions

Returns:
Given a PDAppearance, return the /D (down) appearance for the state "state".

Page 934 of 1521


de.intarsys.pdf.pd.PDAppearanceTools

getNormalAppearance
public static PDForm getNormalAppearance(PDAppearance appearance,
COSName state)

Given a PDAppearance, return the /N (normal) appearance for the state "state".

Parameters:
appearance - The PDAppearance structure containing the appearance descriptions

Returns:
Given a PDAppearance, return the /N (normal) appearance for the state "state".

getRolloverAppearance
public static PDForm getRolloverAppearance(PDAppearance appearance,
COSName state)

Given a PDAppearance, return the /R (rollover) appearance for the state "state".

Parameters:
appearance - The PDAppearance structure containing the appearance descriptions

Returns:
Given a PDAppearance, return the /R (rollover) appearance for the state "state".

renameState
public static void renameState(PDAppearance appearance,
String oldState,
String newState)

Page 935 of 1521


de.intarsys.pdf.pd.PDApplicationData

de.intarsys.pdf.pd
Class PDApplicationData
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDApplicationData
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDApplicationData


extends PDObject

Application specific transparently handled data objects.

Nested Class Summary


class PDApplicationData.MetaClass
PDApplicationData.MetaClass

Field Summary
public static final DK_LastModified

public static final DK_Private

public static final META


The meta class instance

Method Summary
COSObject cosGetData()
The private data entry or COSNull

COSObject cosSetData(COSObject data)


Assign the private data.

CDSDate getLastModification()
The timestamp of th elast modification.

void touch()
Assign a new timestamp for the last modification.

Fields
DK_LastModified
public static final de.intarsys.pdf.cos.COSName DK_LastModified

Page 936 of 1521


de.intarsys.pdf.pd.PDApplicationData

(continued from last page)

DK_Private
public static final de.intarsys.pdf.cos.COSName DK_Private

META
public static final de.intarsys.pdf.pd.PDApplicationData.MetaClass META

The meta class instance

Methods
cosSetData
public COSObject cosSetData(COSObject data)

Assign the private data.

Parameters:
data - The private data for this.

Returns:
The /Private entry previously associated with this.

cosGetData
public COSObject cosGetData()

The private data entry or COSNull

Returns:
The private data entry or COSNull

getLastModification
public CDSDate getLastModification()

The timestamp of th elast modification.

Returns:
The timestamp of th elast modification.

touch
public void touch()

Assign a new timestamp for the last modification.

Page 937 of 1521


de.intarsys.pdf.pd.PDApplicationData.MetaClass

de.intarsys.pdf.pd
Class PDApplicationData.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDApplicationData.MetaClass

public static class PDApplicationData.MetaClass


extends PDObject.MetaClass

The meta class implementation

Page 938 of 1521


de.intarsys.pdf.pd.PDAxialShading

de.intarsys.pdf.pd
Class PDAxialShading
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDShading
|
+-de.intarsys.pdf.pd.PDAxialShading
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDAxialShading


extends PDShading

Use axial shading for filling the shape.

Nested Class Summary


class PDAxialShading.MetaClass
PDAxialShading.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
float[] getCoords()

float[] getDomain()

PDFunction getFunction()

int getShadingType()

Fields
META
public static final de.intarsys.pdf.pd.PDAxialShading.MetaClass META

The meta class instance

Methods

Page 939 of 1521


de.intarsys.pdf.pd.PDAxialShading

(continued from last page)

getCoords
public float[] getCoords()

getDomain
public float[] getDomain()

getFunction
public PDFunction getFunction()

getShadingType
public int getShadingType()

Page 940 of 1521


de.intarsys.pdf.pd.PDAxialShading.MetaClass

de.intarsys.pdf.pd
Class PDAxialShading.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDShading.MetaClass
|
+-de.intarsys.pdf.pd.PDAxialShading.MetaClass

public static class PDAxialShading.MetaClass


extends PDShading.MetaClass

The meta class implementation

Page 941 of 1521


de.intarsys.pdf.pd.PDBorderStyle

de.intarsys.pdf.pd
Class PDBorderStyle
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDBorderStyle
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDBorderStyle


extends PDObject

The definition of a border style for an annotation.

Nested Class Summary


class PDBorderStyle.MetaClass
PDBorderStyle.MetaClass

Field Summary
public static final CN_S_B
Style B: beveled

public static final CN_S_D


Style D: dashed

public static final CN_S_I


Style D: Inset

public static final CN_S_S


Style S: solid

public static final CN_S_U


Style D: underlined

public static final CN_Type_Border


The border type name

public static final DK_D


The DashArray type.

public static final DK_S


The Style type.

public static final DK_W


The width type.

public static final META


The meta class instance

Page 942 of 1521


de.intarsys.pdf.pd.PDBorderStyle

Method Summary
int[] getDashArray()

COSName getStyle()

float getWidth()

void setDashArray(int[] newDashArray)

void setStyle(COSName newStyle)

void setWidth(float newWidth)


Set the style.

Fields
META
public static final de.intarsys.pdf.pd.PDBorderStyle.MetaClass META

The meta class instance

DK_W
public static final de.intarsys.pdf.cos.COSName DK_W

The width type.

DK_S
public static final de.intarsys.pdf.cos.COSName DK_S

The Style type.

CN_S_S
public static final de.intarsys.pdf.cos.COSName CN_S_S

Style S: solid

CN_S_D
public static final de.intarsys.pdf.cos.COSName CN_S_D

Style D: dashed

CN_S_B
public static final de.intarsys.pdf.cos.COSName CN_S_B

Style B: beveled

Page 943 of 1521


de.intarsys.pdf.pd.PDBorderStyle

(continued from last page)

CN_S_I
public static final de.intarsys.pdf.cos.COSName CN_S_I

Style D: Inset

CN_S_U
public static final de.intarsys.pdf.cos.COSName CN_S_U

Style D: underlined

DK_D
public static final de.intarsys.pdf.cos.COSName DK_D

The DashArray type.

CN_Type_Border
public static final de.intarsys.pdf.cos.COSName CN_Type_Border

The border type name

Methods
setDashArray
public void setDashArray(int[] newDashArray)

getDashArray
public int[] getDashArray()

setStyle
public void setStyle(COSName newStyle)

getStyle
public COSName getStyle()

setWidth
public void setWidth(float newWidth)

Set the style. If newWidth = 0, no border is drawn.

Parameters:
newWidth - The new width.

Page 944 of 1521


de.intarsys.pdf.pd.PDBorderStyle

getWidth
public float getWidth()

Page 945 of 1521


de.intarsys.pdf.pd.PDBorderStyle.MetaClass

de.intarsys.pdf.pd
Class PDBorderStyle.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDBorderStyle.MetaClass

public static class PDBorderStyle.MetaClass


extends PDObject.MetaClass

The meta class implementation

Page 946 of 1521


de.intarsys.pdf.pd.PDBuildData

de.intarsys.pdf.pd
Class PDBuildData
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDBuildData
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDBuildData


extends PDObject

Nested Class Summary


class PDBuildData.MetaClass
PDBuildData.MetaClass

Field Summary
public static final DK_Date

public static final DK_Name

public static final DK_NonEFontNoWarn

public static final DK_OS

public static final DK_PreRelease

public static final DK_R

public static final DK_TrustedMode

public static final DK_V

public static final META


The meta class instance

Method Summary
CDSDate getDate()

String getName()

Page 947 of 1521


de.intarsys.pdf.pd.PDBuildData

String getOS()

int getR()

int getV()

boolean isNonEFontNoWarn()

boolean isPreRelease()

boolean isTrustedMode()

void setDate(CDSDate date)

void setName(String name)

void setNonEFontNoWarn(boolean nonEFontNoWarn)

void setOS(String osString)

void setPreRelease(boolean preRelease)

void setR(int moduleRevision)

void setTrustedMode(boolean trustedMode)

void setV(int minimumSoftwareVersion)

Fields
META
public static final de.intarsys.pdf.pd.PDBuildData.MetaClass META

The meta class instance

DK_Name
public static final de.intarsys.pdf.cos.COSName DK_Name

DK_Date
public static final de.intarsys.pdf.cos.COSName DK_Date

Page 948 of 1521


de.intarsys.pdf.pd.PDBuildData

(continued from last page)

DK_R
public static final de.intarsys.pdf.cos.COSName DK_R

DK_V
public static final de.intarsys.pdf.cos.COSName DK_V

DK_PreRelease
public static final de.intarsys.pdf.cos.COSName DK_PreRelease

DK_OS
public static final de.intarsys.pdf.cos.COSName DK_OS

DK_NonEFontNoWarn
public static final de.intarsys.pdf.cos.COSName DK_NonEFontNoWarn

DK_TrustedMode
public static final de.intarsys.pdf.cos.COSName DK_TrustedMode

Methods
getDate
public CDSDate getDate()

getName
public String getName()

getOS
public String getOS()

Page 949 of 1521


de.intarsys.pdf.pd.PDBuildData

(continued from last page)

getR
public int getR()

getV
public int getV()

isNonEFontNoWarn
public boolean isNonEFontNoWarn()

isPreRelease
public boolean isPreRelease()

isTrustedMode
public boolean isTrustedMode()

setDate
public void setDate(CDSDate date)

setName
public void setName(String name)

setNonEFontNoWarn
public void setNonEFontNoWarn(boolean nonEFontNoWarn)

setOS
public void setOS(String osString)

setPreRelease
public void setPreRelease(boolean preRelease)

Page 950 of 1521


de.intarsys.pdf.pd.PDBuildData

(continued from last page)

setR
public void setR(int moduleRevision)

setTrustedMode
public void setTrustedMode(boolean trustedMode)

setV
public void setV(int minimumSoftwareVersion)

Page 951 of 1521


de.intarsys.pdf.pd.PDBuildData.MetaClass

de.intarsys.pdf.pd
Class PDBuildData.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDBuildData.MetaClass

public static class PDBuildData.MetaClass


extends PDObject.MetaClass

The meta class implementation

Page 952 of 1521


de.intarsys.pdf.pd.PDBuildProperties

de.intarsys.pdf.pd
Class PDBuildProperties
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDBuildProperties
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDBuildProperties


extends PDObject

Nested Class Summary


class PDBuildProperties.MetaClass
PDBuildProperties.MetaClass

Field Summary
public static final DK_App

public static final DK_Filter

public static final DK_PubSec

public static final META


The meta class instance

Method Summary
PDBuildData getApp()

PDBuildData getFilter()

PDBuildData getPubSec()

void setApp(PDBuildData appData)

void setFilter(PDBuildData filterData)

void setPubSec(PDBuildData pubSecData)

Fields

Page 953 of 1521


de.intarsys.pdf.pd.PDBuildProperties

(continued from last page)

META
public static final de.intarsys.pdf.pd.PDBuildProperties.MetaClass META

The meta class instance

DK_Filter
public static final de.intarsys.pdf.cos.COSName DK_Filter

DK_PubSec
public static final de.intarsys.pdf.cos.COSName DK_PubSec

DK_App
public static final de.intarsys.pdf.cos.COSName DK_App

Methods
getApp
public PDBuildData getApp()

getFilter
public PDBuildData getFilter()

getPubSec
public PDBuildData getPubSec()

setApp
public void setApp(PDBuildData appData)

setFilter
public void setFilter(PDBuildData filterData)

Page 954 of 1521


de.intarsys.pdf.pd.PDBuildProperties

(continued from last page)

setPubSec
public void setPubSec(PDBuildData pubSecData)

Page 955 of 1521


de.intarsys.pdf.pd.PDBuildProperties.MetaClass

de.intarsys.pdf.pd
Class PDBuildProperties.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDBuildProperties.MetaClass

public static class PDBuildProperties.MetaClass


extends PDObject.MetaClass

The meta class implementation

Page 956 of 1521


de.intarsys.pdf.pd.PDColorSpace

de.intarsys.pdf.pd
Class PDColorSpace
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDColorSpace
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


PDCSCIEBased, PDCSDevice, PDCSSpecial

public abstract class PDColorSpace


extends PDObject

An abstract superclass for all color spaces.

Nested Class Summary


class PDColorSpace.MetaClass
PDColorSpace.MetaClass

Field Summary
public static final CN_CS_CalGray

public static final CN_CS_CalRGB

public static final CN_CS_CMYK

public static final CN_CS_DeviceCMYK

public static final CN_CS_DeviceGray

public static final CN_CS_DeviceN

public static final CN_CS_DeviceRGB

public static final CN_CS_G

public static final CN_CS_I

public static final CN_CS_ICCBased

public static final CN_CS_Indexed

Page 957 of 1521


de.intarsys.pdf.pd.PDColorSpace

public static final CN_CS_Lab

public static final CN_CS_Pattern

public static final CN_CS_RGB

public static final CN_CS_Separation

public static final META


The meta class instance

Method Summary
Object getCachedColorSpace()

static PDColorSpace getNamed(COSName name)

static PDColorSpace getSingleton(COSName name)


return the singleton color space instance corresponding to the given name

void invalidateCaches()

void setCachedColorSpace(Object paramColorSpace)

Fields
CN_CS_CalGray
public static final de.intarsys.pdf.cos.COSName CN_CS_CalGray

CN_CS_CalRGB
public static final de.intarsys.pdf.cos.COSName CN_CS_CalRGB

CN_CS_CMYK
public static final de.intarsys.pdf.cos.COSName CN_CS_CMYK

CN_CS_DeviceCMYK
public static final de.intarsys.pdf.cos.COSName CN_CS_DeviceCMYK

Page 958 of 1521


de.intarsys.pdf.pd.PDColorSpace

(continued from last page)

CN_CS_DeviceGray
public static final de.intarsys.pdf.cos.COSName CN_CS_DeviceGray

CN_CS_DeviceN
public static final de.intarsys.pdf.cos.COSName CN_CS_DeviceN

CN_CS_DeviceRGB
public static final de.intarsys.pdf.cos.COSName CN_CS_DeviceRGB

CN_CS_G
public static final de.intarsys.pdf.cos.COSName CN_CS_G

CN_CS_ICCBased
public static final de.intarsys.pdf.cos.COSName CN_CS_ICCBased

CN_CS_Indexed
public static final de.intarsys.pdf.cos.COSName CN_CS_Indexed

CN_CS_I
public static final de.intarsys.pdf.cos.COSName CN_CS_I

CN_CS_Lab
public static final de.intarsys.pdf.cos.COSName CN_CS_Lab

CN_CS_Pattern
public static final de.intarsys.pdf.cos.COSName CN_CS_Pattern

CN_CS_RGB
public static final de.intarsys.pdf.cos.COSName CN_CS_RGB

Page 959 of 1521


de.intarsys.pdf.pd.PDColorSpace

(continued from last page)

CN_CS_Separation
public static final de.intarsys.pdf.cos.COSName CN_CS_Separation

META
public static final de.intarsys.pdf.pd.PDColorSpace.MetaClass META

The meta class instance

Methods
getNamed
public static PDColorSpace getNamed(COSName name)

getSingleton
public static PDColorSpace getSingleton(COSName name)

return the singleton color space instance corresponding to the given name

Parameters:
name - must be one of the predefined color space names

Returns:
return the singleton color space instance corresponding to the given name

getCachedColorSpace
public Object getCachedColorSpace()

invalidateCaches
public void invalidateCaches()

Invalidate all local caches as the base object may have changed.

setCachedColorSpace
public void setCachedColorSpace(Object paramColorSpace)

Page 960 of 1521


de.intarsys.pdf.pd.PDColorSpace.MetaClass

de.intarsys.pdf.pd
Class PDColorSpace.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDColorSpace.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass, MetaClass

public static class PDColorSpace.MetaClass


extends PDObject.MetaClass

The meta class implementation

Method Summary
Class getRootClass()

Methods
getRootClass
public Class getRootClass()

Page 961 of 1521


de.intarsys.pdf.pd.PDCoonsShading

de.intarsys.pdf.pd
Class PDCoonsShading
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDShading
|
+-de.intarsys.pdf.pd.PDCoonsShading
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDCoonsShading


extends PDShading

Use coons shading for filling the shape.

Nested Class Summary


class PDCoonsShading.MetaClass
PDCoonsShading.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
int getShadingType()

Fields
META
public static final de.intarsys.pdf.pd.PDCoonsShading.MetaClass META

The meta class instance

Methods
getShadingType
public int getShadingType()

Page 962 of 1521


de.intarsys.pdf.pd.PDCoonsShading.MetaClass

de.intarsys.pdf.pd
Class PDCoonsShading.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDShading.MetaClass
|
+-de.intarsys.pdf.pd.PDCoonsShading.MetaClass

public static class PDCoonsShading.MetaClass


extends PDShading.MetaClass

The meta class implementation

Page 963 of 1521


de.intarsys.pdf.pd.PDCSCalGray

de.intarsys.pdf.pd
Class PDCSCalGray
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDColorSpace
|
+-de.intarsys.pdf.pd.PDCSCIEBased
|
+-de.intarsys.pdf.pd.PDCSCalGray
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDCSCalGray


extends PDCSCIEBased

Calibrated gray color space.

Nested Class Summary


class PDCSCalGray.MetaClass
PDCSCalGray.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
PDColorSpace getAlternate()

Fields
META
public static final de.intarsys.pdf.pd.PDCSCalGray.MetaClass META

The meta class instance

Methods
getAlternate
public PDColorSpace getAlternate()

Page 964 of 1521


de.intarsys.pdf.pd.PDCSCalGray.MetaClass

de.intarsys.pdf.pd
Class PDCSCalGray.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDColorSpace.MetaClass
|
+-de.intarsys.pdf.pd.PDCSCIEBased.MetaClass
|
+-de.intarsys.pdf.pd.PDCSCalGray.MetaClass

public static class PDCSCalGray.MetaClass


extends PDCSCIEBased.MetaClass

The meta class implementation

Page 965 of 1521


de.intarsys.pdf.pd.PDCSCalRGB

de.intarsys.pdf.pd
Class PDCSCalRGB
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDColorSpace
|
+-de.intarsys.pdf.pd.PDCSCIEBased
|
+-de.intarsys.pdf.pd.PDCSCalRGB
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDCSCalRGB


extends PDCSCIEBased

Calibrated RGB color space.

Nested Class Summary


class PDCSCalRGB.MetaClass
PDCSCalRGB.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
PDColorSpace getAlternate()

Fields
META
public static final de.intarsys.pdf.pd.PDCSCalRGB.MetaClass META

The meta class instance

Methods
getAlternate
public PDColorSpace getAlternate()

Page 966 of 1521


de.intarsys.pdf.pd.PDCSCalRGB.MetaClass

de.intarsys.pdf.pd
Class PDCSCalRGB.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDColorSpace.MetaClass
|
+-de.intarsys.pdf.pd.PDCSCIEBased.MetaClass
|
+-de.intarsys.pdf.pd.PDCSCalRGB.MetaClass

public static class PDCSCalRGB.MetaClass


extends PDCSCIEBased.MetaClass

The meta class implementation

Page 967 of 1521


de.intarsys.pdf.pd.PDCSCIEBased

de.intarsys.pdf.pd
Class PDCSCIEBased
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDColorSpace
|
+-de.intarsys.pdf.pd.PDCSCIEBased
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


PDCSCalGray, PDCSCalRGB, PDCSICCBased, PDCSLab

public abstract class PDCSCIEBased


extends PDColorSpace

Abstract superclass for all CIE based color spaces

Nested Class Summary


class PDCSCIEBased.MetaClass
PDCSCIEBased.MetaClass

Field Summary
public static final META
The meta class instance

Fields
META
public static final de.intarsys.pdf.pd.PDCSCIEBased.MetaClass META

The meta class instance

Page 968 of 1521


de.intarsys.pdf.pd.PDCSCIEBased.MetaClass

de.intarsys.pdf.pd
Class PDCSCIEBased.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDColorSpace.MetaClass
|
+-de.intarsys.pdf.pd.PDCSCIEBased.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass, MetaClass, MetaClass

public static class PDCSCIEBased.MetaClass


extends PDColorSpace.MetaClass

The meta class implementation

Page 969 of 1521


de.intarsys.pdf.pd.PDCSDevice

de.intarsys.pdf.pd
Class PDCSDevice
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDColorSpace
|
+-de.intarsys.pdf.pd.PDCSDevice
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


PDCSDeviceCMYK, PDCSDeviceGray, PDCSDeviceRGB

public abstract class PDCSDevice


extends PDColorSpace

Abstract superclass for all device color spaces.

Nested Class Summary


class PDCSDevice.MetaClass
PDCSDevice.MetaClass

Field Summary
public static final META
The meta class instance

Fields
META
public static final de.intarsys.pdf.pd.PDCSDevice.MetaClass META

The meta class instance

Page 970 of 1521


de.intarsys.pdf.pd.PDCSDevice.MetaClass

de.intarsys.pdf.pd
Class PDCSDevice.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDColorSpace.MetaClass
|
+-de.intarsys.pdf.pd.PDCSDevice.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass, MetaClass

public static class PDCSDevice.MetaClass


extends PDColorSpace.MetaClass

The meta class implementation

Page 971 of 1521


de.intarsys.pdf.pd.PDCSDeviceCMYK

de.intarsys.pdf.pd
Class PDCSDeviceCMYK
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDColorSpace
|
+-de.intarsys.pdf.pd.PDCSDevice
|
+-de.intarsys.pdf.pd.PDCSDeviceCMYK
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDCSDeviceCMYK


extends PDCSDevice

Device color space CMYK support.

Nested Class Summary


class PDCSDeviceCMYK.MetaClass
PDCSDeviceCMYK.MetaClass

Field Summary
public static final META
The meta class instance

public static SINGLETON

Method Summary
String toString()

Fields
META
public static final de.intarsys.pdf.pd.PDCSDeviceCMYK.MetaClass META

The meta class instance

SINGLETON
public static de.intarsys.pdf.pd.PDCSDeviceCMYK SINGLETON

Page 972 of 1521


de.intarsys.pdf.pd.PDCSDeviceCMYK

(continued from last page)

Methods
toString
public String toString()

Page 973 of 1521


de.intarsys.pdf.pd.PDCSDeviceCMYK.MetaClass

de.intarsys.pdf.pd
Class PDCSDeviceCMYK.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDColorSpace.MetaClass
|
+-de.intarsys.pdf.pd.PDCSDevice.MetaClass
|
+-de.intarsys.pdf.pd.PDCSDeviceCMYK.MetaClass

public static class PDCSDeviceCMYK.MetaClass


extends PDCSDevice.MetaClass

The meta class implementation

Page 974 of 1521


de.intarsys.pdf.pd.PDCSDeviceGray

de.intarsys.pdf.pd
Class PDCSDeviceGray
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDColorSpace
|
+-de.intarsys.pdf.pd.PDCSDevice
|
+-de.intarsys.pdf.pd.PDCSDeviceGray
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDCSDeviceGray


extends PDCSDevice

Device color space gray support.

Nested Class Summary


class PDCSDeviceGray.MetaClass
PDCSDeviceGray.MetaClass

Field Summary
public static final META
The meta class instance

public static SINGLETON

Method Summary
String toString()

Fields
META
public static final de.intarsys.pdf.pd.PDCSDeviceGray.MetaClass META

The meta class instance

SINGLETON
public static de.intarsys.pdf.pd.PDCSDeviceGray SINGLETON

Page 975 of 1521


de.intarsys.pdf.pd.PDCSDeviceGray

(continued from last page)

Methods
toString
public String toString()

Page 976 of 1521


de.intarsys.pdf.pd.PDCSDeviceGray.MetaClass

de.intarsys.pdf.pd
Class PDCSDeviceGray.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDColorSpace.MetaClass
|
+-de.intarsys.pdf.pd.PDCSDevice.MetaClass
|
+-de.intarsys.pdf.pd.PDCSDeviceGray.MetaClass

public static class PDCSDeviceGray.MetaClass


extends PDCSDevice.MetaClass

The meta class implementation

Page 977 of 1521


de.intarsys.pdf.pd.PDCSDeviceN

de.intarsys.pdf.pd
Class PDCSDeviceN
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDColorSpace
|
+-de.intarsys.pdf.pd.PDCSSpecial
|
+-de.intarsys.pdf.pd.PDCSDeviceN
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDCSDeviceN


extends PDCSSpecial

Special color space.

Nested Class Summary


class PDCSDeviceN.MetaClass
PDCSDeviceN.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
PDColorSpace getAlternate()

PDFunction getTintTransform()

Fields
META
public static final de.intarsys.pdf.pd.PDCSDeviceN.MetaClass META

The meta class instance

Methods
getAlternate
public PDColorSpace getAlternate()

Page 978 of 1521


de.intarsys.pdf.pd.PDCSDeviceN

(continued from last page)

getTintTransform
public PDFunction getTintTransform()

Page 979 of 1521


de.intarsys.pdf.pd.PDCSDeviceN.MetaClass

de.intarsys.pdf.pd
Class PDCSDeviceN.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDColorSpace.MetaClass
|
+-de.intarsys.pdf.pd.PDCSSpecial.MetaClass
|
+-de.intarsys.pdf.pd.PDCSDeviceN.MetaClass

public static class PDCSDeviceN.MetaClass


extends PDCSSpecial.MetaClass

The meta class implementation

Page 980 of 1521


de.intarsys.pdf.pd.PDCSDeviceRGB

de.intarsys.pdf.pd
Class PDCSDeviceRGB
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDColorSpace
|
+-de.intarsys.pdf.pd.PDCSDevice
|
+-de.intarsys.pdf.pd.PDCSDeviceRGB
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDCSDeviceRGB


extends PDCSDevice

Device color space RGB support.

Nested Class Summary


class PDCSDeviceRGB.MetaClass
PDCSDeviceRGB.MetaClass

Field Summary
public static final META
The meta class instance

public static SINGLETON

Method Summary
String toString()

Fields
META
public static final de.intarsys.pdf.pd.PDCSDeviceRGB.MetaClass META

The meta class instance

SINGLETON
public static de.intarsys.pdf.pd.PDCSDeviceRGB SINGLETON

Page 981 of 1521


de.intarsys.pdf.pd.PDCSDeviceRGB

(continued from last page)

Methods
toString
public String toString()

Page 982 of 1521


de.intarsys.pdf.pd.PDCSDeviceRGB.MetaClass

de.intarsys.pdf.pd
Class PDCSDeviceRGB.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDColorSpace.MetaClass
|
+-de.intarsys.pdf.pd.PDCSDevice.MetaClass
|
+-de.intarsys.pdf.pd.PDCSDeviceRGB.MetaClass

public static class PDCSDeviceRGB.MetaClass


extends PDCSDevice.MetaClass

The meta class implementation

Page 983 of 1521


de.intarsys.pdf.pd.PDCSICCBased

de.intarsys.pdf.pd
Class PDCSICCBased
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDColorSpace
|
+-de.intarsys.pdf.pd.PDCSCIEBased
|
+-de.intarsys.pdf.pd.PDCSICCBased
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDCSICCBased


extends PDCSCIEBased

ICC standards based color space definition.

Nested Class Summary


class PDCSICCBased.MetaClass
PDCSICCBased.MetaClass

Field Summary
public static final DK_Alternate

public static final DK_N

public static final META


The meta class instance

Method Summary
COSStream cosGetProfileStream()

PDColorSpace getAlternate()

Fields
DK_Alternate
public static final de.intarsys.pdf.cos.COSName DK_Alternate

Page 984 of 1521


de.intarsys.pdf.pd.PDCSICCBased

(continued from last page)

DK_N
public static final de.intarsys.pdf.cos.COSName DK_N

META
public static final de.intarsys.pdf.pd.PDCSICCBased.MetaClass META

The meta class instance

Methods
cosGetProfileStream
public COSStream cosGetProfileStream()

getAlternate
public PDColorSpace getAlternate()

Page 985 of 1521


de.intarsys.pdf.pd.PDCSICCBased.MetaClass

de.intarsys.pdf.pd
Class PDCSICCBased.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDColorSpace.MetaClass
|
+-de.intarsys.pdf.pd.PDCSCIEBased.MetaClass
|
+-de.intarsys.pdf.pd.PDCSICCBased.MetaClass

public static class PDCSICCBased.MetaClass


extends PDCSCIEBased.MetaClass

The meta class implementation

Page 986 of 1521


de.intarsys.pdf.pd.PDCSIndexed

de.intarsys.pdf.pd
Class PDCSIndexed
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDColorSpace
|
+-de.intarsys.pdf.pd.PDCSSpecial
|
+-de.intarsys.pdf.pd.PDCSIndexed
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDCSIndexed


extends PDCSSpecial

Support for indexed color spaces.

Nested Class Summary


class PDCSIndexed.MetaClass
PDCSIndexed.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
PDColorSpace getBaseColorSpace()

byte[] getColorBytes()

int getColorCount()

Fields
META
public static final de.intarsys.pdf.pd.PDCSIndexed.MetaClass META

The meta class instance

Methods

Page 987 of 1521


de.intarsys.pdf.pd.PDCSIndexed

(continued from last page)

getColorCount
public int getColorCount()

getBaseColorSpace
public PDColorSpace getBaseColorSpace()

getColorBytes
public byte[] getColorBytes()

Page 988 of 1521


de.intarsys.pdf.pd.PDCSIndexed.MetaClass

de.intarsys.pdf.pd
Class PDCSIndexed.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDColorSpace.MetaClass
|
+-de.intarsys.pdf.pd.PDCSSpecial.MetaClass
|
+-de.intarsys.pdf.pd.PDCSIndexed.MetaClass

public static class PDCSIndexed.MetaClass


extends PDCSSpecial.MetaClass

The meta class implementation

Page 989 of 1521


de.intarsys.pdf.pd.PDCSLab

de.intarsys.pdf.pd
Class PDCSLab
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDColorSpace
|
+-de.intarsys.pdf.pd.PDCSCIEBased
|
+-de.intarsys.pdf.pd.PDCSLab
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDCSLab


extends PDCSCIEBased

Support for lab color space.

Nested Class Summary


class PDCSLab.MetaClass
PDCSLab.MetaClass

Field Summary
public static final DK_BlackPoint

public static final DK_Range

public static final DK_WhitePoint

public static final META


The meta class instance

Method Summary
float[] getWhitePoint()

Fields
DK_BlackPoint
public static final de.intarsys.pdf.cos.COSName DK_BlackPoint

Page 990 of 1521


de.intarsys.pdf.pd.PDCSLab

(continued from last page)

DK_Range
public static final de.intarsys.pdf.cos.COSName DK_Range

DK_WhitePoint
public static final de.intarsys.pdf.cos.COSName DK_WhitePoint

META
public static final de.intarsys.pdf.pd.PDCSLab.MetaClass META

The meta class instance

Methods
getWhitePoint
public float[] getWhitePoint()

Page 991 of 1521


de.intarsys.pdf.pd.PDCSLab.MetaClass

de.intarsys.pdf.pd
Class PDCSLab.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDColorSpace.MetaClass
|
+-de.intarsys.pdf.pd.PDCSCIEBased.MetaClass
|
+-de.intarsys.pdf.pd.PDCSLab.MetaClass

public static class PDCSLab.MetaClass


extends PDCSCIEBased.MetaClass

The meta class implementation

Page 992 of 1521


de.intarsys.pdf.pd.PDCSPattern

de.intarsys.pdf.pd
Class PDCSPattern
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDColorSpace
|
+-de.intarsys.pdf.pd.PDCSSpecial
|
+-de.intarsys.pdf.pd.PDCSPattern
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDCSPattern


extends PDCSSpecial

Support for pattern based color spaces.

Nested Class Summary


class PDCSPattern.MetaClass
PDCSPattern.MetaClass

Field Summary
public static final META
The meta class instance

Fields
META
public static final de.intarsys.pdf.pd.PDCSPattern.MetaClass META

The meta class instance

Page 993 of 1521


de.intarsys.pdf.pd.PDCSPattern.MetaClass

de.intarsys.pdf.pd
Class PDCSPattern.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDColorSpace.MetaClass
|
+-de.intarsys.pdf.pd.PDCSSpecial.MetaClass
|
+-de.intarsys.pdf.pd.PDCSPattern.MetaClass

public static class PDCSPattern.MetaClass


extends PDCSSpecial.MetaClass

The meta class implementation

Page 994 of 1521


de.intarsys.pdf.pd.PDCSSeparation

de.intarsys.pdf.pd
Class PDCSSeparation
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDColorSpace
|
+-de.intarsys.pdf.pd.PDCSSpecial
|
+-de.intarsys.pdf.pd.PDCSSeparation
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDCSSeparation


extends PDCSSpecial

Separation color spaces.

Nested Class Summary


class PDCSSeparation.MetaClass
PDCSSeparation.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
PDColorSpace getAlternate()

String getName()

PDFunction getTintTransform()

Fields
META
public static final de.intarsys.pdf.pd.PDCSSeparation.MetaClass META

The meta class instance

Methods

Page 995 of 1521


de.intarsys.pdf.pd.PDCSSeparation

(continued from last page)

getAlternate
public PDColorSpace getAlternate()

getName
public String getName()

getTintTransform
public PDFunction getTintTransform()

Page 996 of 1521


de.intarsys.pdf.pd.PDCSSeparation.MetaClass

de.intarsys.pdf.pd
Class PDCSSeparation.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDColorSpace.MetaClass
|
+-de.intarsys.pdf.pd.PDCSSpecial.MetaClass
|
+-de.intarsys.pdf.pd.PDCSSeparation.MetaClass

public static class PDCSSeparation.MetaClass


extends PDCSSpecial.MetaClass

The meta class implementation

Page 997 of 1521


de.intarsys.pdf.pd.PDCSSpecial

de.intarsys.pdf.pd
Class PDCSSpecial
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDColorSpace
|
+-de.intarsys.pdf.pd.PDCSSpecial
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


PDCSDeviceN, PDCSIndexed, PDCSPattern, PDCSSeparation

public abstract class PDCSSpecial


extends PDColorSpace

Abstract superclass for special color spaces.

Nested Class Summary


class PDCSSpecial.MetaClass
PDCSSpecial.MetaClass

Field Summary
public static final META
The meta class instance

Fields
META
public static final de.intarsys.pdf.pd.PDCSSpecial.MetaClass META

The meta class instance

Page 998 of 1521


de.intarsys.pdf.pd.PDCSSpecial.MetaClass

de.intarsys.pdf.pd
Class PDCSSpecial.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDColorSpace.MetaClass
|
+-de.intarsys.pdf.pd.PDCSSpecial.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass, MetaClass, MetaClass

public static class PDCSSpecial.MetaClass


extends PDColorSpace.MetaClass

The meta class implementation

Page 999 of 1521


de.intarsys.pdf.pd.PDDestination

de.intarsys.pdf.pd
Class PDDestination
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDDestination
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


PDExplicitDestination, PDNamedDestination

public abstract class PDDestination


extends PDObject

Abstract superclass for objects defining a destination in a PDF document.

Nested Class Summary


class PDDestination.MetaClass
PDDestination.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
abstract getResolvedDestination(PDDocument doc)
PDExplicitDestination

Fields
META
public static final de.intarsys.pdf.pd.PDDestination.MetaClass META

The meta class instance

Methods
getResolvedDestination
public abstract PDExplicitDestination getResolvedDestination(PDDocument doc)

Page 1000 of 1521


de.intarsys.pdf.pd.PDDestination.MetaClass

de.intarsys.pdf.pd
Class PDDestination.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDDestination.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass

public static class PDDestination.MetaClass


extends PDObject.MetaClass

The meta class implementation

Method Summary
Class getRootClass()

Methods
getRootClass
public Class getRootClass()

Page 1001 of 1521


de.intarsys.pdf.pd.PDDocument

de.intarsys.pdf.pd
Class PDDocument
java.lang.Object
|
+-de.intarsys.pdf.pd.PDDocument
All Implemented Interfaces:
ILocatorSupport, IAttributeSupport, IAdditionalActionSupport

public class PDDocument


extends Object
implements IAdditionalActionSupport, IAttributeSupport, ILocatorSupport

The PD Level representation of a PDF Document. PD Level objects provide the PDF semantics on top of the COS objects.

A PDDocument object should not be shared between threads without thought. Some clients may store information along with the
PDDocument extensions in a non thread safe manner.

Field Summary
public static final CATALOG_ACTION_TRIGGERS

public static final CN_Perms_DocMDP

public static final CN_Perms_UR

public static final DK_OpenAction

public static final DK_Perms

Method Summary
void addAction(PDAction action)

void addOpenAction(PDAction newAction)


Add a PDAction to be exceuted when this is opened.

void addPageNode(PDPageNode newNode)


Add a page object to this documents root page tree.

void addPageNodeAfter(PDPageNode newNode, PDPageNode destination)


Add a page object to this document after the designated page.

void close()
Close the document.

PDDocument copyDeep()
Make a deep copy of the receiver.

COSDocument cosGetDoc()
The COS level implementation of the document

Page 1002 of 1521


de.intarsys.pdf.pd.PDDocument

COSDictionary cosGetPermissionsDict()
The permissions dictionary of the document.

COSDictionary cosGetPieceInfoDict()
The piece info dictionary of the document.

COSDictionary cosGetURI()
The uri dictionary of the document.

void cosSetPermissionsDict(COSDictionary permsDict)


Set the permissions dictionary of the document.

void cosSetPieceInfoDict(COSDictionary dict)


Set the piece info dictionary of the document.

PDAcroForm createAcroForm()
create an AcroForm in a PDF Document.

static PDDocument createFromCos(COSDocument doc)


create a pd document based on a cos level object

static PDDocument createFromLocator(ILocator locator)

static PDDocument createNew()


create a PDDocument from scratch

PDPageTree createPageTree()
create a new page tree for this document. tha page tree must still be added to the document
or a page tree to get visible.

IAccessPermissions getAccessPermissions()
Simple delegate to COSDocument.getAccessPermissions()

PDAcroForm getAcroForm()
read an AcroForm from a PDF Document. return null if no AcroForm is available.

PDAdditionalActions getAdditionalActions()

java.util.List getAnnotations()

PDApplicationData getApplicationData(String name)

Object getAttribute(Object key)

String getAuthor()

COSCatalog getCatalog()
lookup the catalog dictionary in a document

CDSDate getCreationDate()

String getCreationDateString()

String getCreator()

Page 1003 of 1521


de.intarsys.pdf.pd.PDDocument

COSInfoDict getInfoDict()
Get the info dictionary containing metadata.

String getKeywords()

ILocator getLocator()

String getMetadata()

CDSDate getModDate()

String getModDateString()

String getName()

PDAction getOpenAction()

PDOutline getOutline()

PDOutputIntent getOutputIntent(COSName oiName)

java.util.List getOutputIntents()

PDPageTree getPageTree()
return the documents root page tree

PDSignature getPermissions(COSName key)


Shortcut to a signature dictionary in the document permissions dictionary.

String getProducer()

String getSubject()

java.util.Set getSupportedTriggerEvents()

String getTitle()

String getTrapped()

EnumWriteMode getWriteModeHint()
The write mode to be used when the document is written the next time.

boolean isAppendOnly()
true if the document has a flag to prefere incremental save.

boolean isDirty()

boolean isEncrypted()
Lookup if this document is encrypted, means it has a security handler.

boolean isNew()

Page 1004 of 1521


de.intarsys.pdf.pd.PDDocument

boolean isPreferIncrementalSave()
true if the document should be saved in an incremental way only.

boolean isReadOnly()

boolean isSigned()
true if the document contains digital signatures.

COSObject lookupDestination(String name)

void removeApplicationData(String name)

Object removeAttribute(Object key)

void restore(ILocator locator)

void save()

void save(ILocator locator)

void save(ILocator locator, java.util.Map options)

void setAcroForm(PDAcroForm form)


Set AcroForm in PDF Document.

void setAdditionalActions(PDAdditionalActions actions)

void setApplicationData(String name, PDApplicationData data)

Object setAttribute(Object key, Object o)

void setAuthor(String value)

void setCreationDateString(String value)

void setCreator(String value)

void setDocumentInfo(COSName name, String value)

void setInfoDict(COSInfoDict infoDict)


Set the info dictionary containing metadata.

void setKeywords(String value)

void setModDateString(String value)

void setName(String name)

void setOpenAction(PDAction newAction)

Page 1005 of 1521


de.intarsys.pdf.pd.PDDocument

void setOutline(PDOutline outline)

void setPageTree(PDPageTree newTree)

void setPermissions(COSName name, PDSignature signature)

void setProducer(String value)

void setSubject(String value)

void setTitle(String value)

void setTrapped(String value)

void setWriteModeHint(EnumWriteMode writeMode)


The write mode to be used when the document is written the next time.

Fields
CATALOG_ACTION_TRIGGERS
public static final java.util.Set CATALOG_ACTION_TRIGGERS

DK_OpenAction
public static final de.intarsys.pdf.cos.COSName DK_OpenAction

DK_Perms
public static final de.intarsys.pdf.cos.COSName DK_Perms

CN_Perms_DocMDP
public static final de.intarsys.pdf.cos.COSName CN_Perms_DocMDP

CN_Perms_UR
public static final de.intarsys.pdf.cos.COSName CN_Perms_UR

Methods

Page 1006 of 1521


de.intarsys.pdf.pd.PDDocument

(continued from last page)

createFromCos
public static PDDocument createFromCos(COSDocument doc)
throws COSLoadException

create a pd document based on a cos level object

Parameters:
doc - COSDocument to base this PDDocument on

Returns:
A new PDDocument object.

Throws:
COSLoadException

createFromLocator
public static PDDocument createFromLocator(ILocator locator)
throws java.io.IOException,
COSLoadException

createNew
public static PDDocument createNew()

create a PDDocument from scratch

Returns:
A new PDDocument.

addAction
public void addAction(PDAction action)

addOpenAction
public void addOpenAction(PDAction newAction)

Add a PDAction to be exceuted when this is opened.

Parameters:
newAction - The new PDAction

addPageNode
public void addPageNode(PDPageNode newNode)

Add a page object to this documents root page tree.

Parameters:
newNode - The page to be added

Page 1007 of 1521


de.intarsys.pdf.pd.PDDocument

(continued from last page)

addPageNodeAfter
public void addPageNodeAfter(PDPageNode newNode,
PDPageNode destination)

Add a page object to this document after the designated page.

Parameters:
newNode - the page to be added
destination - The page after the new one is inserted

close
public void close()
throws java.io.IOException

Close the document. Accessing a documents content is undefined after close.

Throws:
IOException

copyDeep
public PDDocument copyDeep()

Make a deep copy of the receiver.

Returns:
the object copied recursively

cosGetDoc
public COSDocument cosGetDoc()

The COS level implementation of the document

Returns:
The underlying COSDocument

cosGetPermissionsDict
public COSDictionary cosGetPermissionsDict()

The permissions dictionary of the document.

Returns:
The permissions dictionary of the document.

cosGetPieceInfoDict
public COSDictionary cosGetPieceInfoDict()

The piece info dictionary of the document.

Returns:
The piece info dictionary of the document.

Page 1008 of 1521


de.intarsys.pdf.pd.PDDocument

(continued from last page)

cosGetURI
public COSDictionary cosGetURI()

The uri dictionary of the document.

Returns:
The uri dictionary of the document.

cosSetPermissionsDict
public void cosSetPermissionsDict(COSDictionary permsDict)

Set the permissions dictionary of the document.

Parameters:
permsDict - the new permission dictionary

cosSetPieceInfoDict
public void cosSetPieceInfoDict(COSDictionary dict)

Set the piece info dictionary of the document.

Parameters:
dict - the new piece info dictionary

createAcroForm
public PDAcroForm createAcroForm()

create an AcroForm in a PDF Document.

Returns:
the acro form just created

Throws:
IllegalStateException

createPageTree
public PDPageTree createPageTree()

create a new page tree for this document. tha page tree must still be added to the document or a page tree to get visible.

Returns:
the PDPageTree created

getAccessPermissions
public IAccessPermissions getAccessPermissions()

Simple delegate to COSDocument.getAccessPermissions()

Returns:
document access permissions

Page 1009 of 1521


de.intarsys.pdf.pd.PDDocument

(continued from last page)

getAcroForm
public PDAcroForm getAcroForm()

read an AcroForm from a PDF Document. return null if no AcroForm is available.

Returns:
the acro form of the document or null

getAdditionalActions
public PDAdditionalActions getAdditionalActions()

getAnnotations
public java.util.List getAnnotations()

getApplicationData
public PDApplicationData getApplicationData(String name)

getAttribute
public Object getAttribute(Object key)

getAuthor
public String getAuthor()

getCatalog
public COSCatalog getCatalog()

lookup the catalog dictionary in a document

Returns:
the document catalog object

getCreationDate
public CDSDate getCreationDate()

getCreationDateString
public String getCreationDateString()

Page 1010 of 1521


de.intarsys.pdf.pd.PDDocument

(continued from last page)

getCreator
public String getCreator()

getInfoDict
public COSInfoDict getInfoDict()

Get the info dictionary containing metadata.

Returns:
The info dictionary containing metadata.

getKeywords
public String getKeywords()

getLocator
public ILocator getLocator()

getMetadata
public String getMetadata()

getModDate
public CDSDate getModDate()

getModDateString
public String getModDateString()

getName
public String getName()

getOpenAction
public PDAction getOpenAction()

Page 1011 of 1521


de.intarsys.pdf.pd.PDDocument

getOutline
public PDOutline getOutline()

getOutputIntent
public PDOutputIntent getOutputIntent(COSName oiName)

getOutputIntents
public java.util.List getOutputIntents()

getPageTree
public PDPageTree getPageTree()

return the documents root page tree

Returns:
the root page tree of the document

getPermissions
public PDSignature getPermissions(COSName key)

Shortcut to a signature dictionary in the document permissions dictionary. Valid keys are "DocMDP" and "UR". If the
permissions dictionary doesn't exist, then null is returned. If no signature dictionary under the specified key exists, null is
returned.

Parameters:
key - key which should be ether "DocMDP" or "UR"

Returns:
returns a signature dictionary referenced by the specified key or null if ether no permissions dictionary exists or no
signature dictionary to the key exists.

getProducer
public String getProducer()

getSubject
public String getSubject()

getSupportedTriggerEvents
public java.util.Set getSupportedTriggerEvents()

Page 1012 of 1521


de.intarsys.pdf.pd.PDDocument

(continued from last page)

getTitle
public String getTitle()

getTrapped
public String getTrapped()

getWriteModeHint
public EnumWriteMode getWriteModeHint()

The write mode to be used when the document is written the next time. If defined this overrides any hint that is used when
saving the document. The write mode is reset after each "save".

Returns:
The write mode to be used when the document is written.

isDirty
public boolean isDirty()

isEncrypted
public boolean isEncrypted()

Lookup if this document is encrypted, means it has a security handler.

Returns:
true if the document has an ISystemSecurityHandler

isNew
public boolean isNew()

isReadOnly
public boolean isReadOnly()

isPreferIncrementalSave
public boolean isPreferIncrementalSave()

true if the document should be saved in an incremental way only. This is for example the case when the document
contains digital signatures.

Returns:

Page 1013 of 1521


de.intarsys.pdf.pd.PDDocument

(continued from last page)

true if the document should be saved in an incremental way only.

isAppendOnly
public boolean isAppendOnly()

true if the document has a flag to prefere incremental save.

Returns:
true if the document should be saved in an incremental way only.

isSigned
public boolean isSigned()

true if the document contains digital signatures. This should be reflected in the SigFlags entry of the form - but who
knows...

Returns:
true if the document contains digital signatures.

lookupDestination
public COSObject lookupDestination(String name)

removeApplicationData
public void removeApplicationData(String name)

removeAttribute
public Object removeAttribute(Object key)

restore
public void restore(ILocator locator)
throws java.io.IOException,
COSLoadException

save
public void save()
throws java.io.IOException

save
public void save(ILocator locator)
throws java.io.IOException

Page 1014 of 1521


de.intarsys.pdf.pd.PDDocument

(continued from last page)

save
public void save(ILocator locator,
java.util.Map options)
throws java.io.IOException

setAcroForm
public void setAcroForm(PDAcroForm form)

Set AcroForm in PDF Document.

setAdditionalActions
public void setAdditionalActions(PDAdditionalActions actions)

setApplicationData
public void setApplicationData(String name,
PDApplicationData data)

setAttribute
public Object setAttribute(Object key,
Object o)

setAuthor
public void setAuthor(String value)

setCreationDateString
public void setCreationDateString(String value)

setCreator
public void setCreator(String value)

setDocumentInfo
public void setDocumentInfo(COSName name,
String value)

Page 1015 of 1521


de.intarsys.pdf.pd.PDDocument

(continued from last page)

setInfoDict
public void setInfoDict(COSInfoDict infoDict)

Set the info dictionary containing metadata.

Parameters:
infoDict - The info dictionary containing metadata.

setKeywords
public void setKeywords(String value)

setModDateString
public void setModDateString(String value)

setName
public void setName(String name)

setOpenAction
public void setOpenAction(PDAction newAction)

setOutline
public void setOutline(PDOutline outline)

setPageTree
public void setPageTree(PDPageTree newTree)

setPermissions
public void setPermissions(COSName name,
PDSignature signature)

setProducer
public void setProducer(String value)

Page 1016 of 1521


de.intarsys.pdf.pd.PDDocument

(continued from last page)

setSubject
public void setSubject(String value)

setTitle
public void setTitle(String value)

setTrapped
public void setTrapped(String value)

setWriteModeHint
public void setWriteModeHint(EnumWriteMode writeMode)

The write mode to be used when the document is written the next time. If defined this overrides any hint that is used when
saving the document. The write mode is reset after each "save".

Parameters:
writeMode - The write mode to be used when the document is written.

Page 1017 of 1521


de.intarsys.pdf.pd.PDEmbeddedFile

de.intarsys.pdf.pd
Class PDEmbeddedFile
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDEmbeddedFile
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDEmbeddedFile


extends PDObject

An embedding of another file (and optional content) within the PDF.

Nested Class Summary


class PDEmbeddedFile.MetaClass
PDEmbeddedFile.MetaClass

Field Summary
public static final CN_Type_EmbeddedFile

public static final META


The meta class instance

Method Summary
COSDictionary cosGetDict()

byte[] getBytes()
get the data representing the XObject

void setBytes(byte[] bytes)


set the data representing the XObject

Fields
META
public static final de.intarsys.pdf.pd.PDEmbeddedFile.MetaClass META

The meta class instance

CN_Type_EmbeddedFile
public static final de.intarsys.pdf.cos.COSName CN_Type_EmbeddedFile

Page 1018 of 1521


de.intarsys.pdf.pd.PDEmbeddedFile

(continued from last page)

Methods
cosGetDict
public COSDictionary cosGetDict()

Get the base object as a COSDictionary.

This will throw a java.lang.ClassCastException if the base type is not appropriate!

getBytes
public byte[] getBytes()

get the data representing the XObject

Returns:
get the data representing the XObject

setBytes
public void setBytes(byte[] bytes)

set the data representing the XObject

Parameters:
bytes - the data representing the XObject

Page 1019 of 1521


de.intarsys.pdf.pd.PDEmbeddedFile.MetaClass

de.intarsys.pdf.pd
Class PDEmbeddedFile.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDEmbeddedFile.MetaClass

public static class PDEmbeddedFile.MetaClass


extends PDObject.MetaClass

The meta class implementation

Page 1020 of 1521


de.intarsys.pdf.pd.PDExplicitDestination

de.intarsys.pdf.pd
Class PDExplicitDestination
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDDestination
|
+-de.intarsys.pdf.pd.PDExplicitDestination
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDExplicitDestination


extends PDDestination

The explicit reference to a destination in a PDF document, consisting of a page and a definition of the rectangle to be displayed.

Nested Class Summary


class PDExplicitDestination.MetaClass
PDExplicitDestination.MetaClass

Field Summary
public static final CN_DISPLAY_MODE_Fit

public static final CN_DISPLAY_MODE_FitB

public static final CN_DISPLAY_MODE_FitBH

public static final CN_DISPLAY_MODE_FitBV

public static final CN_DISPLAY_MODE_FitH

public static final CN_DISPLAY_MODE_FitR

public static final CN_DISPLAY_MODE_FitV

public static final CN_DISPLAY_MODE_XYZ

public static final META


The meta class instance

Method Summary
COSName getDisplayMode()

Page 1021 of 1521


de.intarsys.pdf.pd.PDExplicitDestination

PDPage getPage(PDDocument doc)


The destination page.

float[] getParameters()

PDExplicitDestination getResolvedDestination(PDDocument doc)

void setDisplayMode(COSName mode)

void setPage(PDPage page)

void setParameters(double[] parameters)

void setParameters(float[] parameters)

Fields
META
public static final de.intarsys.pdf.pd.PDExplicitDestination.MetaClass META

The meta class instance

CN_DISPLAY_MODE_XYZ
public static final de.intarsys.pdf.cos.COSName CN_DISPLAY_MODE_XYZ

CN_DISPLAY_MODE_Fit
public static final de.intarsys.pdf.cos.COSName CN_DISPLAY_MODE_Fit

CN_DISPLAY_MODE_FitH
public static final de.intarsys.pdf.cos.COSName CN_DISPLAY_MODE_FitH

CN_DISPLAY_MODE_FitV
public static final de.intarsys.pdf.cos.COSName CN_DISPLAY_MODE_FitV

CN_DISPLAY_MODE_FitR
public static final de.intarsys.pdf.cos.COSName CN_DISPLAY_MODE_FitR

Page 1022 of 1521


de.intarsys.pdf.pd.PDExplicitDestination

CN_DISPLAY_MODE_FitB
public static final de.intarsys.pdf.cos.COSName CN_DISPLAY_MODE_FitB

CN_DISPLAY_MODE_FitBH
public static final de.intarsys.pdf.cos.COSName CN_DISPLAY_MODE_FitBH

CN_DISPLAY_MODE_FitBV
public static final de.intarsys.pdf.cos.COSName CN_DISPLAY_MODE_FitBV

Methods
getDisplayMode
public COSName getDisplayMode()

getPage
public PDPage getPage(PDDocument doc)

The destination page. ATTENTION: it is common have dangling destinations to invalid (null) pages around!

Returns:
The destination page. Be sure to handle null return values.

setPage
public void setPage(PDPage page)

setDisplayMode
public void setDisplayMode(COSName mode)

getParameters
public float[] getParameters()

setParameters
public void setParameters(float[] parameters)

Page 1023 of 1521


de.intarsys.pdf.pd.PDExplicitDestination

(continued from last page)

setParameters
public void setParameters(double[] parameters)

getResolvedDestination
public PDExplicitDestination getResolvedDestination(PDDocument doc)

Page 1024 of 1521


de.intarsys.pdf.pd.PDExplicitDestination.MetaClass

de.intarsys.pdf.pd
Class PDExplicitDestination.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDDestination.MetaClass
|
+-de.intarsys.pdf.pd.PDExplicitDestination.MetaClass

public static class PDExplicitDestination.MetaClass


extends PDDestination.MetaClass

The meta class implementation

Page 1025 of 1521


de.intarsys.pdf.pd.PDExtGState

de.intarsys.pdf.pd
Class PDExtGState
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDExtGState
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDExtGState


extends PDObject

The extended graphic state object. This is used in a resource dictionary to additionally define graphics context information.

Nested Class Summary


class PDExtGState.MetaClass
PDExtGState.MetaClass

Field Summary
public static final BLEND_MODES
supported additional action triggers

public static final CN_BM_Multiply

public static final CN_BM_Normal

public static final CN_Type_ExtGState


The type name

public static final DK_AIS

public static final DK_BG

public static final DK_BG2

public static final DK_BM

public static final DK_ca

public static final DK_CA

public static final DK_D

public static final DK_FL

Page 1026 of 1521


de.intarsys.pdf.pd.PDExtGState

public static final DK_Font

public static final DK_HT

public static final DK_LC

public static final DK_LJ

public static final DK_LW

public static final DK_ML

public static final DK_op

public static final DK_OP

public static final DK_OPM

public static final DK_RI

public static final DK_SA

public static final DK_SM

public static final DK_SMask

public static final DK_TK

public static final DK_TR

public static final DK_TR2

public static final DK_UCR

public static final DK_UCR2

public static final META


The meta class instance

Method Summary
COSName getBlendMode()

float getNonStrokingAlphaConstant()

float getStrokingAlphaConstant()

boolean isBlendModeMultiply()

Page 1027 of 1521


de.intarsys.pdf.pd.PDExtGState

boolean isBlendModeNormal()

void setBlendMode(COSName blendMode)

void setBlendModeMultiply()

void setBlendModeNormal()

void setNonStrokingAlphaConstant(float alpha)

void setStrokingAlphaConstant(float alpha)

Fields
DK_LW
public static final de.intarsys.pdf.cos.COSName DK_LW

DK_LC
public static final de.intarsys.pdf.cos.COSName DK_LC

DK_LJ
public static final de.intarsys.pdf.cos.COSName DK_LJ

DK_ML
public static final de.intarsys.pdf.cos.COSName DK_ML

DK_D
public static final de.intarsys.pdf.cos.COSName DK_D

DK_RI
public static final de.intarsys.pdf.cos.COSName DK_RI

DK_OP
public static final de.intarsys.pdf.cos.COSName DK_OP

Page 1028 of 1521


de.intarsys.pdf.pd.PDExtGState

(continued from last page)

DK_op
public static final de.intarsys.pdf.cos.COSName DK_op

DK_OPM
public static final de.intarsys.pdf.cos.COSName DK_OPM

DK_Font
public static final de.intarsys.pdf.cos.COSName DK_Font

DK_BG
public static final de.intarsys.pdf.cos.COSName DK_BG

DK_BG2
public static final de.intarsys.pdf.cos.COSName DK_BG2

DK_UCR
public static final de.intarsys.pdf.cos.COSName DK_UCR

DK_UCR2
public static final de.intarsys.pdf.cos.COSName DK_UCR2

DK_TR
public static final de.intarsys.pdf.cos.COSName DK_TR

DK_TR2
public static final de.intarsys.pdf.cos.COSName DK_TR2

Page 1029 of 1521


de.intarsys.pdf.pd.PDExtGState

(continued from last page)

DK_HT
public static final de.intarsys.pdf.cos.COSName DK_HT

DK_FL
public static final de.intarsys.pdf.cos.COSName DK_FL

DK_SM
public static final de.intarsys.pdf.cos.COSName DK_SM

DK_SA
public static final de.intarsys.pdf.cos.COSName DK_SA

DK_BM
public static final de.intarsys.pdf.cos.COSName DK_BM

DK_SMask
public static final de.intarsys.pdf.cos.COSName DK_SMask

DK_CA
public static final de.intarsys.pdf.cos.COSName DK_CA

DK_ca
public static final de.intarsys.pdf.cos.COSName DK_ca

DK_AIS
public static final de.intarsys.pdf.cos.COSName DK_AIS

DK_TK
public static final de.intarsys.pdf.cos.COSName DK_TK

Page 1030 of 1521


de.intarsys.pdf.pd.PDExtGState

(continued from last page)

CN_BM_Multiply
public static final de.intarsys.pdf.cos.COSName CN_BM_Multiply

CN_BM_Normal
public static final de.intarsys.pdf.cos.COSName CN_BM_Normal

BLEND_MODES
public static final java.util.Set BLEND_MODES

supported additional action triggers

META
public static final de.intarsys.pdf.pd.PDExtGState.MetaClass META

The meta class instance

CN_Type_ExtGState
public static final de.intarsys.pdf.cos.COSName CN_Type_ExtGState

The type name

Methods
setStrokingAlphaConstant
public void setStrokingAlphaConstant(float alpha)

setNonStrokingAlphaConstant
public void setNonStrokingAlphaConstant(float alpha)

getStrokingAlphaConstant
public float getStrokingAlphaConstant()

getNonStrokingAlphaConstant
public float getNonStrokingAlphaConstant()

Page 1031 of 1521


de.intarsys.pdf.pd.PDExtGState

getBlendMode
public COSName getBlendMode()

setBlendMode
public void setBlendMode(COSName blendMode)

isBlendModeNormal
public boolean isBlendModeNormal()

setBlendModeNormal
public void setBlendModeNormal()

isBlendModeMultiply
public boolean isBlendModeMultiply()

setBlendModeMultiply
public void setBlendModeMultiply()

Page 1032 of 1521


de.intarsys.pdf.pd.PDExtGState.MetaClass

de.intarsys.pdf.pd
Class PDExtGState.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDExtGState.MetaClass

public static class PDExtGState.MetaClass


extends PDObject.MetaClass

The meta class implementation

Page 1033 of 1521


de.intarsys.pdf.pd.PDFileAttachmentAnnotation

de.intarsys.pdf.pd
Class PDFileAttachmentAnnotation
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAnnotation
|
+-de.intarsys.pdf.pd.PDMarkupAnnotation
|
+-de.intarsys.pdf.pd.PDFileAttachmentAnnotation
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IAdditionalActionSupport

public class PDFileAttachmentAnnotation


extends PDMarkupAnnotation

The file attachment annotation

Nested Class Summary


class PDFileAttachmentAnnotation.MetaClass
PDFileAttachmentAnnotation.MetaClass

Field Summary
public static final CN_Name_Graph

public static final CN_Name_Paperclip

public static final CN_Name_PushPin

public static final CN_Name_Tag

public static final CN_Subtype_FileAttachment

public static final DK_FS

public static final DK_Name

public static final META


The meta class instance

Constructor Summary
public PDFileAttachmentAnnotation(COSObject object)

Method Summary

Page 1034 of 1521


de.intarsys.pdf.pd.PDFileAttachmentAnnotation

PDFileSpecification getFileSpecification()

COSName getIconName()

void setFileSpecification(PDFileSpecification fileSpec)

void setIconName(COSName name)

Fields
META
public static final de.intarsys.pdf.pd.PDFileAttachmentAnnotation.MetaClass META

The meta class instance

DK_FS
public static final de.intarsys.pdf.cos.COSName DK_FS

DK_Name
public static final de.intarsys.pdf.cos.COSName DK_Name

CN_Name_Graph
public static final de.intarsys.pdf.cos.COSName CN_Name_Graph

CN_Name_PushPin
public static final de.intarsys.pdf.cos.COSName CN_Name_PushPin

CN_Name_Paperclip
public static final de.intarsys.pdf.cos.COSName CN_Name_Paperclip

CN_Name_Tag
public static final de.intarsys.pdf.cos.COSName CN_Name_Tag

Page 1035 of 1521


de.intarsys.pdf.pd.PDFileAttachmentAnnotation

(continued from last page)

CN_Subtype_FileAttachment
public static final de.intarsys.pdf.cos.COSName CN_Subtype_FileAttachment

Constructors
PDFileAttachmentAnnotation
public PDFileAttachmentAnnotation(COSObject object)

Methods
getFileSpecification
public PDFileSpecification getFileSpecification()

setFileSpecification
public void setFileSpecification(PDFileSpecification fileSpec)

getIconName
public COSName getIconName()

setIconName
public void setIconName(COSName name)

Page 1036 of 1521


de.intarsys.pdf.pd.PDFileAttachmentAnnotation.MetaClass

de.intarsys.pdf.pd
Class PDFileAttachmentAnnotation.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAnnotation.MetaClass
|
+-de.intarsys.pdf.pd.PDMarkupAnnotation.MetaClass
|
+-de.intarsys.pdf.pd.PDFileAttachmentAnnotation.MetaClass

public static class PDFileAttachmentAnnotation.MetaClass


extends PDMarkupAnnotation.MetaClass

The meta class implementation

Page 1037 of 1521


de.intarsys.pdf.pd.PDFileSpecification

de.intarsys.pdf.pd
Class PDFileSpecification
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDFileSpecification
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


PDFileSpecificationURL

public class PDFileSpecification


extends PDObject

Repesents the PDF's FileSpecification-type

Nested Class Summary


class PDFileSpecification.MetaClass
PDFileSpecification.MetaClass

Field Summary
public static final CN_F_DOS
File specification string for DOS files

public static final CN_F_Mac


File specification string for Macintosh files

public static final CN_F_Unix


File specification string for UNIX files

public static final CN_FS_URL


File URL

public static final CN_Type_Alt_Filespec

public static final CN_Type_Filespec

public static final DK_EF


Embedded file dict

public static final DK_F


File

public static final DK_FS


Name of the file system.

Page 1038 of 1521


de.intarsys.pdf.pd.PDFileSpecification

public static final DK_RF


Embedded file array dict.

public static final META


The meta class instance

Method Summary
PDEmbeddedFile getEmbeddedFile(COSName flavor)
The embedded file of a specific flavor (one of F, DOS, Mac, Unix),

COSDictionary getEmbeddedFiles()
The dictionary mapping the F/DOC/Mac/Unix entries of the file spec to embedded file
dictionaries.

String getFile()

String getFileSpecificationString(COSName flavor)

COSName getFileSystem()

void setEmbeddedFile(COSName flavor, PDEmbeddedFile embeddedFile)

void setFile(String file)

void setFileSpecificationString(COSName flavor, String spec)

void setFileSystem(COSName bs)

Fields
CN_Type_Filespec
public static final de.intarsys.pdf.cos.COSName CN_Type_Filespec

CN_Type_Alt_Filespec
public static final de.intarsys.pdf.cos.COSName CN_Type_Alt_Filespec

META
public static final de.intarsys.pdf.pd.PDFileSpecification.MetaClass META

The meta class instance

DK_FS
public static final de.intarsys.pdf.cos.COSName DK_FS

Page 1039 of 1521


de.intarsys.pdf.pd.PDFileSpecification

(continued from last page)

Name of the file system.

DK_F
public static final de.intarsys.pdf.cos.COSName DK_F

File

CN_F_DOS
public static final de.intarsys.pdf.cos.COSName CN_F_DOS

File specification string for DOS files

CN_F_Mac
public static final de.intarsys.pdf.cos.COSName CN_F_Mac

File specification string for Macintosh files

CN_F_Unix
public static final de.intarsys.pdf.cos.COSName CN_F_Unix

File specification string for UNIX files

CN_FS_URL
public static final de.intarsys.pdf.cos.COSName CN_FS_URL

File URL

DK_EF
public static final de.intarsys.pdf.cos.COSName DK_EF

Embedded file dict

DK_RF
public static final de.intarsys.pdf.cos.COSName DK_RF

Embedded file array dict.

Methods
setFileSystem
public void setFileSystem(COSName bs)

getFileSystem
public COSName getFileSystem()

Page 1040 of 1521


de.intarsys.pdf.pd.PDFileSpecification

getFile
public String getFile()

getEmbeddedFile
public PDEmbeddedFile getEmbeddedFile(COSName flavor)

The embedded file of a specific flavor (one of F, DOS, Mac, Unix),

Parameters:
flavor - One of F, DOC, Mac, Unix

Returns:
the embedded file of this flavor, if any, or null.

setEmbeddedFile
public void setEmbeddedFile(COSName flavor,
PDEmbeddedFile embeddedFile)

getFileSpecificationString
public String getFileSpecificationString(COSName flavor)

setFileSpecificationString
public void setFileSpecificationString(COSName flavor,
String spec)

getEmbeddedFiles
public COSDictionary getEmbeddedFiles()

The dictionary mapping the F/DOC/Mac/Unix entries of the file spec to embedded file dictionaries.

setFile
public void setFile(String file)

Page 1041 of 1521


de.intarsys.pdf.pd.PDFileSpecification.MetaClass

de.intarsys.pdf.pd
Class PDFileSpecification.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDFileSpecification.MetaClass
Direct Known Subclasses:
MetaClass

public static class PDFileSpecification.MetaClass


extends PDObject.MetaClass

The meta class implementation

Method Summary
Class getRootClass()

Methods
getRootClass
public Class getRootClass()

Page 1042 of 1521


de.intarsys.pdf.pd.PDFileSpecificationURL

de.intarsys.pdf.pd
Class PDFileSpecificationURL
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDFileSpecification
|
+-de.intarsys.pdf.pd.PDFileSpecificationURL
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDFileSpecificationURL


extends PDFileSpecification

Nested Class Summary


class PDFileSpecificationURL.MetaClass
PDFileSpecificationURL.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
static createNew(java.net.URL url)
PDFileSpecificationUR
L

java.net.URL getURL()

void setURL(java.net.URL newURL)

Fields
META
public static final de.intarsys.pdf.pd.PDFileSpecificationURL.MetaClass META

The meta class instance

Methods

Page 1043 of 1521


de.intarsys.pdf.pd.PDFileSpecificationURL

(continued from last page)

setURL
public void setURL(java.net.URL newURL)

getURL
public java.net.URL getURL()

createNew
public static PDFileSpecificationURL createNew(java.net.URL url)

Page 1044 of 1521


de.intarsys.pdf.pd.PDFileSpecificationURL.MetaClass

de.intarsys.pdf.pd
Class PDFileSpecificationURL.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDFileSpecification.MetaClass
|
+-de.intarsys.pdf.pd.PDFileSpecificationURL.MetaClass

public static class PDFileSpecificationURL.MetaClass


extends PDFileSpecification.MetaClass

The meta class implementation

Page 1045 of 1521


de.intarsys.pdf.pd.PDForm

de.intarsys.pdf.pd
Class PDForm
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDXObject
|
+-de.intarsys.pdf.pd.PDForm
All Implemented Interfaces:
IContentStreamProvider, ICOSObjectListener, IAttributeSupport

public class PDForm


extends PDXObject
implements IAttributeSupport, ICOSObjectListener, IContentStreamProvider

A form object. A form object specifies a reusable graphical object (not an AcroForm).

Nested Class Summary


class PDForm.MetaClass
PDForm.MetaClass

Field Summary
public static final CN_Subtype_Form

public static final DK_BBox

public static final DK_FormType

public static final DK_Group

public static final DK_Matrix

public static final DK_OPI

public static final DK_PieceInfo

public static final DK_PS

public static final DK_Subtype2

public static final META


The meta class instance

Method Summary

Page 1046 of 1521


de.intarsys.pdf.pd.PDForm

void addMarkedContent(byte[] content)


Add new marked content to the stream.

COSDictionary cosGetPieceInfo()
The piece info dictionary of the document.

COSDictionary cosSetPieceInfo(COSDictionary dict)


Set the piece info dictionary of the document.

PDApplicationData getApplicationData(COSName name)

CDSRectangle getBoundingBox()
The bounding box of the receiver form.

CSContent getContentStream()

CDSMatrix getMatrix()
The form matrix of the receiver form.

PDResources getResources()
The resource dictionary of the receiver form.

java.awt.geom.Rectang getTransformedBBox()
le2D
Compute a box according to the PDF specification that completely encompasses the
transformed bounding box of the form.

void invalidateCaches()

boolean isForm()

void setApplicationData(COSName name, PDApplicationData data)

void setBoundingBox(CDSRectangle rect)


Set the bounding box of the receiver.

void setContentStream(CSContent content)

void setMarkedContent(byte[] content)


Set the new variable content of the stream.

void setMatrix(CDSMatrix matrix)


Set the matrix of the receiver.

void setResources(PDResources resources)

Fields
META
public static final de.intarsys.pdf.pd.PDForm.MetaClass META

The meta class instance

Page 1047 of 1521


de.intarsys.pdf.pd.PDForm

(continued from last page)

CN_Subtype_Form
public static final de.intarsys.pdf.cos.COSName CN_Subtype_Form

DK_BBox
public static final de.intarsys.pdf.cos.COSName DK_BBox

DK_Matrix
public static final de.intarsys.pdf.cos.COSName DK_Matrix

DK_PieceInfo
public static final de.intarsys.pdf.cos.COSName DK_PieceInfo

DK_FormType
public static final de.intarsys.pdf.cos.COSName DK_FormType

DK_OPI
public static final de.intarsys.pdf.cos.COSName DK_OPI

DK_PS
public static final de.intarsys.pdf.cos.COSName DK_PS

DK_Subtype2
public static final de.intarsys.pdf.cos.COSName DK_Subtype2

DK_Group
public static final de.intarsys.pdf.cos.COSName DK_Group

Methods

Page 1048 of 1521


de.intarsys.pdf.pd.PDForm

(continued from last page)

setApplicationData
public void setApplicationData(COSName name,
PDApplicationData data)

getApplicationData
public PDApplicationData getApplicationData(COSName name)

setBoundingBox
public void setBoundingBox(CDSRectangle rect)

Set the bounding box of the receiver.

Parameters:
rect - The new bounding box of the receiver.

getBoundingBox
public CDSRectangle getBoundingBox()

The bounding box of the receiver form.

Returns:
The bounding box of the receiver form.

getContentStream
public CSContent getContentStream()

setContentStream
public void setContentStream(CSContent content)

isForm
public boolean isForm()

true if this is a form.

setMarkedContent
public void setMarkedContent(byte[] content)

Set the new variable content of the stream.

Parameters:
content - The new variable content of the stream.

Page 1049 of 1521


de.intarsys.pdf.pd.PDForm

setMatrix
public void setMatrix(CDSMatrix matrix)

Set the matrix of the receiver.

Parameters:
matrix - The new matrix of the receiver.

getMatrix
public CDSMatrix getMatrix()

The form matrix of the receiver form.

Returns:
The form matrix of the receiver form.

getResources
public PDResources getResources()

The resource dictionary of the receiver form. This method can return null if no resource dictionary is available.

Returns:
The resource dictionary of the receiver form.

setResources
public void setResources(PDResources resources)

getTransformedBBox
public java.awt.geom.Rectangle2D getTransformedBBox()

Compute a box according to the PDF specification that completely encompasses the transformed bounding box of the form.

Returns:
a box according to the PDF specification that completely encompasses the transformed bounding box of the form.

addMarkedContent
public void addMarkedContent(byte[] content)

Add new marked content to the stream.

Parameters:
content - The new variable content of the stream.

cosGetPieceInfo
public COSDictionary cosGetPieceInfo()

The piece info dictionary of the document.

Page 1050 of 1521


de.intarsys.pdf.pd.PDForm

(continued from last page)

Returns:
The piece info dictionary of the document.

cosSetPieceInfo
public COSDictionary cosSetPieceInfo(COSDictionary dict)

Set the piece info dictionary of the document.

Parameters:
dict - The piece info dictionary of the document.

Returns:
The /PieceInfo entry previously associated with this.

invalidateCaches
public void invalidateCaches()

Invalidate all local caches as the base object may have changed.

Page 1051 of 1521


de.intarsys.pdf.pd.PDForm.MetaClass

de.intarsys.pdf.pd
Class PDForm.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDXObject.MetaClass
|
+-de.intarsys.pdf.pd.PDForm.MetaClass

public static class PDForm.MetaClass


extends PDXObject.MetaClass

The meta class implementation

Page 1052 of 1521


de.intarsys.pdf.pd.PDFormTools

de.intarsys.pdf.pd
Class PDFormTools
java.lang.Object
|
+-de.intarsys.pdf.pd.PDFormTools

public class PDFormTools


extends Object

PDForm related tool methods.

Method Summary
static PDResources getResources(PDForm form)
Get or create the PDResourceDict for the PDForm lazy.

Methods
getResources
public static PDResources getResources(PDForm form)

Get or create the PDResourceDict for the PDForm lazy.

Parameters:
form - The form to lookup (and create) the PDResourceDict.

Returns:
The PDResourceDict for form.

Page 1053 of 1521


de.intarsys.pdf.pd.PDFreeFormShading

de.intarsys.pdf.pd
Class PDFreeFormShading
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDShading
|
+-de.intarsys.pdf.pd.PDFreeFormShading
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDFreeFormShading


extends PDShading

Use a free form shading when filling the shape.

Nested Class Summary


class PDFreeFormShading.MetaClass
PDFreeFormShading.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
int getShadingType()

Fields
META
public static final de.intarsys.pdf.pd.PDFreeFormShading.MetaClass META

The meta class instance

Methods
getShadingType
public int getShadingType()

Page 1054 of 1521


de.intarsys.pdf.pd.PDFreeFormShading.MetaClass

de.intarsys.pdf.pd
Class PDFreeFormShading.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDShading.MetaClass
|
+-de.intarsys.pdf.pd.PDFreeFormShading.MetaClass

public static class PDFreeFormShading.MetaClass


extends PDShading.MetaClass

The meta class implementation

Page 1055 of 1521


de.intarsys.pdf.pd.PDFunction

de.intarsys.pdf.pd
Class PDFunction
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDFunction
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


PDInterpolationFunction, PDPostScriptFunction, PDSampledFunction, PDStitchingFunction

public abstract class PDFunction


extends PDObject

Abstract superclass for PDF function objects.

Nested Class Summary


class PDFunction.MetaClass
PDFunction.MetaClass

Field Summary
public static final DK_Domain

public static final DK_FunctionType


Common names

public static final DK_Range

public static final META


The meta class instance

Method Summary
COSArray cosGetDomain()

abstract float[] evaluate(float[] values)

float getDomainMax(int dimension)

float getDomainMin(int dimension)

int getInputSize()

abstract int getOutputSize()

Page 1056 of 1521


de.intarsys.pdf.pd.PDFunction

COSArray getRange()

float getRangeMax(int dimension)

float getRangeMin(int dimension)

Fields
META
public static final de.intarsys.pdf.pd.PDFunction.MetaClass META

The meta class instance

DK_FunctionType
public static final de.intarsys.pdf.cos.COSName DK_FunctionType

Common names

DK_Domain
public static final de.intarsys.pdf.cos.COSName DK_Domain

DK_Range
public static final de.intarsys.pdf.cos.COSName DK_Range

Methods
evaluate
public abstract float[] evaluate(float[] values)

getDomainMax
public float getDomainMax(int dimension)

getDomainMin
public float getDomainMin(int dimension)

Page 1057 of 1521


de.intarsys.pdf.pd.PDFunction

(continued from last page)

getInputSize
public int getInputSize()

getOutputSize
public abstract int getOutputSize()

cosGetDomain
public COSArray cosGetDomain()

getRange
public COSArray getRange()

getRangeMax
public float getRangeMax(int dimension)

getRangeMin
public float getRangeMin(int dimension)

Page 1058 of 1521


de.intarsys.pdf.pd.PDFunction.MetaClass

de.intarsys.pdf.pd
Class PDFunction.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDFunction.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass, MetaClass, MetaClass

public static class PDFunction.MetaClass


extends PDObject.MetaClass

The meta class implementation

Method Summary
Class getRootClass()

Methods
getRootClass
public Class getRootClass()

Page 1059 of 1521


de.intarsys.pdf.pd.PDFunctionBasedShading

de.intarsys.pdf.pd
Class PDFunctionBasedShading
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDShading
|
+-de.intarsys.pdf.pd.PDFunctionBasedShading
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDFunctionBasedShading


extends PDShading

Evaluate a function when filling the shape.

Nested Class Summary


class PDFunctionBasedShading.MetaClass
PDFunctionBasedShading.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
float[] getDomain()

PDFunction getFunction()

float[] getMatrix()

int getShadingType()

Fields
META
public static final de.intarsys.pdf.pd.PDFunctionBasedShading.MetaClass META

The meta class instance

Methods

Page 1060 of 1521


de.intarsys.pdf.pd.PDFunctionBasedShading

(continued from last page)

getDomain
public float[] getDomain()

getFunction
public PDFunction getFunction()

getMatrix
public float[] getMatrix()

getShadingType
public int getShadingType()

Page 1061 of 1521


de.intarsys.pdf.pd.PDFunctionBasedShading.MetaClass

de.intarsys.pdf.pd
Class PDFunctionBasedShading.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDShading.MetaClass
|
+-de.intarsys.pdf.pd.PDFunctionBasedShading.MetaClass

public static class PDFunctionBasedShading.MetaClass


extends PDShading.MetaClass

The meta class implementation

Page 1062 of 1521


de.intarsys.pdf.pd.PDIconFit

de.intarsys.pdf.pd
Class PDIconFit
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDIconFit
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDIconFit


extends PDObject

An object describing the appearance of an icon within a button.

Nested Class Summary


class PDIconFit.MetaClass
PDIconFit.MetaClass

Field Summary
public static final CN_S_A
Anamorphic scaling

public static final CN_S_P


Proportional scaling, default

public static final CN_SW_A


always scale, the default

public static final CN_SW_B


scale only when the icon is bigger than the annotation rectangle

public static final CN_SW_N


never scale

public static final CN_SW_S


scale only when the icon is smaller than the annotation rectangle

public static final DK_A

public static final DK_FB

public static final DK_S

public static final DK_SW

public static final META


The meta class instance

Page 1063 of 1521


de.intarsys.pdf.pd.PDIconFit

Method Summary
float[] getAlignment()

COSName getScalingCircumstances()

COSName getScalingMode()

boolean isIgnoreBorderWidth()

void setAlignment(float[] align)

void setIgnoreBorderWidth(boolean ignore)

void setScalingCircumstances(COSName flag)

void setScalingMode(COSName flag)

Fields
META
public static final de.intarsys.pdf.pd.PDIconFit.MetaClass META

The meta class instance

DK_SW
public static final de.intarsys.pdf.cos.COSName DK_SW

DK_S
public static final de.intarsys.pdf.cos.COSName DK_S

DK_A
public static final de.intarsys.pdf.cos.COSName DK_A

DK_FB
public static final de.intarsys.pdf.cos.COSName DK_FB

Page 1064 of 1521


de.intarsys.pdf.pd.PDIconFit

(continued from last page)

CN_SW_A
public static final de.intarsys.pdf.cos.COSName CN_SW_A

always scale, the default

CN_SW_B
public static final de.intarsys.pdf.cos.COSName CN_SW_B

scale only when the icon is bigger than the annotation rectangle

CN_SW_S
public static final de.intarsys.pdf.cos.COSName CN_SW_S

scale only when the icon is smaller than the annotation rectangle

CN_SW_N
public static final de.intarsys.pdf.cos.COSName CN_SW_N

never scale

CN_S_A
public static final de.intarsys.pdf.cos.COSName CN_S_A

Anamorphic scaling

CN_S_P
public static final de.intarsys.pdf.cos.COSName CN_S_P

Proportional scaling, default

Methods
setAlignment
public void setAlignment(float[] align)

getAlignment
public float[] getAlignment()

setScalingCircumstances
public void setScalingCircumstances(COSName flag)

Page 1065 of 1521


de.intarsys.pdf.pd.PDIconFit

(continued from last page)

getScalingCircumstances
public COSName getScalingCircumstances()

setScalingMode
public void setScalingMode(COSName flag)

getScalingMode
public COSName getScalingMode()

setIgnoreBorderWidth
public void setIgnoreBorderWidth(boolean ignore)

isIgnoreBorderWidth
public boolean isIgnoreBorderWidth()

Page 1066 of 1521


de.intarsys.pdf.pd.PDIconFit.MetaClass

de.intarsys.pdf.pd
Class PDIconFit.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDIconFit.MetaClass

public static class PDIconFit.MetaClass


extends PDObject.MetaClass

The meta class implementation

Page 1067 of 1521


de.intarsys.pdf.pd.PDImage

de.intarsys.pdf.pd
Class PDImage
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDXObject
|
+-de.intarsys.pdf.pd.PDImage
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDImage


extends PDXObject

The representation of an image.

Nested Class Summary


class PDImage.MetaClass
PDImage.MetaClass

Field Summary
public static final C_RENDERING_VALID1
the valid rendering intents *
Value: RelativeColorimetric

public static final C_RENDERING_VALID2

Value: AbsoluteColorimetric

public static final C_RENDERING_VALID3

Value: Perceptual

public static final C_RENDERING_VALID4

Value: Saturation

public static final CN_Subtype_Image

public static final DK_Alternates

public static final DK_BitsPerComponent

public static final DK_BPC

public static final DK_ColorSpace

public static final DK_CS

Page 1068 of 1521


de.intarsys.pdf.pd.PDImage

public static final DK_D

public static final DK_Decode

public static final DK_DecodeParms

public static final DK_DP

public static final DK_H

public static final DK_Height

public static final DK_I

public static final DK_ID

public static final DK_IM

public static final DK_ImageMask

public static final DK_Intent

public static final DK_Interpolate

public static final DK_Mask

public static final DK_Metadata

public static final DK_Name

public static final DK_OC

public static final DK_OPI

public static final DK_SMask

public static final DK_SMaskInData

public static final DK_StructParent

public static final DK_W

public static final DK_Width

public static final META


The meta class instance

Method Summary

Page 1069 of 1521


de.intarsys.pdf.pd.PDImage

COSStream cosExtractJPEGStream()

COSObject cosGetColorSpace()

COSObject cosGetMask()

COSArray cosSetColorSpace(COSArray colorspace)

COSName cosSetColorSpace(COSName colorspace)

int getBitsPerComponent()
The number of bits per component.

byte[][] getColorKeyMask(int colors)

PDColorSpace getColorSpace()
The color space used by the image.

int[] getDecode()

int getHeight()
get the height of the raster image

PDImage getMaskImage()

PDXObject getSMask()

int getWidth()
get the width of the raster image

boolean hasTransparency()

void invalidateCaches()

boolean isImage()

boolean isImageMask()

boolean isInterpolate()

void setBitsPerComponent(int bits)

void setColorSpace(PDColorSpace paramCachedColorSpace)


In inline images the color space may reference the resource dictionary.

void setDecode(int[] decode)

void setHeight(int height)


set the height of the raster image

void setImageMask(boolean flag)

Page 1070 of 1521


de.intarsys.pdf.pd.PDImage

void setMask(PDXObject object)

void setSMask(PDXObject object)

void setWidth(int width)


set the width of the raster image

Fields
C_RENDERING_VALID1
public static final java.lang.String C_RENDERING_VALID1

the valid rendering intents *


Constant value: RelativeColorimetric

C_RENDERING_VALID2
public static final java.lang.String C_RENDERING_VALID2

Constant value: AbsoluteColorimetric

C_RENDERING_VALID3
public static final java.lang.String C_RENDERING_VALID3

Constant value: Perceptual

C_RENDERING_VALID4
public static final java.lang.String C_RENDERING_VALID4

Constant value: Saturation

CN_Subtype_Image
public static final de.intarsys.pdf.cos.COSName CN_Subtype_Image

DK_Alternates
public static final de.intarsys.pdf.cos.COSName DK_Alternates

DK_BitsPerComponent
public static final de.intarsys.pdf.cos.COSName DK_BitsPerComponent

Page 1071 of 1521


de.intarsys.pdf.pd.PDImage

DK_BPC
public static final de.intarsys.pdf.cos.COSName DK_BPC

DK_ColorSpace
public static final de.intarsys.pdf.cos.COSName DK_ColorSpace

DK_CS
public static final de.intarsys.pdf.cos.COSName DK_CS

DK_D
public static final de.intarsys.pdf.cos.COSName DK_D

DK_Decode
public static final de.intarsys.pdf.cos.COSName DK_Decode

DK_DecodeParms
public static final de.intarsys.pdf.cos.COSName DK_DecodeParms

DK_DP
public static final de.intarsys.pdf.cos.COSName DK_DP

DK_H
public static final de.intarsys.pdf.cos.COSName DK_H

DK_Height
public static final de.intarsys.pdf.cos.COSName DK_Height

DK_I
public static final de.intarsys.pdf.cos.COSName DK_I

Page 1072 of 1521


de.intarsys.pdf.pd.PDImage

(continued from last page)

DK_ID
public static final de.intarsys.pdf.cos.COSName DK_ID

DK_IM
public static final de.intarsys.pdf.cos.COSName DK_IM

DK_ImageMask
public static final de.intarsys.pdf.cos.COSName DK_ImageMask

DK_Intent
public static final de.intarsys.pdf.cos.COSName DK_Intent

DK_Interpolate
public static final de.intarsys.pdf.cos.COSName DK_Interpolate

DK_Mask
public static final de.intarsys.pdf.cos.COSName DK_Mask

DK_Metadata
public static final de.intarsys.pdf.cos.COSName DK_Metadata

DK_Name
public static final de.intarsys.pdf.cos.COSName DK_Name

DK_OC
public static final de.intarsys.pdf.cos.COSName DK_OC

Page 1073 of 1521


de.intarsys.pdf.pd.PDImage

(continued from last page)

DK_OPI
public static final de.intarsys.pdf.cos.COSName DK_OPI

DK_SMask
public static final de.intarsys.pdf.cos.COSName DK_SMask

DK_SMaskInData
public static final de.intarsys.pdf.cos.COSName DK_SMaskInData

DK_StructParent
public static final de.intarsys.pdf.cos.COSName DK_StructParent

DK_W
public static final de.intarsys.pdf.cos.COSName DK_W

DK_Width
public static final de.intarsys.pdf.cos.COSName DK_Width

META
public static final de.intarsys.pdf.pd.PDImage.MetaClass META

The meta class instance

Methods
cosGetColorSpace
public COSObject cosGetColorSpace()

cosGetMask
public COSObject cosGetMask()

Page 1074 of 1521


de.intarsys.pdf.pd.PDImage

(continued from last page)

cosExtractJPEGStream
public COSStream cosExtractJPEGStream()
throws java.io.IOException

getBitsPerComponent
public int getBitsPerComponent()

The number of bits per component.

This information is stored in different attributes depending if the image is inlined or explicit.

Returns:
The number of bits per component.

getColorKeyMask
public byte[][] getColorKeyMask(int colors)

getColorSpace
public PDColorSpace getColorSpace()

The color space used by the image.

Color space information is stored in different attributes in inlined and explicit images.

Returns:
The color space used by the image.

getDecode
public int[] getDecode()

getHeight
public int getHeight()

get the height of the raster image

Returns:
the height

getMaskImage
public PDImage getMaskImage()

getSMask
public PDXObject getSMask()

Page 1075 of 1521


de.intarsys.pdf.pd.PDImage

(continued from last page)

getWidth
public int getWidth()

get the width of the raster image

Returns:
the width

hasTransparency
public boolean hasTransparency()

invalidateCaches
public void invalidateCaches()

Invalidate all local caches as the base object may have changed.

isImage
public boolean isImage()

true if this is an image.

isImageMask
public boolean isImageMask()

isInterpolate
public boolean isInterpolate()

Returns:
interpolation flag (used if a image is scaled)

setBitsPerComponent
public void setBitsPerComponent(int bits)

setColorSpace
public void setColorSpace(PDColorSpace paramCachedColorSpace)

In inline images the color space may reference the resource dictionary. In this case the color space is resolved and assigned
externaly.

Parameters:

Page 1076 of 1521


de.intarsys.pdf.pd.PDImage

(continued from last page)

paramCachedColorSpace - The color space to use.

cosSetColorSpace
public COSArray cosSetColorSpace(COSArray colorspace)

cosSetColorSpace
public COSName cosSetColorSpace(COSName colorspace)

setDecode
public void setDecode(int[] decode)

setHeight
public void setHeight(int height)

set the height of the raster image

Parameters:
height - the height of the raster image

setImageMask
public void setImageMask(boolean flag)

setMask
public void setMask(PDXObject object)

setSMask
public void setSMask(PDXObject object)

setWidth
public void setWidth(int width)

set the width of the raster image

Parameters:
width - the width of the raster image

Page 1077 of 1521


de.intarsys.pdf.pd.PDImage.MetaClass

de.intarsys.pdf.pd
Class PDImage.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDXObject.MetaClass
|
+-de.intarsys.pdf.pd.PDImage.MetaClass

public static class PDImage.MetaClass


extends PDXObject.MetaClass

The meta class implementation

Page 1078 of 1521


de.intarsys.pdf.pd.PDInterpolationFunction

de.intarsys.pdf.pd
Class PDInterpolationFunction
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDFunction
|
+-de.intarsys.pdf.pd.PDInterpolationFunction
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDInterpolationFunction


extends PDFunction

Function implementation supporting interpolation.

Nested Class Summary


class PDInterpolationFunction.MetaClass
PDInterpolationFunction.MetaClass

Field Summary
public static final DK_C0

public static final DK_C1

public static final DK_N

public static final META


The meta class instance

Method Summary
float[] evaluate(float[] values)

float[] getC0()

float[] getC1()

float getN()

int getOutputSize()

Fields

Page 1079 of 1521


de.intarsys.pdf.pd.PDInterpolationFunction

(continued from last page)

DK_C0
public static final de.intarsys.pdf.cos.COSName DK_C0

DK_C1
public static final de.intarsys.pdf.cos.COSName DK_C1

DK_N
public static final de.intarsys.pdf.cos.COSName DK_N

META
public static final de.intarsys.pdf.pd.PDInterpolationFunction.MetaClass META

The meta class instance

Methods
evaluate
public float[] evaluate(float[] values)

getC0
public float[] getC0()

getC1
public float[] getC1()

getN
public float getN()

getOutputSize
public int getOutputSize()

Page 1080 of 1521


de.intarsys.pdf.pd.PDInterpolationFunction.MetaClass

de.intarsys.pdf.pd
Class PDInterpolationFunction.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDFunction.MetaClass
|
+-de.intarsys.pdf.pd.PDInterpolationFunction.MetaClass

public static class PDInterpolationFunction.MetaClass


extends PDFunction.MetaClass

The meta class implementation

Page 1081 of 1521


de.intarsys.pdf.pd.PDLatticeFormShading

de.intarsys.pdf.pd
Class PDLatticeFormShading
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDShading
|
+-de.intarsys.pdf.pd.PDLatticeFormShading
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDLatticeFormShading


extends PDShading

Use the lattice shading when filling the shape.

Nested Class Summary


class PDLatticeFormShading.MetaClass
PDLatticeFormShading.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
int getShadingType()

Fields
META
public static final de.intarsys.pdf.pd.PDLatticeFormShading.MetaClass META

The meta class instance

Methods
getShadingType
public int getShadingType()

Page 1082 of 1521


de.intarsys.pdf.pd.PDLatticeFormShading.MetaClass

de.intarsys.pdf.pd
Class PDLatticeFormShading.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDShading.MetaClass
|
+-de.intarsys.pdf.pd.PDLatticeFormShading.MetaClass

public static class PDLatticeFormShading.MetaClass


extends PDShading.MetaClass

The meta class implementation

Page 1083 of 1521


de.intarsys.pdf.pd.PDLinkAnnotation

de.intarsys.pdf.pd
Class PDLinkAnnotation
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAnnotation
|
+-de.intarsys.pdf.pd.PDLinkAnnotation
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IAdditionalActionSupport

public class PDLinkAnnotation


extends PDAnnotation

An annotation implementing a hyperlink behavior within a document.

Nested Class Summary


class PDLinkAnnotation.MetaClass
PDLinkAnnotation.MetaClass

Field Summary
public static final CN_H_I

public static final CN_H_N

public static final CN_H_O

public static final CN_H_P

public static final CN_Subtype_Link

public static final DK_Dest

public static final DK_H

public static final DK_PA

public static final DK_QuadPoints

public static final META


The meta class instance

Method Summary

Page 1084 of 1521


de.intarsys.pdf.pd.PDLinkAnnotation

PDDestination getDestination()

COSName getHighlightingMode()

String getSubtypeLabel()

void setDestination(PDDestination destination)

void setHighlightingMode(COSName newHighlightingMode)

Fields
META
public static final de.intarsys.pdf.pd.PDLinkAnnotation.MetaClass META

The meta class instance

CN_Subtype_Link
public static final de.intarsys.pdf.cos.COSName CN_Subtype_Link

DK_Dest
public static final de.intarsys.pdf.cos.COSName DK_Dest

DK_H
public static final de.intarsys.pdf.cos.COSName DK_H

DK_PA
public static final de.intarsys.pdf.cos.COSName DK_PA

DK_QuadPoints
public static final de.intarsys.pdf.cos.COSName DK_QuadPoints

CN_H_I
public static final de.intarsys.pdf.cos.COSName CN_H_I

Page 1085 of 1521


de.intarsys.pdf.pd.PDLinkAnnotation

CN_H_N
public static final de.intarsys.pdf.cos.COSName CN_H_N

CN_H_O
public static final de.intarsys.pdf.cos.COSName CN_H_O

CN_H_P
public static final de.intarsys.pdf.cos.COSName CN_H_P

Methods
getSubtypeLabel
public String getSubtypeLabel()

A java.lang.String representation of this.

getDestination
public PDDestination getDestination()

setDestination
public void setDestination(PDDestination destination)

getHighlightingMode
public COSName getHighlightingMode()

setHighlightingMode
public void setHighlightingMode(COSName newHighlightingMode)

Page 1086 of 1521


de.intarsys.pdf.pd.PDLinkAnnotation.MetaClass

de.intarsys.pdf.pd
Class PDLinkAnnotation.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAnnotation.MetaClass
|
+-de.intarsys.pdf.pd.PDLinkAnnotation.MetaClass

public static class PDLinkAnnotation.MetaClass


extends PDAnnotation.MetaClass

The meta class implementation

Page 1087 of 1521


de.intarsys.pdf.pd.PDMarkupAnnotation

de.intarsys.pdf.pd
Class PDMarkupAnnotation
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAnnotation
|
+-de.intarsys.pdf.pd.PDMarkupAnnotation
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IAdditionalActionSupport

Direct Known Subclasses:


PDFileAttachmentAnnotation, PDStampAnnotation, PDTextAnnotation, PDTextMarkupAnnotation

public class PDMarkupAnnotation


extends PDAnnotation

A generic markup snnotation implementation.

Nested Class Summary


class PDMarkupAnnotation.MetaClass
PDMarkupAnnotation.MetaClass

Field Summary
public static final CN_Subtype_Circle

public static final CN_Subtype_Ink

public static final CN_Subtype_Line

public static final CN_Subtype_Polygon

public static final CN_Subtype_PolyLine

public static final CN_Subtype_Square

public static final DK_CA

public static final DK_CreationDate

public static final DK_IC

public static final DK_InkList

Page 1088 of 1521


de.intarsys.pdf.pd.PDMarkupAnnotation

public static final DK_IRT

public static final DK_L

public static final DK_Popup

public static final DK_RC

public static final DK_Subj

public static final DK_T

public static final DK_Vertices

public static final META


The meta class instance

Method Summary
COSObject cosSetField(COSName name, COSObject cosObj)

CDSDate getCreationDate()

float[] getInnerColor()

PDAnnotation getInReplyTo()

double getOpacity()

PDAnnotation getPopup()

String getRichContent()

String getSubject()

String getSubtypeLabel()

String getText()

boolean isMarkupAnnotation()

void setInnerColor(float[] color)

void setOpacity(float value)

void setPopup(PDPopupAnnotation popup)

void setSubject(String value)

Page 1089 of 1521


de.intarsys.pdf.pd.PDMarkupAnnotation

void setText(String text)

Fields
META
public static final de.intarsys.pdf.pd.PDMarkupAnnotation.MetaClass META

The meta class instance

DK_CreationDate
public static final de.intarsys.pdf.cos.COSName DK_CreationDate

DK_Subj
public static final de.intarsys.pdf.cos.COSName DK_Subj

DK_T
public static final de.intarsys.pdf.cos.COSName DK_T

DK_Popup
public static final de.intarsys.pdf.cos.COSName DK_Popup

DK_CA
public static final de.intarsys.pdf.cos.COSName DK_CA

DK_L
public static final de.intarsys.pdf.cos.COSName DK_L

DK_RC
public static final de.intarsys.pdf.cos.COSName DK_RC

Page 1090 of 1521


de.intarsys.pdf.pd.PDMarkupAnnotation

(continued from last page)

DK_Vertices
public static final de.intarsys.pdf.cos.COSName DK_Vertices

CN_Subtype_Ink
public static final de.intarsys.pdf.cos.COSName CN_Subtype_Ink

CN_Subtype_Square
public static final de.intarsys.pdf.cos.COSName CN_Subtype_Square

CN_Subtype_Circle
public static final de.intarsys.pdf.cos.COSName CN_Subtype_Circle

CN_Subtype_Line
public static final de.intarsys.pdf.cos.COSName CN_Subtype_Line

CN_Subtype_Polygon
public static final de.intarsys.pdf.cos.COSName CN_Subtype_Polygon

CN_Subtype_PolyLine
public static final de.intarsys.pdf.cos.COSName CN_Subtype_PolyLine

DK_InkList
public static final de.intarsys.pdf.cos.COSName DK_InkList

DK_IC
public static final de.intarsys.pdf.cos.COSName DK_IC

DK_IRT
public static final de.intarsys.pdf.cos.COSName DK_IRT

Page 1091 of 1521


de.intarsys.pdf.pd.PDMarkupAnnotation

(continued from last page)

Methods
getText
public String getText()

setText
public void setText(String text)

getSubject
public String getSubject()

getInReplyTo
public PDAnnotation getInReplyTo()

setSubject
public void setSubject(String value)

getCreationDate
public CDSDate getCreationDate()

getPopup
public PDAnnotation getPopup()

setPopup
public void setPopup(PDPopupAnnotation popup)

getOpacity
public double getOpacity()

Page 1092 of 1521


de.intarsys.pdf.pd.PDMarkupAnnotation

setOpacity
public void setOpacity(float value)

getRichContent
public String getRichContent()

getInnerColor
public float[] getInnerColor()

setInnerColor
public void setInnerColor(float[] color)

getSubtypeLabel
public String getSubtypeLabel()

A java.lang.String representation of this.

isMarkupAnnotation
public boolean isMarkupAnnotation()

true if this is a PDMarkupAnnotation.

cosSetField
public COSObject cosSetField(COSName name,
COSObject cosObj)

Set a field value in this. The previously associated object is returned.

This method requires the base object to be a COSDictionary.

Page 1093 of 1521


de.intarsys.pdf.pd.PDMarkupAnnotation.MetaClass

de.intarsys.pdf.pd
Class PDMarkupAnnotation.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAnnotation.MetaClass
|
+-de.intarsys.pdf.pd.PDMarkupAnnotation.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass, MetaClass, MetaClass

public static class PDMarkupAnnotation.MetaClass


extends PDAnnotation.MetaClass

The meta class implementation

Page 1094 of 1521


de.intarsys.pdf.pd.PDNamedDestination

de.intarsys.pdf.pd
Class PDNamedDestination
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDDestination
|
+-de.intarsys.pdf.pd.PDNamedDestination
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDNamedDestination


extends PDDestination

A destination within a document defined using a named destination. The destination is looked up via the /Dests entry in the catalog.

Nested Class Summary


class PDNamedDestination.MetaClass
PDNamedDestination.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
String getName()

PDExplicitDestination getResolvedDestination(PDDocument doc)

Fields
META
public static final de.intarsys.pdf.pd.PDNamedDestination.MetaClass META

The meta class instance

Methods
getName
public String getName()

Page 1095 of 1521


de.intarsys.pdf.pd.PDNamedDestination

getResolvedDestination
public PDExplicitDestination getResolvedDestination(PDDocument doc)

Page 1096 of 1521


de.intarsys.pdf.pd.PDNamedDestination.MetaClass

de.intarsys.pdf.pd
Class PDNamedDestination.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDDestination.MetaClass
|
+-de.intarsys.pdf.pd.PDNamedDestination.MetaClass

public static class PDNamedDestination.MetaClass


extends PDDestination.MetaClass

The meta class implementation

Page 1097 of 1521


de.intarsys.pdf.pd.PDObject

de.intarsys.pdf.pd
Class PDObject
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


PDAcroFormNode, PDAction, PDAdditionalActions, PDAnnotation, PDAppearance,
PDAppearanceCharacteristics, PDApplicationData, PDBorderStyle, PDBuildData, PDBuildProperties,
PDColorSpace, PDDestination, PDEmbeddedFile, PDExtGState, PDFileSpecification, PDFunction, PDIconFit,
PDOutlineNode, PDOutputIntent, PDPageNode, PDPattern, PDResources, PDShading, PDSignature,
PDSignatureReference, PDTransformMethod, PDTransformParams, PDXObject, PDFont, PDFontDescriptor

public abstract class PDObject


extends COSBasedObject

This is the abstract superclass for all complex PD level objects.

PD Level objects provide the PDF semantics on top of the basic datatypes of COS Level objects. PDObject provides generic
methods used along all subtypes.

PDObjects should be created only using the factory methods of their meta classes to ensure the semantics implemented in the PD
layer, as for example PD object identity, subclass selection or proper initialization.
Example:
PDPage page = (PDPage)PDPage.META.createNew();

Nested Class Summary


class PDObject.MetaClass
PDObject.MetaClass

Field Summary
public static final DK_Subtype

public static final DK_Type

public static final META


The meta class instance

Method Summary
COSObject cosGetFieldDescendant(COSName name)
Convenience method to access fields in COSDictionary based PDObject instances.

COSObject cosGetFieldInheritable(COSName name)


Convenience method to access fields in COSDictionary based PDObject instances.

Page 1098 of 1521


de.intarsys.pdf.pd.PDObject

COSObject cosGetFieldInherited(COSName name)


Convenience method to access inherited fields in COSDictionary based PDObject
instances.

COSName cosGetSubtype()
The /Subtype field of this PDObject or null.

COSName cosGetType()
The /Type field of this PDObject or null.

COSObject cosRemoveFieldInheritable(COSName name)


Convenience method to access fields in COSDictionary based PDObject instances.

COSObject cosSetFieldInheritable(COSName name, COSObject cosObj)


Convenience method to access fields in COSDictionary based PDObject instances.

COSName cosSetSubtype(COSName newType)


Set the /Subtype field of this PDObject.

COSName cosSetType(COSName newType)


Set the /Type field of this PDObject.

PDDocument getDoc()
Try the best in finding the PDDocument for this PDObject.

java.util.List getGenericChildren()
Get a collection of PDObject children if the receiver is a node in a hierarchical structure
(like page nodes or form fields).

PDObject getGenericParent()
The parent of the receiver if it is a node in a hierarchical structure (like page nodes or form
fields).

void setGenericParent(PDObject parent)


Set the parent of the receiver if it is a node in a hierarchical structure (like page nodes or
form fields).

String toString()

Fields
META
public static final de.intarsys.pdf.pd.PDObject.MetaClass META

The meta class instance

DK_Type
public static final de.intarsys.pdf.cos.COSName DK_Type

DK_Subtype
public static final de.intarsys.pdf.cos.COSName DK_Subtype

Page 1099 of 1521


de.intarsys.pdf.pd.PDObject

(continued from last page)

Methods
cosGetFieldDescendant
public COSObject cosGetFieldDescendant(COSName name)

Convenience method to access fields in COSDictionary based PDObject instances. This method supports "inheritance"
on hierarchical structured PDObject instances. It returns the field either from the receiver or one of the known
descendants.

Parameters:
name - the field to read

Returns:
the content of the named field in the PD object or one of its descendants - COSNull is the field is not found

cosGetFieldInheritable
public COSObject cosGetFieldInheritable(COSName name)

Convenience method to access fields in COSDictionary based PDObject instances.

This method supports "inheritance" on hierarchical structured PDObject instances. It returns the field either from the
receiver or one of its parents.

Parameters:
name - the field to read

Returns:
the content of the named field in the PD object or one of its parents - COSNull if the field is not found

cosGetFieldInherited
public COSObject cosGetFieldInherited(COSName name)

Convenience method to access inherited fields in COSDictionary based PDObject instances.

This method supports "inheritance" on hierarchical structured PDObject instances. It returns the inherited field value from
one of the receiver's parents or COSNull.

Parameters:
name - the field to read

Returns:
the content of the named field in one of the receivers parents - COSNull if the field is not found

cosGetSubtype
public final COSName cosGetSubtype()

The /Subtype field of this PDObject or null. This method is not supported on PDObject instances that are not based on a
COSDictionary

Returns:
The /Subtype field of this.

Page 1100 of 1521


de.intarsys.pdf.pd.PDObject

(continued from last page)

cosGetType
public final COSName cosGetType()

The /Type field of this PDObject or null. This method is not supported on PDObject instances that are not based on a
COSDictionary

Returns:
The /Type field of this.

cosRemoveFieldInheritable
public COSObject cosRemoveFieldInheritable(COSName name)

Convenience method to access fields in COSDictionary based PDObject instances. This method supports "inheritance"
on hierarchical structured PDObject instances. It removes a field in the receiver and all its descendants.

Parameters:
name - the field to remove from the receiver

Returns:
The object previously associated with name in this

cosSetFieldInheritable
public COSObject cosSetFieldInheritable(COSName name,
COSObject cosObj)

Convenience method to access fields in COSDictionary based PDObject instances. This method supports "inheritance"
on hierarchical structured PDObject instances. It sets a field value in the receiver when the field is inheritable. This
method removes the field from every child to make sure it uses the inherited value.

Parameters:
name - the field to set
cosObj - the object to set in the field

Returns:
The object previously associated with name in this

cosSetSubtype
public final COSName cosSetSubtype(COSName newType)

Set the /Subtype field of this PDObject. This method is not supported on PDObject instances that are not based on a
COSDictionary

Returns:
The /Subtype previously associated with this.

cosSetType
public final COSName cosSetType(COSName newType)

Set the /Type field of this PDObject. This method is not supported on PDObject instances that are not based on a
COSDictionary

Returns:
The /Type previously associated with this.

Page 1101 of 1521


de.intarsys.pdf.pd.PDObject

(continued from last page)

getDoc
public PDDocument getDoc()

Try the best in finding the PDDocument for this PDObject.

Returns:
Try the best in finding the PDDocument for this PDObject.

getGenericChildren
public java.util.List getGenericChildren()

Get a collection of PDObject children if the receiver is a node in a hierarchical structure (like page nodes or form fields).

This enables the generic implementation of inherited field values and so on.

A concrete PDObject implementation supporting inheritance should implement this method.

Returns:
A collection of PDObject children if the receiver is a node in a hierarchical structure .

getGenericParent
public PDObject getGenericParent()

The parent of the receiver if it is a node in a hierarchical structure (like page nodes or form fields).

A concrete PDObject implementation supporting inheritance should implement this method.

Returns:
The parent of the receiver if it is a node in a hierarchical structure (like page nodes or form fields).

setGenericParent
public void setGenericParent(PDObject parent)

Set the parent of the receiver if it is a node in a hierarchical structure (like page nodes or form fields).

A concrete PDObject implementation supporting inheritance should implement this method.

Parameters:
parent - The new parent object.

toString
public String toString()

Page 1102 of 1521


de.intarsys.pdf.pd.PDObject.MetaClass

de.intarsys.pdf.pd
Class PDObject.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass, MetaClass, MetaClass, MetaClass, MetaClass, MetaClass, MetaClass, MetaClass,
MetaClass, MetaClass, MetaClass, MetaClass, MetaClass, MetaClass, MetaClass, MetaClass, MetaClass,
MetaClass, MetaClass, MetaClass, MetaClass, MetaClass, MetaClass, MetaClass, MetaClass, MetaClass,
MetaClass, MetaClass, MetaClass

public static class PDObject.MetaClass


extends COSBasedObject.MetaClass

The meta class implementation

Page 1103 of 1521


de.intarsys.pdf.pd.PDOutline

de.intarsys.pdf.pd
Class PDOutline
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDOutlineNode
|
+-de.intarsys.pdf.pd.PDOutline
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDOutline


extends PDOutlineNode

The root of the document outline tree ("bookmarks").

Nested Class Summary


class PDOutline.MetaClass
PDOutline.MetaClass

Field Summary
public static final CN_Type_Outlines

public static final META


The meta class instance

Method Summary
boolean isOutline()

Fields
META
public static final de.intarsys.pdf.pd.PDOutline.MetaClass META

The meta class instance

CN_Type_Outlines
public static final de.intarsys.pdf.cos.COSName CN_Type_Outlines

Methods

Page 1104 of 1521


de.intarsys.pdf.pd.PDOutline

(continued from last page)

isOutline
public boolean isOutline()

true if this is the outline (root element) itself.

Page 1105 of 1521


de.intarsys.pdf.pd.PDOutline.MetaClass

de.intarsys.pdf.pd
Class PDOutline.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDOutlineNode.MetaClass
|
+-de.intarsys.pdf.pd.PDOutline.MetaClass

public static class PDOutline.MetaClass


extends PDOutlineNode.MetaClass

The meta class implementation

Page 1106 of 1521


de.intarsys.pdf.pd.PDOutlineItem

de.intarsys.pdf.pd
Class PDOutlineItem
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDOutlineNode
|
+-de.intarsys.pdf.pd.PDOutlineItem
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDOutlineItem


extends PDOutlineNode

A document outline item. This is used to represent all tree elements in a PDF outline tree.

Nested Class Summary


class PDOutlineItem.MetaClass
PDOutlineItem.MetaClass

Field Summary
public static final DK_A

public static final DK_C

public static final DK_Dest

public static final DK_F

public static final DK_Next

public static final DK_Parent

public static final DK_Prev

public static final DK_SE

public static final DK_Title

public static final META


The meta class instance

Method Summary

Page 1107 of 1521


de.intarsys.pdf.pd.PDOutlineItem

int basicGetFlags()
The flags as integer value.

void basicSetFlags(int value)


Assign the flags from an integer value.

COSArray cosGetColor()
The color values to be used for this.

PDAction getAction()
The PDAction executed when the outline item is activated.

PDDestination getDestination()
The PDDestination to be displayed when the outline item is activated.

OutlineItemFlags getFlags()
The OutlineItemFlags.

PDOutlineItem getNext()
The next PDOutlineItem within the items linked list.

PDOutlineNode getParent()
The parent item.

PDOutlineItem getPrev()
The previous PDOutlineItem within the items linked list.

String getTitle()
The title to be displayed for this.

void setAction(PDAction action)


Assign the PDAction to be executed when the outline is activated.

void setDestination(PDDestination destination)


Assign the PDDestination to be displayed when the outline is activated.

void setTitle(String title)


Assign the outline title

Fields
DK_A
public static final de.intarsys.pdf.cos.COSName DK_A

DK_C
public static final de.intarsys.pdf.cos.COSName DK_C

DK_Dest
public static final de.intarsys.pdf.cos.COSName DK_Dest

Page 1108 of 1521


de.intarsys.pdf.pd.PDOutlineItem

(continued from last page)

DK_F
public static final de.intarsys.pdf.cos.COSName DK_F

DK_Next
public static final de.intarsys.pdf.cos.COSName DK_Next

DK_Parent
public static final de.intarsys.pdf.cos.COSName DK_Parent

DK_Prev
public static final de.intarsys.pdf.cos.COSName DK_Prev

DK_SE
public static final de.intarsys.pdf.cos.COSName DK_SE

DK_Title
public static final de.intarsys.pdf.cos.COSName DK_Title

META
public static final de.intarsys.pdf.pd.PDOutlineItem.MetaClass META

The meta class instance

Methods
basicGetFlags
public int basicGetFlags()

The flags as integer value.

Returns:
The flags as integer value.

basicSetFlags
public void basicSetFlags(int value)

Page 1109 of 1521


de.intarsys.pdf.pd.PDOutlineItem

(continued from last page)

Assign the flags from an integer value.

Parameters:
value - The new flags

cosGetColor
public COSArray cosGetColor()

The color values to be used for this.

Returns:
The color values to be used for this.

getAction
public PDAction getAction()

The PDAction executed when the outline item is activated.

Returns:
The PDAction executed when the outline item is activated.

getDestination
public PDDestination getDestination()

The PDDestination to be displayed when the outline item is activated.

Returns:
The PDDestination to be displayed when the outline item is activated.

getFlags
public OutlineItemFlags getFlags()

The OutlineItemFlags.

Returns:
The OutlineItemFlags.

getNext
public PDOutlineItem getNext()

The next PDOutlineItem within the items linked list.

Returns:
The next PDOutlineItem within the items linked list.

getParent
public PDOutlineNode getParent()

The parent item.

Returns:
The parent item.

Page 1110 of 1521


de.intarsys.pdf.pd.PDOutlineItem

getPrev
public PDOutlineItem getPrev()

The previous PDOutlineItem within the items linked list.

Returns:
The previous PDOutlineItem within the items linked list.

getTitle
public String getTitle()

The title to be displayed for this.

Returns:
The title to be displayed for this.

setAction
public void setAction(PDAction action)

Assign the PDAction to be executed when the outline is activated.

Parameters:
action - The PDAction to be executed.

setDestination
public void setDestination(PDDestination destination)

Assign the PDDestination to be displayed when the outline is activated.

Parameters:
destination - The PDDestination to be displayed.

setTitle
public void setTitle(String title)

Assign the outline title

Parameters:
title - The new outline title.

Page 1111 of 1521


de.intarsys.pdf.pd.PDOutlineItem.MetaClass

de.intarsys.pdf.pd
Class PDOutlineItem.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDOutlineNode.MetaClass
|
+-de.intarsys.pdf.pd.PDOutlineItem.MetaClass

public static class PDOutlineItem.MetaClass


extends PDOutlineNode.MetaClass

The meta class implementation

Page 1112 of 1521


de.intarsys.pdf.pd.PDOutlineNode

de.intarsys.pdf.pd
Class PDOutlineNode
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDOutlineNode
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


PDOutline, PDOutlineItem

public abstract class PDOutlineNode


extends PDObject

Factoring out the commonalities between the PDOutline and PDOutlineItem.

Nested Class Summary


class PDOutlineNode.MetaClass
PDOutlineNode.MetaClass

Field Summary
public static final DK_Count

public static final DK_First

public static final DK_Last

public static final META


The meta class instance

Method Summary
void addItem(PDOutlineItem newItem)
Add a new PDOutlineItem.

java.util.List getChildren()
The list of all child nodes for this.

int getCount()
The number of child elements.

PDOutlineItem getFirst()
The first child element in the linked list of children.

PDOutlineItem getLast()
The last child element in the linked list of children.

Page 1113 of 1521


de.intarsys.pdf.pd.PDOutlineNode

boolean isOutline()
true if this is the outline (root element) itself.

boolean removeItem(PDOutlineItem pItem)


Remove a PDOutlineItem from this.

Fields
META
public static final de.intarsys.pdf.pd.PDOutlineNode.MetaClass META

The meta class instance

DK_First
public static final de.intarsys.pdf.cos.COSName DK_First

DK_Last
public static final de.intarsys.pdf.cos.COSName DK_Last

DK_Count
public static final de.intarsys.pdf.cos.COSName DK_Count

Methods
getChildren
public java.util.List getChildren()

The list of all child nodes for this.

Returns:
The list of all child nodes for this.

getCount
public int getCount()

The number of child elements.

Returns:
The number of child elements.

getFirst
public PDOutlineItem getFirst()

Page 1114 of 1521


de.intarsys.pdf.pd.PDOutlineNode

(continued from last page)

The first child element in the linked list of children.

Returns:
The first child element in the linked list of children.

getLast
public PDOutlineItem getLast()

The last child element in the linked list of children.

Returns:
The last child element in the linked list of children.

isOutline
public boolean isOutline()

true if this is the outline (root element) itself.

Returns:
true if this is the outline (root element) itself.

addItem
public void addItem(PDOutlineItem newItem)

Add a new PDOutlineItem.

Parameters:
newItem - The new item to be inserted at the end.

removeItem
public boolean removeItem(PDOutlineItem pItem)

Remove a PDOutlineItem from this.

Parameters:
pItem - The item to be removed.

Returns:
true if the item was removed.

Page 1115 of 1521


de.intarsys.pdf.pd.PDOutlineNode.MetaClass

de.intarsys.pdf.pd
Class PDOutlineNode.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDOutlineNode.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass

public static class PDOutlineNode.MetaClass


extends PDObject.MetaClass

The meta class implementation

Method Summary
Class getRootClass()

Methods
getRootClass
public Class getRootClass()

Page 1116 of 1521


de.intarsys.pdf.pd.PDOutputIntent

de.intarsys.pdf.pd
Class PDOutputIntent
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDOutputIntent
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDOutputIntent


extends PDObject

The output intent for the associated object.

Nested Class Summary


class PDOutputIntent.MetaClass
PDOutputIntent.MetaClass

Field Summary
public static final DK_DestOutputProfile

public static final DK_Info

public static final DK_OutputCondition

public static final DK_OutputConditionIdentifier

public static final DK_OutputIntent


who am i

public static final DK_RegistryName

public static final DK_S

public static final META


The meta class instance

Method Summary
COSStream cosGetOutputProfile()

boolean importCMYK_ICCProfile()

boolean importICCProfile(java.io.InputStream is, int numComponents)

Page 1117 of 1521


de.intarsys.pdf.pd.PDOutputIntent

boolean importRGB_ICCProfile()

Fields
META
public static final de.intarsys.pdf.pd.PDOutputIntent.MetaClass META

The meta class instance

DK_OutputIntent
public static final de.intarsys.pdf.cos.COSName DK_OutputIntent

who am i

DK_S
public static final de.intarsys.pdf.cos.COSName DK_S

DK_OutputCondition
public static final de.intarsys.pdf.cos.COSName DK_OutputCondition

DK_OutputConditionIdentifier
public static final de.intarsys.pdf.cos.COSName DK_OutputConditionIdentifier

DK_RegistryName
public static final de.intarsys.pdf.cos.COSName DK_RegistryName

DK_Info
public static final de.intarsys.pdf.cos.COSName DK_Info

DK_DestOutputProfile
public static final de.intarsys.pdf.cos.COSName DK_DestOutputProfile

Methods

Page 1118 of 1521


de.intarsys.pdf.pd.PDOutputIntent

(continued from last page)

cosGetOutputProfile
public COSStream cosGetOutputProfile()

importRGB_ICCProfile
public boolean importRGB_ICCProfile()

importCMYK_ICCProfile
public boolean importCMYK_ICCProfile()

importICCProfile
public boolean importICCProfile(java.io.InputStream is,
int numComponents)

Page 1119 of 1521


de.intarsys.pdf.pd.PDOutputIntent.MetaClass

de.intarsys.pdf.pd
Class PDOutputIntent.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDOutputIntent.MetaClass

public static class PDOutputIntent.MetaClass


extends PDObject.MetaClass

The meta class implementation

Page 1120 of 1521


de.intarsys.pdf.pd.PDPage

de.intarsys.pdf.pd
Class PDPage
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDPageNode
|
+-de.intarsys.pdf.pd.PDPage
All Implemented Interfaces:
IContentStreamProvider, IAdditionalActionSupport, ICOSObjectListener, IAttributeSupport

public class PDPage


extends PDPageNode
implements IAttributeSupport, ICOSObjectListener, IAdditionalActionSupport, IContentStreamProvider

A single concrete page in a PDF document.

Nested Class Summary


class PDPage.MetaClass
PDPage.MetaClass

Field Summary
public static COPY_SUFFIX

public static final DK_Annots

public static final DK_Contents

public static final DK_CropBox

public static final DK_MediaBox

public static final DK_Metadata

public static final DK_PieceInfo

public static final DK_Resources

public static final META


The meta class instance

public static final PAGE_ACTION_TRIGGERS


supported additional action triggers

Method Summary

Page 1121 of 1521


de.intarsys.pdf.pd.PDPage

void addAnnotation(PDAnnotation annot)


Add a PDAnnotation to the collection of annotations on the receiver page.

void addContentStream(CSContent contentStream)


Add a CSContent stream to this.

void cosAddContents(COSStream content)


Append COSStream to the pages content

COSObject cosGetContents()
The /Contents entry

COSDictionary cosGetPieceInfo()
The piece info dictionary of the document.

void cosPrependContents(COSStream content)


Prepend contents to the pages content.

COSObject cosSetContents(COSObject content)


Set the /Contents for the page

COSDictionary cosSetPieceInfo(COSDictionary dict)


Set the piece info dictionary of the document.

void dispose()

PDAdditionalActions getAdditionalActions()

java.util.List getAnnotations()
Get a list of all PDAnnotation objects that are referenced in this page.

PDApplicationData getApplicationData(String name)


The PDApplicationData associated with name on the page.

CSContent getContentStream()
The CSContent defining the visual content of the page.

int getCount()

PDAnnotation getFirstAnnotation()

PDPageNode getFirstNode()

PDPage getFirstPage()

PDAnnotation getLastAnnotation()

PDPageNode getLastNode()

PDPage getLastPage()

PDAnnotation getNextAnnotation(PDAnnotation annot)


The PDAnnotation following the given PDAnnotation annot or null, if annot was the
last one in the list or does't exist on this page.

Page 1122 of 1521


de.intarsys.pdf.pd.PDPage

PDPage getNextPage()
The next page after the receiver.

PDPage getPageAt(int index)

PDAnnotation getPreviousAnnotation(PDAnnotation annot)


Returns the PDAnnotation preceding the given PDAnnotation annot or null, if annot was
the first one in the list or does't exist on this page.

PDPage getPreviousPage()
Get the previous page before the receiver.

PDResources getResources()
return a PDCResourceDict. this is a wrapper around a COSDictionary that handles
Resource specific details.

java.util.Set getSupportedTriggerEvents()

void invalidateCaches()

boolean isPage()

void removeAnnotation(PDAnnotation annot)


Remove a PDAnnotation from the page.

void removeApplicationData(String name)


Remove the PDApplicationData associated with name from this page.

void setAdditionalActions(PDAdditionalActions actions)

void setApplicationData(String name, PDApplicationData data)


Associate a PDApplicationData instance with this using name.

void setContentStream(CSContent contentStream)


Assign a new visual appearance to the page.

void setResources(PDResources resources)

Fields
META
public static final de.intarsys.pdf.pd.PDPage.MetaClass META

The meta class instance

COPY_SUFFIX
public static java.lang.String COPY_SUFFIX

Page 1123 of 1521


de.intarsys.pdf.pd.PDPage

(continued from last page)

DK_Annots
public static final de.intarsys.pdf.cos.COSName DK_Annots

DK_PieceInfo
public static final de.intarsys.pdf.cos.COSName DK_PieceInfo

DK_Resources
public static final de.intarsys.pdf.cos.COSName DK_Resources

DK_MediaBox
public static final de.intarsys.pdf.cos.COSName DK_MediaBox

DK_CropBox
public static final de.intarsys.pdf.cos.COSName DK_CropBox

DK_Contents
public static final de.intarsys.pdf.cos.COSName DK_Contents

DK_Metadata
public static final de.intarsys.pdf.cos.COSName DK_Metadata

PAGE_ACTION_TRIGGERS
public static final java.util.Set PAGE_ACTION_TRIGGERS

supported additional action triggers

Methods
addAnnotation
public void addAnnotation(PDAnnotation annot)

Add a PDAnnotation to the collection of annotations on the receiver page.

Parameters:
annot - The PDAnnotation to add to the page.

Page 1124 of 1521


de.intarsys.pdf.pd.PDPage

addContentStream
public void addContentStream(CSContent contentStream)

Add a CSContent stream to this.

Parameters:
contentStream - The new CSContent

cosAddContents
public void cosAddContents(COSStream content)

Append COSStream to the pages content

Parameters:
content - The COSStream to add to the page

cosPrependContents
public void cosPrependContents(COSStream content)

Prepend contents to the pages content.

Parameters:
content - The COSStream to add to the page

cosGetContents
public COSObject cosGetContents()

The /Contents entry

Returns:
The /Contents entry

cosGetPieceInfo
public COSDictionary cosGetPieceInfo()

The piece info dictionary of the document.

Returns:
The piece info dictionary of the document.

cosSetContents
public COSObject cosSetContents(COSObject content)

Set the /Contents for the page

Parameters:
content - the stream defining the page content

Returns:
The /Contents entry previously associated with this.

Page 1125 of 1521


de.intarsys.pdf.pd.PDPage

cosSetPieceInfo
public COSDictionary cosSetPieceInfo(COSDictionary dict)

Set the piece info dictionary of the document.

Parameters:
dict - The piece info dictionary of the document.

Returns:
The /PieceInfo entry previously associated with this.

dispose
public void dispose()

getAdditionalActions
public PDAdditionalActions getAdditionalActions()

getAnnotations
public java.util.List getAnnotations()

Get a list of all PDAnnotation objects that are referenced in this page.

Returns:
A list of all PDAnnotation objects that are referenced in this page or null if none exist.

getApplicationData
public PDApplicationData getApplicationData(String name)

The PDApplicationData associated with name on the page.

Parameters:
name - The name of the PDApplicationData to lookup.

Returns:
The PDApplicationData associated with name on the page.

getContentStream
public CSContent getContentStream()

The CSContent defining the visual content of the page.

Returns:
The CSContent defining the visual content of the page.

getCount
public int getCount()

Page 1126 of 1521


de.intarsys.pdf.pd.PDPage

(continued from last page)

The total number of pages represented by this node.

getFirstAnnotation
public PDAnnotation getFirstAnnotation()

The first PDAnnotation linked on this page.

Returns:
The first PDAnnotation on the page or null

getFirstNode
public PDPageNode getFirstNode()

Get the first node within the receiver or the receiver if it is not a collection (page tree).

This may return null if the receiver is an empty collection.

getFirstPage
public PDPage getFirstPage()

Get the first page (leaf node) within the receiver hierarchy.

getLastAnnotation
public PDAnnotation getLastAnnotation()

The last PDAnnotation linked on this page.

Returns:
The last PDAnnotation on the page or null

getLastNode
public PDPageNode getLastNode()

Get the last node within the receiver or the receiver if it is not a collection (page tree).

This may return null if the receiver is an empty collection.

getLastPage
public PDPage getLastPage()

Get the last page (leaf node) within the receiver hierarchy.

getNextAnnotation
public PDAnnotation getNextAnnotation(PDAnnotation annot)

The PDAnnotation following the given PDAnnotation annot or null, if annot was the last one in the list or does't exist
on this page.

Parameters:
annot - a PDAnnotation

Returns:

Page 1127 of 1521


de.intarsys.pdf.pd.PDPage

(continued from last page)

a PDAnnotation or null

getNextPage
public PDPage getNextPage()

The next page after the receiver.

Returns:
The next page after the receiver.

getPageAt
public PDPage getPageAt(int index)

The page at index within the receivers subtree.

getPreviousAnnotation
public PDAnnotation getPreviousAnnotation(PDAnnotation annot)

Returns the PDAnnotation preceding the given PDAnnotation annot or null, if annot was the first one in the list or
does't exist on this page.

Parameters:
annot - a PDAnnotation

Returns:
a PDAnnotation or null

getPreviousPage
public PDPage getPreviousPage()

Get the previous page before the receiver.

Returns:
Get the previous page before the receiver.

getResources
public PDResources getResources()

return a PDCResourceDict. this is a wrapper around a COSDictionary that handles Resource specific details.

Returns:
the resource dict as a PDCResourceDict

getSupportedTriggerEvents
public java.util.Set getSupportedTriggerEvents()

invalidateCaches
public void invalidateCaches()

Page 1128 of 1521


de.intarsys.pdf.pd.PDPage

(continued from last page)

Invalidate all local caches as the base object may have changed.

isPage
public boolean isPage()

Answer true if this is a single page node.

removeAnnotation
public void removeAnnotation(PDAnnotation annot)

Remove a PDAnnotation from the page.

Parameters:
annot - The PDAnnotation to remove from the page.

removeApplicationData
public void removeApplicationData(String name)

Remove the PDApplicationData associated with name from this page.

Parameters:
name - The name of the application data object to be removed.

setAdditionalActions
public void setAdditionalActions(PDAdditionalActions actions)

setApplicationData
public void setApplicationData(String name,
PDApplicationData data)

Associate a PDApplicationData instance with this using name.

Parameters:
name - The name for the PDApplicationData instance within this.
data - The PDApplicationData instance.

setContentStream
public void setContentStream(CSContent contentStream)

Assign a new visual appearance to the page.

Parameters:
contentStream - The new visual appearance.

setResources
public void setResources(PDResources resources)

Page 1129 of 1521


de.intarsys.pdf.pd.PDPage.MetaClass

de.intarsys.pdf.pd
Class PDPage.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDPageNode.MetaClass
|
+-de.intarsys.pdf.pd.PDPage.MetaClass

public static class PDPage.MetaClass


extends PDPageNode.MetaClass

The meta class implementation

Page 1130 of 1521


de.intarsys.pdf.pd.PDPageNode

de.intarsys.pdf.pd
Class PDPageNode
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDPageNode
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


PDPage, PDPageTree

public abstract class PDPageNode


extends PDObject

An abstract superclass for pages and page tree nodes

Nested Class Summary


class PDPageNode.MetaClass
PDPageNode.MetaClass

Field Summary
public static final CN_Type_Page

public static final DK_Pages

public static final DK_Parent

public static final DK_Rotate

public static final META


The meta class instance

Method Summary
void dispose()
Deprecated.

abstract int getCount()


The total number of pages represented by this node.

CDSRectangle getCropBox()
The rectangle in user space coordinates defining the visible region of the page.

PDAnnotation getFirstAnnotation()
The first PDAnnotation linked on this page.

Page 1131 of 1521


de.intarsys.pdf.pd.PDPageNode

abstract PDPageNode getFirstNode()


Get the first node within the receiver or the receiver if it is not a collection (page tree).

abstract PDPage getFirstPage()


Get the first page (leaf node) within the receiver hierarchy.

PDObject getGenericParent()

PDAnnotation getLastAnnotation()
The last PDAnnotation linked on this page.

abstract PDPageNode getLastNode()


Get the last node within the receiver or the receiver if it is not a collection (page tree).

PDPage getLastPage()
Get the last page (leaf node) within the receiver hierarchy.

CDSRectangle getMediaBox()
The rectangle in user space coordinates defining the physical page boundaries. user space is
measured in 1/72 inch initially

PDPageNode getNextNode()
Get the next node after the receiver.

int getNodeIndex()
The zero based index of this within the document.

PDPage getPageAt(int index)


The page at index within the receivers subtree.

PDPageTree getParent()
The parent node if available.

PDPageNode getPreviousNode()
The previous node .

int getRotate()
The number of degrees by which the page should be rotated clockwise when displayed or
printed.

void invalidateCaches()

abstract boolean isPage()


Answer true if this is a single page node.

void setCropBox(CDSRectangle rect)


Set the rectangle in user space coordinates defining the visible region of the page. user
space is measured in 1/72 inch initially

void setGenericParent(PDObject newParent)

void setMediaBox(CDSRectangle rect)


Set the rectangle in user space coordinates defining the physical page boundaries. user space
is measured in 1/72 inch initially

void setRotate(int rotate)


The number of degrees by which the page should be rotated clockwise when displayed or
printed.

Page 1132 of 1521


de.intarsys.pdf.pd.PDPageNode

Fields
META
public static final de.intarsys.pdf.pd.PDPageNode.MetaClass META

The meta class instance

DK_Parent
public static final de.intarsys.pdf.cos.COSName DK_Parent

DK_Pages
public static final de.intarsys.pdf.cos.COSName DK_Pages

CN_Type_Page
public static final de.intarsys.pdf.cos.COSName CN_Type_Page

DK_Rotate
public static final de.intarsys.pdf.cos.COSName DK_Rotate

Methods
dispose
public void dispose()

Deprecated.

getCount
public abstract int getCount()

The total number of pages represented by this node.

Returns:
The total number of pages represented by this node.

getCropBox
public CDSRectangle getCropBox()

Page 1133 of 1521


de.intarsys.pdf.pd.PDPageNode

(continued from last page)

The rectangle in user space coordinates defining the visible region of the page. User space is measured in 1/72 inch initially

Returns:
The rectangle in user space coordinates defining the visible region of the page

getFirstAnnotation
public PDAnnotation getFirstAnnotation()

The first PDAnnotation linked on this page.

Returns:
The first PDAnnotation linked on this page.

getFirstNode
public abstract PDPageNode getFirstNode()

Get the first node within the receiver or the receiver if it is not a collection (page tree).

This may return null if the receiver is an empty collection.

Returns:
Get the first node within the receiver or the receiver if it is not a collection (page tree).

getFirstPage
public abstract PDPage getFirstPage()

Get the first page (leaf node) within the receiver hierarchy.

Returns:
Get the first page (leaf node) within the receiver hierarchy.

getGenericParent
public PDObject getGenericParent()

The parent of the receiver if it is a node in a hierarchical structure (like page nodes or form fields).

A concrete PDObject implementation supporting inheritance should implement this method.

getLastAnnotation
public PDAnnotation getLastAnnotation()

The last PDAnnotation linked on this page.

Returns:
The last PDAnnotation linked on this page.

getLastNode
public abstract PDPageNode getLastNode()

Get the last node within the receiver or the receiver if it is not a collection (page tree).

This may return null if the receiver is an empty collection.

Returns:

Page 1134 of 1521


de.intarsys.pdf.pd.PDPageNode

(continued from last page)

Get the last node within the receiver or the receiver if it is not a collection (page tree).

getLastPage
public PDPage getLastPage()

Get the last page (leaf node) within the receiver hierarchy.

Returns:
Get the last page (leaf node) within the receiver hierarchy.

getMediaBox
public CDSRectangle getMediaBox()

The rectangle in user space coordinates defining the physical page boundaries. user space is measured in 1/72 inch initially

Returns:
The rectangle in user space coordinates defining the physical page boundaries

getNextNode
public PDPageNode getNextNode()

Get the next node after the receiver.

Returns:
Get the next node after the receiver.

getNodeIndex
public int getNodeIndex()

The zero based index of this within the document.

Returns:
The zero based index of this within the document.

getPageAt
public PDPage getPageAt(int index)

The page at index within the receivers subtree.

Parameters:
index - The page index

Returns:
The page at index within the receivers subtree.

getParent
public PDPageTree getParent()

The parent node if available. The root tree node of the document has no parent.

Returns:
The parent node if available.

Page 1135 of 1521


de.intarsys.pdf.pd.PDPageNode

getPreviousNode
public PDPageNode getPreviousNode()

The previous node .

Returns:
The previous node.

getRotate
public int getRotate()

The number of degrees by which the page should be rotated clockwise when displayed or printed. The value must be a
multiple of 90. Default value: 0.

Notice: the value is inheritable

Returns:
Rotation as a multiple of 90

invalidateCaches
public void invalidateCaches()

Invalidate all local caches as the base object may have changed.

isPage
public abstract boolean isPage()

Answer true if this is a single page node.

Returns:
Answer true if this is a single page node.

setCropBox
public void setCropBox(CDSRectangle rect)

Set the rectangle in user space coordinates defining the visible region of the page. user space is measured in 1/72 inch
initially

Parameters:
rect - The rectangle defining the visible page region

setGenericParent
public void setGenericParent(PDObject newParent)

Set the parent of the receiver if it is a node in a hierarchical structure (like page nodes or form fields).

A concrete PDObject implementation supporting inheritance should implement this method.

setMediaBox
public void setMediaBox(CDSRectangle rect)

Page 1136 of 1521


de.intarsys.pdf.pd.PDPageNode

(continued from last page)

Set the rectangle in user space coordinates defining the physical page boundaries. user space is measured in 1/72 inch
initially

Parameters:
rect - The rectangle defining the physical page boundaries

setRotate
public void setRotate(int rotate)

The number of degrees by which the page should be rotated clockwise when displayed or printed. The value must be a
multiple of 90. If a value of 0 is set, which is the default, the field will be cleared.

Notice: This object and its children are affected on a change!

Parameters:
rotate - A multiple of 90, the value is not checked for a legal value

Page 1137 of 1521


de.intarsys.pdf.pd.PDPageNode.MetaClass

de.intarsys.pdf.pd
Class PDPageNode.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDPageNode.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass

public static class PDPageNode.MetaClass


extends PDObject.MetaClass

The meta class implementation

Method Summary
Class getRootClass()

Methods
getRootClass
public Class getRootClass()

Page 1138 of 1521


de.intarsys.pdf.pd.PDPageTree

de.intarsys.pdf.pd
Class PDPageTree
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDPageNode
|
+-de.intarsys.pdf.pd.PDPageTree
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDPageTree


extends PDPageNode

A page tree node is a container for pages (and other page tree nodes) within a PFD document. All pages in the document are direct
or indirect children of the root page tree node in the COSCatalog object

Nested Class Summary


class PDPageTree.MetaClass
PDPageTree.MetaClass

Field Summary
public static final DK_Count

public static final DK_Kids

public static final META


The meta class instance

Method Summary
void addNode(int index, PDPageNode newNode)
Add a page after at the designated index.

void addNode(PDPageNode newNode)


Add a page as immediate child at last position

void addNodeAfter(PDPageNode newNode, PDPageNode destination)


Add a page after the designated destination page. the destination page must be in the
receiver tree node

int getCount()

PDPageNode getFirstNode()

PDPage getFirstPage()

Page 1139 of 1521


de.intarsys.pdf.pd.PDPageTree

java.util.List getGenericChildren()

java.util.List getKids()
Get the list of all page nodes that are children of the receiver.

PDPageNode getLastNode()

void invalidateCaches()

boolean isPage()

PDPageTree rebalance()
Rebalanve this.

void removeNode(PDPageNode node)


Remove a node

Fields
META
public static final de.intarsys.pdf.pd.PDPageTree.MetaClass META

The meta class instance

DK_Kids
public static final de.intarsys.pdf.cos.COSName DK_Kids

DK_Count
public static final de.intarsys.pdf.cos.COSName DK_Count

Methods
addNode
public void addNode(int index,
PDPageNode newNode)

Add a page after at the designated index.

Parameters:
index - the index which to insert the new child at
newNode - the child page to add

addNode
public void addNode(PDPageNode newNode)

Page 1140 of 1521


de.intarsys.pdf.pd.PDPageTree

(continued from last page)

Add a page as immediate child at last position

Parameters:
newNode - the child page to create

addNodeAfter
public void addNodeAfter(PDPageNode newNode,
PDPageNode destination)

Add a page after the designated destination page. the destination page must be in the receiver tree node

Parameters:
newNode - the child page to add
destination - the page after which to insert the new child

getCount
public int getCount()

The total number of pages represented by this node.

getFirstNode
public PDPageNode getFirstNode()

Get the first node within the receiver or the receiver if it is not a collection (page tree).

This may return null if the receiver is an empty collection.

getFirstPage
public PDPage getFirstPage()

Get the first page (leaf node) within the receiver hierarchy.

getGenericChildren
public java.util.List getGenericChildren()

Get a collection of PDObject children if the receiver is a node in a hierarchical structure (like page nodes or form fields).

This enables the generic implementation of inherited field values and so on.

A concrete PDObject implementation supporting inheritance should implement this method.

getKids
public java.util.List getKids()

Get the list of all page nodes that are children of the receiver.

Returns:
an ArrayList

getLastNode
public PDPageNode getLastNode()

Page 1141 of 1521


de.intarsys.pdf.pd.PDPageTree

(continued from last page)

Get the last node within the receiver or the receiver if it is not a collection (page tree).

This may return null if the receiver is an empty collection.

invalidateCaches
public void invalidateCaches()

Invalidate all local caches as the base object may have changed.

isPage
public boolean isPage()

Answer true if this is a single page node.

rebalance
public PDPageTree rebalance()

Rebalanve this.

Returns:
The new PDPageTree created or null if nothing changed.

removeNode
public void removeNode(PDPageNode node)

Remove a node

Parameters:
node - The child node to remove

Page 1142 of 1521


de.intarsys.pdf.pd.PDPageTree.MetaClass

de.intarsys.pdf.pd
Class PDPageTree.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDPageNode.MetaClass
|
+-de.intarsys.pdf.pd.PDPageTree.MetaClass

public static class PDPageTree.MetaClass


extends PDPageNode.MetaClass

The meta class implementation

Page 1143 of 1521


de.intarsys.pdf.pd.PDPattern

de.intarsys.pdf.pd
Class PDPattern
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDPattern
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


PDShadingPattern, PDTilingPattern

public abstract class PDPattern


extends PDObject

A pattern to be used when filling a shape.

Nested Class Summary


class PDPattern.MetaClass
PDPattern.MetaClass

Field Summary
public static final CN_Type_Pattern

public static final DK_PatternType

public static final META


The meta class instance

public static final PATTERN_TYPE_SHADING

Value: 2

public static final PATTERN_TYPE_TILING

Value: 1

Method Summary
abstract int getPatternType()

Fields

Page 1144 of 1521


de.intarsys.pdf.pd.PDPattern

(continued from last page)

DK_PatternType
public static final de.intarsys.pdf.cos.COSName DK_PatternType

CN_Type_Pattern
public static final de.intarsys.pdf.cos.COSName CN_Type_Pattern

META
public static final de.intarsys.pdf.pd.PDPattern.MetaClass META

The meta class instance

PATTERN_TYPE_SHADING
public static final int PATTERN_TYPE_SHADING

Constant value: 2

PATTERN_TYPE_TILING
public static final int PATTERN_TYPE_TILING

Constant value: 1

Methods
getPatternType
public abstract int getPatternType()

Page 1145 of 1521


de.intarsys.pdf.pd.PDPattern.MetaClass

de.intarsys.pdf.pd
Class PDPattern.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDPattern.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass

public static class PDPattern.MetaClass


extends PDObject.MetaClass

The meta class implementation

Method Summary
Class getRootClass()

Methods
getRootClass
public Class getRootClass()

Page 1146 of 1521


de.intarsys.pdf.pd.PDPopupAnnotation

de.intarsys.pdf.pd
Class PDPopupAnnotation
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAnnotation
|
+-de.intarsys.pdf.pd.PDPopupAnnotation
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IAdditionalActionSupport

public class PDPopupAnnotation


extends PDAnnotation

The implementation of a popup window definition within the document. The popup window is associated with other annotations to
enable the user to give comments and replies.

Nested Class Summary


class PDPopupAnnotation.MetaClass
PDPopupAnnotation.MetaClass

Field Summary
public static final CN_Subtype_Popup

public static final DK_Open

public static final DK_Parent

public static final DK_T

public static final META


The meta class instance

Method Summary
float[] getColor()

String getContents()

CDSDate getModified()

PDPage getPage()

PDAnnotation getParent()

Page 1147 of 1521


de.intarsys.pdf.pd.PDPopupAnnotation

String getSubject()

String getSubtypeLabel()

String getText()

boolean isOpen()

void setContents(String contents)

void setOpen(boolean open)

void setParent(PDAnnotation parent)

void setSubject(String subject)

Fields
META
public static final de.intarsys.pdf.pd.PDPopupAnnotation.MetaClass META

The meta class instance

CN_Subtype_Popup
public static final de.intarsys.pdf.cos.COSName CN_Subtype_Popup

DK_T
public static final de.intarsys.pdf.cos.COSName DK_T

DK_Parent
public static final de.intarsys.pdf.cos.COSName DK_Parent

DK_Open
public static final de.intarsys.pdf.cos.COSName DK_Open

Methods

Page 1148 of 1521


de.intarsys.pdf.pd.PDPopupAnnotation

(continued from last page)

getText
public String getText()

getParent
public PDAnnotation getParent()

setParent
public void setParent(PDAnnotation parent)

getContents
public String getContents()

The contents java.lang.String for this.

setContents
public void setContents(String contents)

Assign a content java.lang.String.

getSubject
public String getSubject()

getPage
public PDPage getPage()

Try to access the PDPage we are on. This may return null, as this reference is not required by the spec.

setSubject
public void setSubject(String subject)

getModified
public CDSDate getModified()

The last modification date.

getColor
public float[] getColor()

Page 1149 of 1521


de.intarsys.pdf.pd.PDPopupAnnotation

(continued from last page)

The color values for this.

isOpen
public boolean isOpen()

setOpen
public void setOpen(boolean open)

getSubtypeLabel
public String getSubtypeLabel()

A java.lang.String representation of this.

Page 1150 of 1521


de.intarsys.pdf.pd.PDPopupAnnotation.MetaClass

de.intarsys.pdf.pd
Class PDPopupAnnotation.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAnnotation.MetaClass
|
+-de.intarsys.pdf.pd.PDPopupAnnotation.MetaClass

public static class PDPopupAnnotation.MetaClass


extends PDAnnotation.MetaClass

The meta class implementation

Page 1151 of 1521


de.intarsys.pdf.pd.PDPostScript

de.intarsys.pdf.pd
Class PDPostScript
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDXObject
|
+-de.intarsys.pdf.pd.PDPostScript
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDPostScript


extends PDXObject

The representation of embedded postscript programs

Nested Class Summary


class PDPostScript.MetaClass
PDPostScript.MetaClass

Field Summary
public static final CN_Subtype_PS

public static final META


The meta class instance

Method Summary
boolean isPostscript()

Fields
META
public static final de.intarsys.pdf.pd.PDPostScript.MetaClass META

The meta class instance

CN_Subtype_PS
public static final de.intarsys.pdf.cos.COSName CN_Subtype_PS

Methods

Page 1152 of 1521


de.intarsys.pdf.pd.PDPostScript

(continued from last page)

isPostscript
public boolean isPostscript()

true if this is a postscript object.

Page 1153 of 1521


de.intarsys.pdf.pd.PDPostScript.MetaClass

de.intarsys.pdf.pd
Class PDPostScript.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDXObject.MetaClass
|
+-de.intarsys.pdf.pd.PDPostScript.MetaClass

public static class PDPostScript.MetaClass


extends PDXObject.MetaClass

The meta class implementation

Page 1154 of 1521


de.intarsys.pdf.pd.PDPostScriptFunction

de.intarsys.pdf.pd
Class PDPostScriptFunction
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDFunction
|
+-de.intarsys.pdf.pd.PDPostScriptFunction
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDPostScriptFunction


extends PDFunction

A function implementation based on a "mini" postscript interpreter.

Nested Class Summary


class PDPostScriptFunction.MetaClass
PDPostScriptFunction.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
COSDictionary cosGetDict()

float[] evaluate(float[] values)

String getCode()

int getOutputSize()

Fields
META
public static final de.intarsys.pdf.pd.PDPostScriptFunction.MetaClass META

The meta class instance

Methods

Page 1155 of 1521


de.intarsys.pdf.pd.PDPostScriptFunction

(continued from last page)

cosGetDict
public COSDictionary cosGetDict()

Get the base object as a COSDictionary.

This will throw a java.lang.ClassCastException if the base type is not appropriate!

evaluate
public float[] evaluate(float[] values)

getCode
public String getCode()

getOutputSize
public int getOutputSize()

Page 1156 of 1521


de.intarsys.pdf.pd.PDPostScriptFunction.MetaClass

de.intarsys.pdf.pd
Class PDPostScriptFunction.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDFunction.MetaClass
|
+-de.intarsys.pdf.pd.PDPostScriptFunction.MetaClass

public static class PDPostScriptFunction.MetaClass


extends PDFunction.MetaClass

The meta class implementation

Page 1157 of 1521


de.intarsys.pdf.pd.PDRadialShading

de.intarsys.pdf.pd
Class PDRadialShading
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDShading
|
+-de.intarsys.pdf.pd.PDRadialShading
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDRadialShading


extends PDShading

Use radial shading for filling the shape.

Nested Class Summary


class PDRadialShading.MetaClass
PDRadialShading.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
int getShadingType()

Fields
META
public static final de.intarsys.pdf.pd.PDRadialShading.MetaClass META

The meta class instance

Methods
getShadingType
public int getShadingType()

Page 1158 of 1521


de.intarsys.pdf.pd.PDRadialShading.MetaClass

de.intarsys.pdf.pd
Class PDRadialShading.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDShading.MetaClass
|
+-de.intarsys.pdf.pd.PDRadialShading.MetaClass

public static class PDRadialShading.MetaClass


extends PDShading.MetaClass

The meta class implementation

Page 1159 of 1521


de.intarsys.pdf.pd.PDResources

de.intarsys.pdf.pd
Class PDResources
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDResources
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDResources


extends PDObject

The implementation of a resource dictionary.

The resource dictionary holds the references to indirect objects that are use within a CSContent. From the CSContent, these
objects are referenced using the key under which they are stored in the dictionary.

Nested Class Summary


class PDResources.MetaClass
PDResources.MetaClass

Field Summary
public static final CN_RT_ColorSpace

public static final CN_RT_Encoding

public static final CN_RT_ExtGState


the resource types in a resource dictionaries

public static final CN_RT_Font

public static final CN_RT_Pattern

public static final CN_RT_ProcSet

public static final CN_RT_Properties

public static final CN_RT_Shading

public static final CN_RT_XObject

public static final META


The meta class instance

Method Summary

Page 1160 of 1521


de.intarsys.pdf.pd.PDResources

void addColorSpaceResource(COSName name, PDColorSpace colorSpace)

void addExtGStateResource(COSName name, PDExtGState extGState)

void addFontResource(COSName name, PDFont font)

void addPatternResource(COSName name, PDPattern pattern)

void addResource(COSName resourceType, COSName name, PDObject object)

void addShadingResource(COSName name, PDShading shading)

void addXObjectResource(COSName name, PDXObject object)

void cosAddResource(COSName resourceType, COSName resourceName, COSObject


resource)

COSName cosCreateResource(COSName resourceType, COSObject resource)

COSObject cosGetResource(COSName resourceType, COSName resourceName)

COSDictionary cosGetResources(COSName resourceType)

COSName createColorSpaceResource(PDColorSpace colorSpace)


Return the name of a ColorSpace resource within the resource dictionary.

COSName createExtGStateResource(PDExtGState gstate)


Return the name of a ExtGState resource within the resource dictionary.

COSName createFontResource(PDFont font)


Return the name of the font resource within this resource dictionary.

COSName createResource(COSName resourceType, PDObject object)


Return the name of a new resource of selected resource type within the resource dictionary.

COSName createShadingResource(PDShading shading)


Return the name of a shading resource within the resource dictionary.

COSName createXObjectResource(PDXObject xobject)


Return the name of a XObject resource within the resource dictionary.

PDColorSpace getColorSpaceResource(COSName name)


A named ColorSpace resource from the resource dictionary.

PDExtGState getExtGStateResource(COSName name)


Return a named ExtGState resource from the resource dictionary.

PDFont getFontResource(COSName name)


Return a named font resource.

PDPattern getPatternResource(COSName name)


Return a named Pattern resource from the resource dictionary.

Page 1161 of 1521


de.intarsys.pdf.pd.PDResources

PDObject getResource(COSName resourceType, PDObject.MetaClass metaClass, COSName


name)
Return a named resource from the resource dictionary.

PDShading getShadingResource(COSName name)


Return a named Pattern resource from the resource dictionary.

PDXObject getXObjectResource(COSName name)


Return a named XObject resource from the resource dictionary.

void invalidateCaches()

Fields
CN_RT_ColorSpace
public static final de.intarsys.pdf.cos.COSName CN_RT_ColorSpace

CN_RT_Encoding
public static final de.intarsys.pdf.cos.COSName CN_RT_Encoding

CN_RT_ExtGState
public static final de.intarsys.pdf.cos.COSName CN_RT_ExtGState

the resource types in a resource dictionaries

CN_RT_Font
public static final de.intarsys.pdf.cos.COSName CN_RT_Font

CN_RT_Pattern
public static final de.intarsys.pdf.cos.COSName CN_RT_Pattern

CN_RT_ProcSet
public static final de.intarsys.pdf.cos.COSName CN_RT_ProcSet

CN_RT_Properties
public static final de.intarsys.pdf.cos.COSName CN_RT_Properties

Page 1162 of 1521


de.intarsys.pdf.pd.PDResources

CN_RT_Shading
public static final de.intarsys.pdf.cos.COSName CN_RT_Shading

CN_RT_XObject
public static final de.intarsys.pdf.cos.COSName CN_RT_XObject

META
public static final de.intarsys.pdf.pd.PDResources.MetaClass META

The meta class instance

Methods
addColorSpaceResource
public void addColorSpaceResource(COSName name,
PDColorSpace colorSpace)

addExtGStateResource
public void addExtGStateResource(COSName name,
PDExtGState extGState)

addFontResource
public void addFontResource(COSName name,
PDFont font)

addPatternResource
public void addPatternResource(COSName name,
PDPattern pattern)

addResource
public void addResource(COSName resourceType,
COSName name,
PDObject object)

Page 1163 of 1521


de.intarsys.pdf.pd.PDResources

(continued from last page)

addShadingResource
public void addShadingResource(COSName name,
PDShading shading)

addXObjectResource
public void addXObjectResource(COSName name,
PDXObject object)

cosAddResource
public void cosAddResource(COSName resourceType,
COSName resourceName,
COSObject resource)

cosCreateResource
public COSName cosCreateResource(COSName resourceType,
COSObject resource)

cosGetResource
public COSObject cosGetResource(COSName resourceType,
COSName resourceName)

cosGetResources
public COSDictionary cosGetResources(COSName resourceType)

createColorSpaceResource
public COSName createColorSpaceResource(PDColorSpace colorSpace)

Return the name of a ColorSpace resource within the resource dictionary.

A new entry is created if the resource is not found.

Parameters:
colorSpace - The colorSpace to lookup.

Returns:
the name of a ColorSpace resource within the resource dictionary.

createExtGStateResource
public COSName createExtGStateResource(PDExtGState gstate)

Page 1164 of 1521


de.intarsys.pdf.pd.PDResources

(continued from last page)

Return the name of a ExtGState resource within the resource dictionary.

A new entry is created if the resource is not found.

Parameters:
gstate - The gstate to lookup.

Returns:
the name of a ExtGState resource within the resource dictionary.

createFontResource
public COSName createFontResource(PDFont font)

Return the name of the font resource within this resource dictionary.

A new entry is created if the resource is not found.

Parameters:
font - The font whose name is looked up.

Returns:
the name of the font resource within this resource dictionary.

createResource
public COSName createResource(COSName resourceType,
PDObject object)

Return the name of a new resource of selected resource type within the resource dictionary.

A new entry is created if the resource is not found.

Parameters:
object - The resource to lookup.

Returns:
The name of a resource within the resource dictionary.

createShadingResource
public COSName createShadingResource(PDShading shading)

Return the name of a shading resource within the resource dictionary.

A new entry is created if the resource is not found.

Parameters:
shading - The shading to lookup.

Returns:
The name of the resource within the resource dictionary.

createXObjectResource
public COSName createXObjectResource(PDXObject xobject)

Return the name of a XObject resource within the resource dictionary.

A new entry is created if the resource is not found.

Page 1165 of 1521


de.intarsys.pdf.pd.PDResources

(continued from last page)

Parameters:
xobject - The object to lookup.

Returns:
the name of a XObject resource within the resource dictionary.

getColorSpaceResource
public PDColorSpace getColorSpaceResource(COSName name)

A named ColorSpace resource from the resource dictionary.

Parameters:
name - The name of the ColorSpace resource.

Returns:
A named ColorSpace resource from the resource dictionary.

getExtGStateResource
public PDExtGState getExtGStateResource(COSName name)

Return a named ExtGState resource from the resource dictionary.

Parameters:
name - The name of the ExtGState resource.

Returns:
a named ExtGState resource from the resource dictionary.

getFontResource
public PDFont getFontResource(COSName name)

Return a named font resource.

Parameters:
name - The name of the font resource

Returns:
A named font resource from within the resource dictionary.

getPatternResource
public PDPattern getPatternResource(COSName name)

Return a named Pattern resource from the resource dictionary.

Parameters:
name - The name of the Pattern resource.

Returns:
a named Pattern resource from the resource dictionary.

Page 1166 of 1521


de.intarsys.pdf.pd.PDResources

(continued from last page)

getResource
public PDObject getResource(COSName resourceType,
PDObject.MetaClass metaClass,
COSName name)

Return a named resource from the resource dictionary.

Parameters:
name - The name of the resource.

Returns:
a named resource from the resource dictionary.

getShadingResource
public PDShading getShadingResource(COSName name)

Return a named Pattern resource from the resource dictionary.

Parameters:
name - The name of the Pattern resource.

Returns:
a named Pattern resource from the resource dictionary.

getXObjectResource
public PDXObject getXObjectResource(COSName name)

Return a named XObject resource from the resource dictionary.

Parameters:
name - The name of the XObject resource.

Returns:
a named XObject resource from the resource dictionary.

invalidateCaches
public void invalidateCaches()

Invalidate all local caches as the base object may have changed.

Page 1167 of 1521


de.intarsys.pdf.pd.PDResources.MetaClass

de.intarsys.pdf.pd
Class PDResources.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDResources.MetaClass

public static class PDResources.MetaClass


extends PDObject.MetaClass

The meta class implementation

Page 1168 of 1521


de.intarsys.pdf.pd.PDSampledFunction

de.intarsys.pdf.pd
Class PDSampledFunction
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDFunction
|
+-de.intarsys.pdf.pd.PDSampledFunction
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDSampledFunction


extends PDFunction

Function implementation based on samples.

Nested Class Summary


class PDSampledFunction.MetaClass
PDSampledFunction.MetaClass

Field Summary
public static final DK_BitsPerSample

public static final DK_Decode

public static final DK_Encode

public static final DK_Order

public static final DK_Size

public static final META


The meta class instance

Method Summary
COSArray cosGetDecode()
Return the Decode value array.

COSDictionary cosGetDict()

COSArray cosGetEncode()
Return the Encode value array

float[] evaluate(float[] input)


Evaluate the function for each of the input values in turn.

Page 1169 of 1521


de.intarsys.pdf.pd.PDSampledFunction

int getBitsPerSample()
Return the BitsPerSample value.

float getDecodeMax(int dimension)


Return the max value of the Decode array for the given dimension.

float getDecodeMin(int dimension)


Return the min value of the Decode array for the given dimension.

float getEncodeMax(int dimension)


Return the max value of the Encode array for the given dimension.

float getEncodeMin(int dimension)


Return the min value of the Encode array for the given dimension.

int getOutputSize()
Return the number of output values for one input value.

COSArray getSize()
Return the Size value array.

int getSize(int dimension)


Return the size value for the given dimension.

Fields
DK_BitsPerSample
public static final de.intarsys.pdf.cos.COSName DK_BitsPerSample

DK_Decode
public static final de.intarsys.pdf.cos.COSName DK_Decode

DK_Encode
public static final de.intarsys.pdf.cos.COSName DK_Encode

DK_Order
public static final de.intarsys.pdf.cos.COSName DK_Order

DK_Size
public static final de.intarsys.pdf.cos.COSName DK_Size

Page 1170 of 1521


de.intarsys.pdf.pd.PDSampledFunction

META
public static final de.intarsys.pdf.pd.PDSampledFunction.MetaClass META

The meta class instance

Methods
cosGetDict
public COSDictionary cosGetDict()

Get the base object as a COSDictionary.

This will throw a java.lang.ClassCastException if the base type is not appropriate!

evaluate
public float[] evaluate(float[] input)

Evaluate the function for each of the input values in turn. The output values are stored in an array and returned.

Parameters:
input - input values to evaluate

Returns:
an array of output values

getBitsPerSample
public int getBitsPerSample()

Return the BitsPerSample value.

Returns:
the BitsPerSample value

cosGetDecode
public COSArray cosGetDecode()

Return the Decode value array.

Returns:
the Decode value array

getDecodeMax
public float getDecodeMax(int dimension)

Return the max value of the Decode array for the given dimension.

Parameters:
dimension - the dimension to get the max value for

Returns:
the max value of the Decode array for the given dimension

Page 1171 of 1521


de.intarsys.pdf.pd.PDSampledFunction

getDecodeMin
public float getDecodeMin(int dimension)

Return the min value of the Decode array for the given dimension.

Parameters:
dimension - the dimension to get the min value for

Returns:
the min value of the Decode array for the given dimension

cosGetEncode
public COSArray cosGetEncode()

Return the Encode value array

Returns:
the Encode value array

getEncodeMax
public float getEncodeMax(int dimension)

Return the max value of the Encode array for the given dimension.

Parameters:
dimension - the dimension to get the max value for

Returns:
the max value of the Encode array for the given dimension

getEncodeMin
public float getEncodeMin(int dimension)

Return the min value of the Encode array for the given dimension.

Parameters:
dimension - the dimension to get the min value for

Returns:
the min value of the Encode array for the given dimension

getOutputSize
public int getOutputSize()

Return the number of output values for one input value.

Returns:
the number of output values for one input value

getSize
public COSArray getSize()

Page 1172 of 1521


de.intarsys.pdf.pd.PDSampledFunction

(continued from last page)

Return the Size value array.

Returns:
the Size value array

getSize
public int getSize(int dimension)

Return the size value for the given dimension.

Parameters:
dimension - the dimension to get the size value for

Returns:
the size value for the given dimension

Page 1173 of 1521


de.intarsys.pdf.pd.PDSampledFunction.MetaClass

de.intarsys.pdf.pd
Class PDSampledFunction.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDFunction.MetaClass
|
+-de.intarsys.pdf.pd.PDSampledFunction.MetaClass

public static class PDSampledFunction.MetaClass


extends PDFunction.MetaClass

The meta class implementation

Page 1174 of 1521


de.intarsys.pdf.pd.PDShading

de.intarsys.pdf.pd
Class PDShading
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDShading
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


PDAxialShading, PDCoonsShading, PDFreeFormShading, PDFunctionBasedShading, PDLatticeFormShading,
PDRadialShading, PDTensorProductShading

public abstract class PDShading


extends PDObject

An object defining the shading to be used when filling a shape.

Nested Class Summary


class PDShading.MetaClass
PDShading.MetaClass

Field Summary
public static final META
The meta class instance

public static final SHADING_TYPE_AXIAL

Value: 2

public static final SHADING_TYPE_COONS

Value: 6

public static final SHADING_TYPE_FREEFORM

Value: 4

public static final SHADING_TYPE_FUNCTIONBASED

Value: 1

public static final SHADING_TYPE_LATTICEFORM

Value: 5

public static final SHADING_TYPE_RADIAL

Value: 3

Page 1175 of 1521


de.intarsys.pdf.pd.PDShading

public static final SHADING_TYPE_TENSORPRODUCT

Value: 7

Method Summary
CDSRectangle getBoundingBox()

PDColorSpace getColorSpace()

abstract int getShadingType()

boolean isAntiAlias()

Fields
META
public static final de.intarsys.pdf.pd.PDShading.MetaClass META

The meta class instance

SHADING_TYPE_AXIAL
public static final int SHADING_TYPE_AXIAL

Constant value: 2

SHADING_TYPE_COONS
public static final int SHADING_TYPE_COONS

Constant value: 6

SHADING_TYPE_FREEFORM
public static final int SHADING_TYPE_FREEFORM

Constant value: 4

SHADING_TYPE_FUNCTIONBASED
public static final int SHADING_TYPE_FUNCTIONBASED

Constant value: 1

SHADING_TYPE_LATTICEFORM
public static final int SHADING_TYPE_LATTICEFORM

Page 1176 of 1521


de.intarsys.pdf.pd.PDShading

(continued from last page)

Constant value: 5

SHADING_TYPE_RADIAL
public static final int SHADING_TYPE_RADIAL

Constant value: 3

SHADING_TYPE_TENSORPRODUCT
public static final int SHADING_TYPE_TENSORPRODUCT

Constant value: 7

Methods
getBoundingBox
public CDSRectangle getBoundingBox()

getColorSpace
public PDColorSpace getColorSpace()

getShadingType
public abstract int getShadingType()

isAntiAlias
public boolean isAntiAlias()

Page 1177 of 1521


de.intarsys.pdf.pd.PDShading.MetaClass

de.intarsys.pdf.pd
Class PDShading.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDShading.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass, MetaClass, MetaClass, MetaClass, MetaClass, MetaClass

public static class PDShading.MetaClass


extends PDObject.MetaClass

The meta class implementation

Method Summary
Class getRootClass()

Methods
getRootClass
public Class getRootClass()

Page 1178 of 1521


de.intarsys.pdf.pd.PDShadingPattern

de.intarsys.pdf.pd
Class PDShadingPattern
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDPattern
|
+-de.intarsys.pdf.pd.PDShadingPattern
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDShadingPattern


extends PDPattern

A shading fill pattern.

Nested Class Summary


class PDShadingPattern.MetaClass
PDShadingPattern.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
float[] getMatrix()

int getPatternType()

PDShading getShading()

Fields
META
public static final de.intarsys.pdf.pd.PDShadingPattern.MetaClass META

The meta class instance

Methods
getMatrix
public float[] getMatrix()

Page 1179 of 1521


de.intarsys.pdf.pd.PDShadingPattern

(continued from last page)

getPatternType
public int getPatternType()

getShading
public PDShading getShading()

Page 1180 of 1521


de.intarsys.pdf.pd.PDShadingPattern.MetaClass

de.intarsys.pdf.pd
Class PDShadingPattern.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDPattern.MetaClass
|
+-de.intarsys.pdf.pd.PDShadingPattern.MetaClass

public static class PDShadingPattern.MetaClass


extends PDPattern.MetaClass

The meta class implementation

Page 1181 of 1521


de.intarsys.pdf.pd.PDSignature

de.intarsys.pdf.pd
Class PDSignature
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDSignature
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDSignature


extends PDObject

This class represents the signature object referenced for example in an AcroForm signature field.

Nested Class Summary


class PDSignature.MetaClass
PDSignature.MetaClass

Field Summary
public static final CN_Type_Sig

public static final DK_ByteRange

public static final DK_Cert

public static final DK_Changes

public static final DK_ContactInfo

public static final DK_Contents

public static final DK_Filter

public static final DK_Location

public static final DK_M

public static final DK_Name

public static final DK_Prop_AuthTime

public static final DK_Prop_AuthType

Page 1182 of 1521


de.intarsys.pdf.pd.PDSignature

public static final DK_Prop_Build

public static final DK_R

public static final DK_Reason

public static final DK_Reference

public static final DK_SubFilter

public static final DK_V

public static final META


The meta class instance

Method Summary
COSArray cosGetByteRange()

PDAFSignatureField getAcroFormField()

PDBuildProperties getBuildProperties()

java.util.List getCert()
Get a List of certificates, the first one is the certificate of the signer himself.

String getContactInfo()

byte[] getContentBytes()

CDSDate getDate()

COSName getFilter()
Filter is a name for the original signature creator, for example: Adobe.PPKLite

String getLocation()

String getName()

String getReason()

COSName getSubFilter()
SubFilter is the name of a encoding and storage algorithm.

void setAcroFormField(PDAFSignatureField acroFormField)

void setBuildProperties(PDBuildProperties buildProperties)

void setCert(byte[] certificate)


Sets certificates in the /Cert field.

Page 1183 of 1521


de.intarsys.pdf.pd.PDSignature

void setCert(java.util.List certificates)


Sets certificates in the /Cert field.

void setContactInfo(String contactInfo)

void setDate(CDSDate date)

void setFilter(COSName filter)


Set the name of the signature creator, for example: Adobe.PPKLite

void setLocation(String location)

void setName(String name)

void setReason(String reason)

void setSubFilter(COSName subfilter)


Set the name of the encoding algorithm

Fields
META
public static final de.intarsys.pdf.pd.PDSignature.MetaClass META

The meta class instance

CN_Type_Sig
public static final de.intarsys.pdf.cos.COSName CN_Type_Sig

DK_Filter
public static final de.intarsys.pdf.cos.COSName DK_Filter

DK_SubFilter
public static final de.intarsys.pdf.cos.COSName DK_SubFilter

DK_Contents
public static final de.intarsys.pdf.cos.COSName DK_Contents

Page 1184 of 1521


de.intarsys.pdf.pd.PDSignature

(continued from last page)

DK_Cert
public static final de.intarsys.pdf.cos.COSName DK_Cert

DK_ByteRange
public static final de.intarsys.pdf.cos.COSName DK_ByteRange

DK_Reference
public static final de.intarsys.pdf.cos.COSName DK_Reference

DK_Changes
public static final de.intarsys.pdf.cos.COSName DK_Changes

DK_Name
public static final de.intarsys.pdf.cos.COSName DK_Name

DK_M
public static final de.intarsys.pdf.cos.COSName DK_M

DK_Location
public static final de.intarsys.pdf.cos.COSName DK_Location

DK_Reason
public static final de.intarsys.pdf.cos.COSName DK_Reason

DK_ContactInfo
public static final de.intarsys.pdf.cos.COSName DK_ContactInfo

DK_R
public static final de.intarsys.pdf.cos.COSName DK_R

Page 1185 of 1521


de.intarsys.pdf.pd.PDSignature

(continued from last page)

DK_V
public static final de.intarsys.pdf.cos.COSName DK_V

DK_Prop_Build
public static final de.intarsys.pdf.cos.COSName DK_Prop_Build

DK_Prop_AuthTime
public static final de.intarsys.pdf.cos.COSName DK_Prop_AuthTime

DK_Prop_AuthType
public static final de.intarsys.pdf.cos.COSName DK_Prop_AuthType

Methods
cosGetByteRange
public COSArray cosGetByteRange()

Returns:
the byte range for the signature or null

getAcroFormField
public PDAFSignatureField getAcroFormField()

getBuildProperties
public PDBuildProperties getBuildProperties()

getCert
public java.util.List getCert()

Get a List of certificates, the first one is the certificate of the signer himself. Followed by certificates of certificate
authoritys.

A certificate is stored as DER encoded byte[]

Page 1186 of 1521


de.intarsys.pdf.pd.PDSignature

(continued from last page)

Returns:
a List of certificates or null

getContactInfo
public String getContactInfo()

Returns:
how to contact the signer or null

getContentBytes
public byte[] getContentBytes()

getDate
public CDSDate getDate()

Returns:
the date the signature took place

getFilter
public COSName getFilter()

Filter is a name for the original signature creator, for example: Adobe.PPKLite

Returns:
name of the signature creator

getLocation
public String getLocation()

Returns:
where the document was signed or null

getName
public String getName()

Returns:
name of the signer or null

getReason
public String getReason()

Page 1187 of 1521


de.intarsys.pdf.pd.PDSignature

(continued from last page)

Returns:
reason for signing this document or null

getSubFilter
public COSName getSubFilter()

SubFilter is the name of a encoding and storage algorithm.

Returns:
the name of the encoding algorithm

setAcroFormField
public void setAcroFormField(PDAFSignatureField acroFormField)

setBuildProperties
public void setBuildProperties(PDBuildProperties buildProperties)

setCert
public void setCert(byte[] certificate)

Sets certificates in the /Cert field.

Parameters:
certificate - a DER encoded byte[]

setCert
public void setCert(java.util.List certificates)

Sets certificates in the /Cert field.

Parameters:
certificates - a list of DER encoded byte[]

setContactInfo
public void setContactInfo(String contactInfo)

Parameters:
contactInfo - how to contact the signer, may be null

setDate
public void setDate(CDSDate date)

Page 1188 of 1521


de.intarsys.pdf.pd.PDSignature

setFilter
public void setFilter(COSName filter)

Set the name of the signature creator, for example: Adobe.PPKLite

Parameters:
filter - name of the signature creator

setLocation
public void setLocation(String location)

Parameters:
location - location the signer signed the document, may be null

setName
public void setName(String name)

Parameters:
name - name of the signer, may be null

setReason
public void setReason(String reason)

Parameters:
reason - reason why is document was signed, may be null

setSubFilter
public void setSubFilter(COSName subfilter)

Set the name of the encoding algorithm

Parameters:
subfilter - name of the encoding algorithm

Page 1189 of 1521


de.intarsys.pdf.pd.PDSignature.MetaClass

de.intarsys.pdf.pd
Class PDSignature.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDSignature.MetaClass

public static class PDSignature.MetaClass


extends PDObject.MetaClass

The meta class implementation

Page 1190 of 1521


de.intarsys.pdf.pd.PDSignatureReference

de.intarsys.pdf.pd
Class PDSignatureReference
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDSignatureReference
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDSignatureReference


extends PDObject

This object specifies details on the signature.

Nested Class Summary


class PDSignatureReference.MetaClass
PDSignatureReference.MetaClass

Field Summary
public static final CN_Type_SigRef

public static final DK_Data

public static final DK_DigestLocation

public static final DK_DigestMethod

public static final DK_DigestValue

public static final DK_TransformMethod

public static final DK_TransformParams

public static final META


The meta class instance

Fields
META
public static final de.intarsys.pdf.pd.PDSignatureReference.MetaClass META

The meta class instance

Page 1191 of 1521


de.intarsys.pdf.pd.PDSignatureReference

CN_Type_SigRef
public static final de.intarsys.pdf.cos.COSName CN_Type_SigRef

DK_TransformMethod
public static final de.intarsys.pdf.cos.COSName DK_TransformMethod

DK_TransformParams
public static final de.intarsys.pdf.cos.COSName DK_TransformParams

DK_Data
public static final de.intarsys.pdf.cos.COSName DK_Data

DK_DigestMethod
public static final de.intarsys.pdf.cos.COSName DK_DigestMethod

DK_DigestValue
public static final de.intarsys.pdf.cos.COSName DK_DigestValue

DK_DigestLocation
public static final de.intarsys.pdf.cos.COSName DK_DigestLocation

Page 1192 of 1521


de.intarsys.pdf.pd.PDSignatureReference.MetaClass

de.intarsys.pdf.pd
Class PDSignatureReference.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDSignatureReference.MetaClass

public static class PDSignatureReference.MetaClass


extends PDObject.MetaClass

The meta class implementation

Page 1193 of 1521


de.intarsys.pdf.pd.PDStampAnnotation

de.intarsys.pdf.pd
Class PDStampAnnotation
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAnnotation
|
+-de.intarsys.pdf.pd.PDMarkupAnnotation
|
+-de.intarsys.pdf.pd.PDStampAnnotation
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IAdditionalActionSupport

public class PDStampAnnotation


extends PDMarkupAnnotation

A stamp annotation.

Nested Class Summary


class PDStampAnnotation.MetaClass
PDStampAnnotation.MetaClass

Field Summary
public static final CN_DRAFT

public static final CN_Subtype_Stamp

public static final DK_Name

public static final META


The meta class instance

Constructor Summary
public PDStampAnnotation(COSObject object)

Method Summary
COSName getIconName()

COSName setIconName(COSName name)

Fields

Page 1194 of 1521


de.intarsys.pdf.pd.PDStampAnnotation

(continued from last page)

CN_Subtype_Stamp
public static final de.intarsys.pdf.cos.COSName CN_Subtype_Stamp

DK_Name
public static final de.intarsys.pdf.cos.COSName DK_Name

META
public static final de.intarsys.pdf.pd.PDStampAnnotation.MetaClass META

The meta class instance

CN_DRAFT
public static final de.intarsys.pdf.cos.COSName CN_DRAFT

Constructors
PDStampAnnotation
public PDStampAnnotation(COSObject object)

Methods
getIconName
public COSName getIconName()

setIconName
public COSName setIconName(COSName name)

Page 1195 of 1521


de.intarsys.pdf.pd.PDStampAnnotation.MetaClass

de.intarsys.pdf.pd
Class PDStampAnnotation.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAnnotation.MetaClass
|
+-de.intarsys.pdf.pd.PDMarkupAnnotation.MetaClass
|
+-de.intarsys.pdf.pd.PDStampAnnotation.MetaClass

public static class PDStampAnnotation.MetaClass


extends PDMarkupAnnotation.MetaClass

The meta class implementation

Page 1196 of 1521


de.intarsys.pdf.pd.PDStitchingFunction

de.intarsys.pdf.pd
Class PDStitchingFunction
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDFunction
|
+-de.intarsys.pdf.pd.PDStitchingFunction
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDStitchingFunction


extends PDFunction

Function implementation for stitching functions.

Nested Class Summary


class PDStitchingFunction.MetaClass
PDStitchingFunction.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
float[] evaluate(float[] values)

float[] getBounds()

float[] getEncode()

PDFunction[] getFunctions()

int getOutputSize()

Fields
META
public static final de.intarsys.pdf.pd.PDStitchingFunction.MetaClass META

The meta class instance

Page 1197 of 1521


de.intarsys.pdf.pd.PDStitchingFunction

(continued from last page)

Methods
evaluate
public float[] evaluate(float[] values)

getOutputSize
public int getOutputSize()

getBounds
public float[] getBounds()

getEncode
public float[] getEncode()

getFunctions
public PDFunction[] getFunctions()

Page 1198 of 1521


de.intarsys.pdf.pd.PDStitchingFunction.MetaClass

de.intarsys.pdf.pd
Class PDStitchingFunction.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDFunction.MetaClass
|
+-de.intarsys.pdf.pd.PDStitchingFunction.MetaClass

public static class PDStitchingFunction.MetaClass


extends PDFunction.MetaClass

The meta class implementation

Page 1199 of 1521


de.intarsys.pdf.pd.PDTensorProductShading

de.intarsys.pdf.pd
Class PDTensorProductShading
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDShading
|
+-de.intarsys.pdf.pd.PDTensorProductShading
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDTensorProductShading


extends PDShading

Use tensor product shading when filling the shape.

Nested Class Summary


class PDTensorProductShading.MetaClass
PDTensorProductShading.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
int getShadingType()

Fields
META
public static final de.intarsys.pdf.pd.PDTensorProductShading.MetaClass META

The meta class instance

Methods
getShadingType
public int getShadingType()

Page 1200 of 1521


de.intarsys.pdf.pd.PDTensorProductShading.MetaClass

de.intarsys.pdf.pd
Class PDTensorProductShading.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDShading.MetaClass
|
+-de.intarsys.pdf.pd.PDTensorProductShading.MetaClass

public static class PDTensorProductShading.MetaClass


extends PDShading.MetaClass

The meta class implementation

Page 1201 of 1521


de.intarsys.pdf.pd.PDTextAnnotation

de.intarsys.pdf.pd
Class PDTextAnnotation
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAnnotation
|
+-de.intarsys.pdf.pd.PDMarkupAnnotation
|
+-de.intarsys.pdf.pd.PDTextAnnotation
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IAdditionalActionSupport

public class PDTextAnnotation


extends PDMarkupAnnotation

The /Text annotation.

Nested Class Summary


class PDTextAnnotation.MetaClass
PDTextAnnotation.MetaClass

Field Summary
public static final CN_Subtype_Text

public static final META


The meta class instance

Method Summary
String getSubtypeLabel()

boolean isPrint()

boolean supportsPrint()

Fields
META
public static final de.intarsys.pdf.pd.PDTextAnnotation.MetaClass META

The meta class instance

Page 1202 of 1521


de.intarsys.pdf.pd.PDTextAnnotation

(continued from last page)

CN_Subtype_Text
public static final de.intarsys.pdf.cos.COSName CN_Subtype_Text

Methods
getSubtypeLabel
public String getSubtypeLabel()

A java.lang.String representation of this.

isPrint
public boolean isPrint()

Convenience method to access "Print" flag.

supportsPrint
public boolean supportsPrint()

true if print flag can be selected/changed for this kind of annotation.

Page 1203 of 1521


de.intarsys.pdf.pd.PDTextAnnotation.MetaClass

de.intarsys.pdf.pd
Class PDTextAnnotation.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAnnotation.MetaClass
|
+-de.intarsys.pdf.pd.PDMarkupAnnotation.MetaClass
|
+-de.intarsys.pdf.pd.PDTextAnnotation.MetaClass

public static class PDTextAnnotation.MetaClass


extends PDMarkupAnnotation.MetaClass

The meta class implementation

Page 1204 of 1521


de.intarsys.pdf.pd.PDTextMarkupAnnotation

de.intarsys.pdf.pd
Class PDTextMarkupAnnotation
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAnnotation
|
+-de.intarsys.pdf.pd.PDMarkupAnnotation
|
+-de.intarsys.pdf.pd.PDTextMarkupAnnotation
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IAdditionalActionSupport

public class PDTextMarkupAnnotation


extends PDMarkupAnnotation

The text markup (highlight) annotation.

Nested Class Summary


class PDTextMarkupAnnotation.MetaClass
PDTextMarkupAnnotation.MetaClass

Field Summary
public static final CN_Subtype_Highlight

public static final CN_Subtype_Squiggly

public static final CN_Subtype_StrikeOut

public static final CN_Subtype_Underline

public static final DK_QuadPoints

public static final META


The meta class instance

Method Summary
float[] getQuadPoints()

String getSubtypeLabel()

void setQuadPoints(float[] color)

Page 1205 of 1521


de.intarsys.pdf.pd.PDTextMarkupAnnotation

(continued from last page)

Fields
META
public static final de.intarsys.pdf.pd.PDTextMarkupAnnotation.MetaClass META

The meta class instance

DK_QuadPoints
public static final de.intarsys.pdf.cos.COSName DK_QuadPoints

CN_Subtype_Highlight
public static final de.intarsys.pdf.cos.COSName CN_Subtype_Highlight

CN_Subtype_Underline
public static final de.intarsys.pdf.cos.COSName CN_Subtype_Underline

CN_Subtype_Squiggly
public static final de.intarsys.pdf.cos.COSName CN_Subtype_Squiggly

CN_Subtype_StrikeOut
public static final de.intarsys.pdf.cos.COSName CN_Subtype_StrikeOut

Methods
getQuadPoints
public float[] getQuadPoints()

setQuadPoints
public void setQuadPoints(float[] color)

getSubtypeLabel
public String getSubtypeLabel()

A java.lang.String representation of this.

Page 1206 of 1521


de.intarsys.pdf.pd.PDTextMarkupAnnotation.MetaClass

de.intarsys.pdf.pd
Class PDTextMarkupAnnotation.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAnnotation.MetaClass
|
+-de.intarsys.pdf.pd.PDMarkupAnnotation.MetaClass
|
+-de.intarsys.pdf.pd.PDTextMarkupAnnotation.MetaClass

public static class PDTextMarkupAnnotation.MetaClass


extends PDMarkupAnnotation.MetaClass

The meta class implementation

Page 1207 of 1521


de.intarsys.pdf.pd.PDTilingPattern

de.intarsys.pdf.pd
Class PDTilingPattern
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDPattern
|
+-de.intarsys.pdf.pd.PDTilingPattern
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDTilingPattern


extends PDPattern

A tile used to filll the shape.

Nested Class Summary


class PDTilingPattern.MetaClass
PDTilingPattern.MetaClass

Field Summary
public static final META
The meta class instance

Method Summary
int getPatternType()

Fields
META
public static final de.intarsys.pdf.pd.PDTilingPattern.MetaClass META

The meta class instance

Methods
getPatternType
public int getPatternType()

Page 1208 of 1521


de.intarsys.pdf.pd.PDTilingPattern.MetaClass

de.intarsys.pdf.pd
Class PDTilingPattern.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDPattern.MetaClass
|
+-de.intarsys.pdf.pd.PDTilingPattern.MetaClass

public static class PDTilingPattern.MetaClass


extends PDPattern.MetaClass

The meta class implementation

Page 1209 of 1521


de.intarsys.pdf.pd.PDTransformMethod

de.intarsys.pdf.pd
Class PDTransformMethod
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDTransformMethod
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


PDTransformMethodDocMDP, PDTransformMethodFieldMDP, PDTransformMethodIdentity,
PDTransformMethodUR

public class PDTransformMethod


extends PDObject

An abstract implementation of the strategy for computing a signature.

Nested Class Summary


class PDTransformMethod.MetaClass
PDTransformMethod.MetaClass

Field Summary
public static final DK_DocMDP

public static final DK_FieldMDP

public static final DK_Identity

public static final DK_UR

public static final META


The meta class instance

Method Summary
static getSingleton(COSName name)
PDTransformMethod

Fields
DK_DocMDP
public static final de.intarsys.pdf.cos.COSName DK_DocMDP

Page 1210 of 1521


de.intarsys.pdf.pd.PDTransformMethod

(continued from last page)

DK_UR
public static final de.intarsys.pdf.cos.COSName DK_UR

DK_FieldMDP
public static final de.intarsys.pdf.cos.COSName DK_FieldMDP

DK_Identity
public static final de.intarsys.pdf.cos.COSName DK_Identity

META
public static final de.intarsys.pdf.pd.PDTransformMethod.MetaClass META

The meta class instance

Methods
getSingleton
public static PDTransformMethod getSingleton(COSName name)

Page 1211 of 1521


de.intarsys.pdf.pd.PDTransformMethod.MetaClass

de.intarsys.pdf.pd
Class PDTransformMethod.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDTransformMethod.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass, MetaClass, MetaClass

public static class PDTransformMethod.MetaClass


extends PDObject.MetaClass

The meta class implementation

Method Summary
Class getRootClass()

Methods
getRootClass
public Class getRootClass()

Page 1212 of 1521


de.intarsys.pdf.pd.PDTransformMethodDocMDP

de.intarsys.pdf.pd
Class PDTransformMethodDocMDP
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDTransformMethod
|
+-de.intarsys.pdf.pd.PDTransformMethodDocMDP
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDTransformMethodDocMDP


extends PDTransformMethod

The implementation of the DocMDP algorithm.

Nested Class Summary


class PDTransformMethodDocMDP.MetaClass
PDTransformMethodDocMDP.MetaClass

Field Summary
public static final META
The meta class instance

public static SINGLETON


The one and only instance of the transform method.

Fields
META
public static final de.intarsys.pdf.pd.PDTransformMethodDocMDP.MetaClass META

The meta class instance

SINGLETON
public static de.intarsys.pdf.pd.PDTransformMethod SINGLETON

The one and only instance of the transform method.

Page 1213 of 1521


de.intarsys.pdf.pd.PDTransformMethodDocMDP.MetaClass

de.intarsys.pdf.pd
Class PDTransformMethodDocMDP.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDTransformMethod.MetaClass
|
+-de.intarsys.pdf.pd.PDTransformMethodDocMDP.MetaClass

public static class PDTransformMethodDocMDP.MetaClass


extends PDTransformMethod.MetaClass

The meta class implementation

Page 1214 of 1521


de.intarsys.pdf.pd.PDTransformMethodFieldMDP

de.intarsys.pdf.pd
Class PDTransformMethodFieldMDP
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDTransformMethod
|
+-de.intarsys.pdf.pd.PDTransformMethodFieldMDP
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDTransformMethodFieldMDP


extends PDTransformMethod

The implementation of the FieldMDP algorithm.

Nested Class Summary


class PDTransformMethodFieldMDP.MetaClass
PDTransformMethodFieldMDP.MetaClass

Field Summary
public static final META
The meta class instance

public static SINGLETON


The one and only instance of the transform method.

Fields
META
public static final de.intarsys.pdf.pd.PDTransformMethodFieldMDP.MetaClass META

The meta class instance

SINGLETON
public static de.intarsys.pdf.pd.PDTransformMethod SINGLETON

The one and only instance of the transform method.

Page 1215 of 1521


de.intarsys.pdf.pd.PDTransformMethodFieldMDP.MetaClass

de.intarsys.pdf.pd
Class PDTransformMethodFieldMDP.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDTransformMethod.MetaClass
|
+-de.intarsys.pdf.pd.PDTransformMethodFieldMDP.MetaClass

public static class PDTransformMethodFieldMDP.MetaClass


extends PDTransformMethod.MetaClass

The meta class implementation

Page 1216 of 1521


de.intarsys.pdf.pd.PDTransformMethodIdentity

de.intarsys.pdf.pd
Class PDTransformMethodIdentity
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDTransformMethod
|
+-de.intarsys.pdf.pd.PDTransformMethodIdentity
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDTransformMethodIdentity


extends PDTransformMethod

The implementation of the Identity algorithm.

Nested Class Summary


class PDTransformMethodIdentity.MetaClass
PDTransformMethodIdentity.MetaClass

Field Summary
public static final META
The meta class instance

public static SINGLETON


The one and only instance of the transform method.

Fields
META
public static final de.intarsys.pdf.pd.PDTransformMethodIdentity.MetaClass META

The meta class instance

SINGLETON
public static de.intarsys.pdf.pd.PDTransformMethod SINGLETON

The one and only instance of the transform method.

Page 1217 of 1521


de.intarsys.pdf.pd.PDTransformMethodIdentity.MetaClass

de.intarsys.pdf.pd
Class PDTransformMethodIdentity.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDTransformMethod.MetaClass
|
+-de.intarsys.pdf.pd.PDTransformMethodIdentity.MetaClass

public static class PDTransformMethodIdentity.MetaClass


extends PDTransformMethod.MetaClass

The meta class implementation

Page 1218 of 1521


de.intarsys.pdf.pd.PDTransformMethodUR

de.intarsys.pdf.pd
Class PDTransformMethodUR
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDTransformMethod
|
+-de.intarsys.pdf.pd.PDTransformMethodUR
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDTransformMethodUR


extends PDTransformMethod

The implementation of the UR algorithm.

Nested Class Summary


class PDTransformMethodUR.MetaClass
PDTransformMethodUR.MetaClass

Field Summary
public static final META
The meta class instance

public static SINGLETON


The one and only instance of the transform method.

Fields
META
public static final de.intarsys.pdf.pd.PDTransformMethodUR.MetaClass META

The meta class instance

SINGLETON
public static de.intarsys.pdf.pd.PDTransformMethod SINGLETON

The one and only instance of the transform method.

Page 1219 of 1521


de.intarsys.pdf.pd.PDTransformMethodUR.MetaClass

de.intarsys.pdf.pd
Class PDTransformMethodUR.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDTransformMethod.MetaClass
|
+-de.intarsys.pdf.pd.PDTransformMethodUR.MetaClass

public static class PDTransformMethodUR.MetaClass


extends PDTransformMethod.MetaClass

The meta class implementation

Page 1220 of 1521


de.intarsys.pdf.pd.PDTransformParams

de.intarsys.pdf.pd
Class PDTransformParams
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDTransformParams
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class PDTransformParams


extends PDObject

The parameters for the PDTransformMethod algorithms.

Nested Class Summary


class PDTransformParams.MetaClass
PDTransformParams.MetaClass

Field Summary
public static final CN_Type_TransformParams

public static final DK_P

public static final DK_V

public static final META


The meta class instance

Fields
META
public static final de.intarsys.pdf.pd.PDTransformParams.MetaClass META

The meta class instance

CN_Type_TransformParams
public static final de.intarsys.pdf.cos.COSName CN_Type_TransformParams

DK_P
public static final de.intarsys.pdf.cos.COSName DK_P

Page 1221 of 1521


de.intarsys.pdf.pd.PDTransformParams

(continued from last page)

DK_V
public static final de.intarsys.pdf.cos.COSName DK_V

Page 1222 of 1521


de.intarsys.pdf.pd.PDTransformParams.MetaClass

de.intarsys.pdf.pd
Class PDTransformParams.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDTransformParams.MetaClass

public static class PDTransformParams.MetaClass


extends PDObject.MetaClass

The meta class implementation

Page 1223 of 1521


de.intarsys.pdf.pd.PDWidgetAnnotation

de.intarsys.pdf.pd
Class PDWidgetAnnotation
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAnnotation
|
+-de.intarsys.pdf.pd.PDWidgetAnnotation
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IAdditionalActionSupport

public class PDWidgetAnnotation


extends PDAnnotation

The annotation representing a field in an AcroForm.

Nested Class Summary


class PDWidgetAnnotation.MetaClass
PDWidgetAnnotation.MetaClass

Field Summary
public static final CN_H_I
highlightning: I: Invert

public static final CN_H_N


highlightning: N: None

public static final CN_H_O


highlightning: O: Outline

public static final CN_H_P


highlightning: P: Push

public static final CN_H_T


highlightning: T: Toggle

public static final CN_State_Off

public static final CN_Subtype_Widget

public static final DK_H


Highlighting Mode

public static final DK_MK

public static final META


The meta class instance

Page 1224 of 1521


de.intarsys.pdf.pd.PDWidgetAnnotation

Method Summary
boolean canReceiveFocus()

COSObject cosSetField(COSName name, COSObject cosObj)

void dispose()

PDAcroFormField getAcroFormField()

COSName getAltAppearanceState()

PDAppearanceCharacter getAppearanceCharacteristics()
istics

COSName getHighlightingMode()

CDSRectangle getNormalizedRectangle()

String getSubtypeLabel()

boolean isOff()

boolean isWidgetAnnotation()

void setAppearanceCharacteristics(PDAppearanceCharacteristics
newAppearanceCharacteristics)

void setHighlightingMode(COSName newHighlightingMode)

void transform(CDSRectangle rect, CDSMatrix matrix)


Change a given rectangle and matrix (belonging to a form) according to the annotations
defined rotation.

Fields
META
public static final de.intarsys.pdf.pd.PDWidgetAnnotation.MetaClass META

The meta class instance

DK_H
public static final de.intarsys.pdf.cos.COSName DK_H

Highlighting Mode

CN_H_N
public static final de.intarsys.pdf.cos.COSName CN_H_N

Page 1225 of 1521


de.intarsys.pdf.pd.PDWidgetAnnotation

(continued from last page)

highlightning: N: None

CN_H_I
public static final de.intarsys.pdf.cos.COSName CN_H_I

highlightning: I: Invert

CN_H_O
public static final de.intarsys.pdf.cos.COSName CN_H_O

highlightning: O: Outline

CN_H_P
public static final de.intarsys.pdf.cos.COSName CN_H_P

highlightning: P: Push

CN_H_T
public static final de.intarsys.pdf.cos.COSName CN_H_T

highlightning: T: Toggle

DK_MK
public static final de.intarsys.pdf.cos.COSName DK_MK

CN_Subtype_Widget
public static final de.intarsys.pdf.cos.COSName CN_Subtype_Widget

CN_State_Off
public static final de.intarsys.pdf.cos.COSName CN_State_Off

Methods
getAcroFormField
public PDAcroFormField getAcroFormField()

getAltAppearanceState
public COSName getAltAppearanceState()

Page 1226 of 1521


de.intarsys.pdf.pd.PDWidgetAnnotation

setAppearanceCharacteristics
public void setAppearanceCharacteristics(PDAppearanceCharacteristics
newAppearanceCharacteristics)

getAppearanceCharacteristics
public PDAppearanceCharacteristics getAppearanceCharacteristics()

setHighlightingMode
public void setHighlightingMode(COSName newHighlightingMode)

getHighlightingMode
public COSName getHighlightingMode()

getNormalizedRectangle
public CDSRectangle getNormalizedRectangle()

Convenience method to access a normalized copy of the receivers rectangle.

isOff
public boolean isOff()

isWidgetAnnotation
public boolean isWidgetAnnotation()

true if this is a PDWidgetAnnotation.

canReceiveFocus
public boolean canReceiveFocus()

true if this can receive the focus in an interactive viewer.

transform
public void transform(CDSRectangle rect,
CDSMatrix matrix)

Change a given rectangle and matrix (belonging to a form) according to the annotations defined rotation.

Parameters:

Page 1227 of 1521


de.intarsys.pdf.pd.PDWidgetAnnotation

(continued from last page)

rect - The rectangle to transform


matrix - The matrix to change

getSubtypeLabel
public String getSubtypeLabel()

A java.lang.String representation of this.

dispose
public void dispose()

cosSetField
public COSObject cosSetField(COSName name,
COSObject cosObj)

Set a field value in this. The previously associated object is returned.

This method requires the base object to be a COSDictionary.

Page 1228 of 1521


de.intarsys.pdf.pd.PDWidgetAnnotation.MetaClass

de.intarsys.pdf.pd
Class PDWidgetAnnotation.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAnnotation.MetaClass
|
+-de.intarsys.pdf.pd.PDWidgetAnnotation.MetaClass

public static class PDWidgetAnnotation.MetaClass


extends PDAnnotation.MetaClass

The meta class implementation

Page 1229 of 1521


de.intarsys.pdf.pd.PDXObject

de.intarsys.pdf.pd
Class PDXObject
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDXObject
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

Direct Known Subclasses:


PDForm, PDImage, PDPostScript

public abstract class PDXObject


extends PDObject

The representation of a XObject. A XObject defines a strokable object. The content is defined in the underlying content stream.

Nested Class Summary


class PDXObject.MetaClass
PDXObject.MetaClass

Field Summary
public static final CN_Type_XObject

public static final DK_Resources

public static final META


The meta class instance

Method Summary
COSDictionary cosGetDict()

byte[] getBytes()
The data representing the XObject

boolean isForm()
true if this is a form.

boolean isImage()
true if this is an image.

boolean isPostscript()
true if this is a postscript object.

void setBytes(byte[] bytes)


Set the data representing the XObject

Page 1230 of 1521


de.intarsys.pdf.pd.PDXObject

Fields
META
public static final de.intarsys.pdf.pd.PDXObject.MetaClass META

The meta class instance

DK_Resources
public static final de.intarsys.pdf.cos.COSName DK_Resources

CN_Type_XObject
public static final de.intarsys.pdf.cos.COSName CN_Type_XObject

Methods
cosGetDict
public COSDictionary cosGetDict()

Get the base object as a COSDictionary.

This will throw a java.lang.ClassCastException if the base type is not appropriate!

getBytes
public byte[] getBytes()

The data representing the XObject

Returns:
The data representing the XObject

isForm
public boolean isForm()

true if this is a form.

Returns:
true if this is a form.

isImage
public boolean isImage()

true if this is an image.

Returns:
true if this is an image.

Page 1231 of 1521


de.intarsys.pdf.pd.PDXObject

isPostscript
public boolean isPostscript()

true if this is a postscript object.

Returns:
true if this is a postscript object.

setBytes
public void setBytes(byte[] bytes)

Set the data representing the XObject

Parameters:
bytes - The data representing the XObject

Page 1232 of 1521


de.intarsys.pdf.pd.PDXObject.MetaClass

de.intarsys.pdf.pd
Class PDXObject.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDXObject.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass, MetaClass

public static class PDXObject.MetaClass


extends PDObject.MetaClass

The meta class implementation

Method Summary
Class getRootClass()

Methods
getRootClass
public Class getRootClass()

Page 1233 of 1521


de.intarsys.pdf.pd.SubmitFormFlags

de.intarsys.pdf.pd
Class SubmitFormFlags
java.lang.Object
|
+-de.intarsys.pdf.pd.AbstractBitFlags
|
+-de.intarsys.pdf.pd.SubmitFormFlags

public class SubmitFormFlags


extends AbstractBitFlags

The flags for subimtting a form

The flags are bits of an integer.


The following bits are defined (more may exist).

• 0: include
• 1: include no value fields
• 2: export format
• 3: get method
• 4: submit coordinates
• 5: XFDF
• 6: include append saves
• 7: include annotations
• 8: submit PDF
• 9: canonical format
• 10: exclude non user annotations
• 11: exclude F key
• 12: not defined
• 13: embed form

Field Summary
public static final Bit_CanonicalFormat

Value: 512

public static final Bit_EmbedForm

Value: 8192

public static final Bit_ExclFKey

Value: 2048

public static final Bit_ExclNonUserAnnots

Value: 1024

public static final Bit_ExportFormat

Value: 4

public static final Bit_GetMethod

Value: 8

Page 1234 of 1521


de.intarsys.pdf.pd.SubmitFormFlags

public static final Bit_Include

Value: 1

public static final Bit_IncludeAnnotations

Value: 128

public static final Bit_IncludeAppendSaves

Value: 64

public static final Bit_IncludeNoValueFields

Value: 2

public static final Bit_NotDEFINED

Value: 4096

public static final Bit_SubmitCoordinates

Value: 16

public static final Bit_SubmitPDF

Value: 256

public static final Bit_XFDF

Value: 32

Constructor Summary
public SubmitFormFlags(PDActionSubmitForm submitForm)

Method Summary
boolean isCanonicalFormat()

boolean isEmbedForm()

boolean isExclFKey()

boolean isExclNonUserAnnots()

boolean isExportFormat()

boolean isGetMethod()

boolean isInclude()

boolean isIncludeAnnotations()

boolean isIncludeAppendSaves()

Page 1235 of 1521


de.intarsys.pdf.pd.SubmitFormFlags

boolean isIncludeNoValueFields()

boolean isNotDEFINED()

boolean isSubmitCoordinates()

boolean isSubmitPDF()

boolean isXFDF()

void setCanonicalFormat(boolean flag)

void setEmbedForm(boolean flag)

void setExclFKey(boolean flag)

void setExclNonUserAnnots(boolean flag)

void setExportFormat(boolean flag)

void setGetMethod(boolean flag)

void setInclude(boolean flag)

void setIncludeAnnotations(boolean flag)

void setIncludeAppendSaves(boolean flag)

void setIncludeNoValueFields(boolean flag)

void setNotDEFINED(boolean flag)

void setSubmitCoordinates(boolean flag)

void setSubmitPDF(boolean flag)

void setXFDF(boolean flag)

Fields
Bit_Include
public static final int Bit_Include

Constant value: 1

Page 1236 of 1521


de.intarsys.pdf.pd.SubmitFormFlags

(continued from last page)

Bit_IncludeNoValueFields
public static final int Bit_IncludeNoValueFields

Constant value: 2

Bit_ExportFormat
public static final int Bit_ExportFormat

Constant value: 4

Bit_GetMethod
public static final int Bit_GetMethod

Constant value: 8

Bit_SubmitCoordinates
public static final int Bit_SubmitCoordinates

Constant value: 16

Bit_XFDF
public static final int Bit_XFDF

Constant value: 32

Bit_IncludeAppendSaves
public static final int Bit_IncludeAppendSaves

Constant value: 64

Bit_IncludeAnnotations
public static final int Bit_IncludeAnnotations

Constant value: 128

Bit_SubmitPDF
public static final int Bit_SubmitPDF

Constant value: 256

Bit_CanonicalFormat
public static final int Bit_CanonicalFormat

Page 1237 of 1521


de.intarsys.pdf.pd.SubmitFormFlags

(continued from last page)

Constant value: 512

Bit_ExclNonUserAnnots
public static final int Bit_ExclNonUserAnnots

Constant value: 1024

Bit_ExclFKey
public static final int Bit_ExclFKey

Constant value: 2048

Bit_NotDEFINED
public static final int Bit_NotDEFINED

Constant value: 4096

Bit_EmbedForm
public static final int Bit_EmbedForm

Constant value: 8192

Constructors
SubmitFormFlags
public SubmitFormFlags(PDActionSubmitForm submitForm)

Methods
setCanonicalFormat
public void setCanonicalFormat(boolean flag)

isCanonicalFormat
public boolean isCanonicalFormat()

setEmbedForm
public void setEmbedForm(boolean flag)

Page 1238 of 1521


de.intarsys.pdf.pd.SubmitFormFlags

isEmbedForm
public boolean isEmbedForm()

setExclFKey
public void setExclFKey(boolean flag)

isExclFKey
public boolean isExclFKey()

setExclNonUserAnnots
public void setExclNonUserAnnots(boolean flag)

isExclNonUserAnnots
public boolean isExclNonUserAnnots()

setExportFormat
public void setExportFormat(boolean flag)

isExportFormat
public boolean isExportFormat()

setGetMethod
public void setGetMethod(boolean flag)

isGetMethod
public boolean isGetMethod()

setInclude
public void setInclude(boolean flag)

Page 1239 of 1521


de.intarsys.pdf.pd.SubmitFormFlags

(continued from last page)

isInclude
public boolean isInclude()

setIncludeAnnotations
public void setIncludeAnnotations(boolean flag)

isIncludeAnnotations
public boolean isIncludeAnnotations()

setIncludeAppendSaves
public void setIncludeAppendSaves(boolean flag)

isIncludeAppendSaves
public boolean isIncludeAppendSaves()

setIncludeNoValueFields
public void setIncludeNoValueFields(boolean flag)

isIncludeNoValueFields
public boolean isIncludeNoValueFields()

setNotDEFINED
public void setNotDEFINED(boolean flag)

isNotDEFINED
public boolean isNotDEFINED()

Page 1240 of 1521


de.intarsys.pdf.pd.SubmitFormFlags

(continued from last page)

setSubmitCoordinates
public void setSubmitCoordinates(boolean flag)

isSubmitCoordinates
public boolean isSubmitCoordinates()

setSubmitPDF
public void setSubmitPDF(boolean flag)

isSubmitPDF
public boolean isSubmitPDF()

setXFDF
public void setXFDF(boolean flag)

isXFDF
public boolean isXFDF()

Page 1241 of 1521


Package
de.intarsys.pdf.postscript
A simple generated parser/interpreter for PDF embedded postscript.

Page 1242 of 1521


de.intarsys.pdf.postscript.Handler

de.intarsys.pdf.postscript
Class Handler
java.lang.Object
|
+-de.intarsys.pdf.postscript.Handler

public class Handler


extends Object

Very simple class to execute postscript code as it it parsed (which means to execute it again you have to parse it again)

Constructor Summary
public Handler()

Method Summary
java.util.List popResult()

void processEndArray()

void processEndProcedure()

void processIdentifier(String string)

void processImmediateIdentifier(String string)

void processKeyIdentifier(String string)

void processLiteral(double d)

void processLiteral(int i)

void processLiteral(String string)

void processStartArray()

void processStartProcedure()

void pushArgs(java.util.List args)

Constructors
Handler
public Handler()

Page 1243 of 1521


de.intarsys.pdf.postscript.Handler

(continued from last page)

Methods
popResult
public java.util.List popResult()

processEndArray
public void processEndArray()

processEndProcedure
public void processEndProcedure()

processIdentifier
public void processIdentifier(String string)
throws ParseException

processImmediateIdentifier
public void processImmediateIdentifier(String string)

processKeyIdentifier
public void processKeyIdentifier(String string)

processLiteral
public void processLiteral(double d)

processLiteral
public void processLiteral(int i)

processLiteral
public void processLiteral(String string)

Page 1244 of 1521


de.intarsys.pdf.postscript.Handler

processStartArray
public void processStartArray()

processStartProcedure
public void processStartProcedure()

pushArgs
public void pushArgs(java.util.List args)

Page 1245 of 1521


de.intarsys.pdf.postscript.IOperator

de.intarsys.pdf.postscript
Interface IOperator
All Known Implementing Classes:
Operator_abs, Operator_add, Operator_and, Operator_atan, Operator_bitshift, Operator_ceiling,
Operator_copy, Operator_cos, Operator_cvi, Operator_cvr, Operator_div, Operator_dup, Operator_eq,
Operator_exch, Operator_exp, Operator_false, Operator_floor, Operator_ge, Operator_gt, Operator_idiv,
Operator_if, Operator_ifelse, Operator_index, Operator_le, Operator_ln, Operator_log, Operator_lt,
Operator_mod, Operator_mul, Operator_ne, Operator_neg, Operator_not, Operator_or, Operator_pop,
Operator_roll, Operator_round, Operator_sin, Operator_sqrt, Operator_sub, Operator_true, Operator_truncate,
Operator_xor

public interface IOperator


extends

Method Summary
void execute(java.util.Stack stack)

Methods
execute
public void execute(java.util.Stack stack)
throws ParseException

Page 1246 of 1521


de.intarsys.pdf.postscript.JavaCharStream

de.intarsys.pdf.postscript
Class JavaCharStream
java.lang.Object
|
+-de.intarsys.pdf.postscript.JavaCharStream

public class JavaCharStream


extends Object

An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (with java-like unicode
escape processing).

Field Summary
public bufpos

public static final staticFlag

Value: false

Constructor Summary
public JavaCharStream(java.io.Reader dstream, int startline, int startcolumn,
int buffersize)

public JavaCharStream(java.io.Reader dstream, int startline, int startcolumn)

public JavaCharStream(java.io.Reader dstream)

public JavaCharStream(java.io.InputStream dstream, String encoding, int


startline, int startcolumn, int buffersize)

public JavaCharStream(java.io.InputStream dstream, int startline, int


startcolumn, int buffersize)

public JavaCharStream(java.io.InputStream dstream, String encoding, int


startline, int startcolumn)

public JavaCharStream(java.io.InputStream dstream, int startline, int


startcolumn)

public JavaCharStream(java.io.InputStream dstream, String encoding)

public JavaCharStream(java.io.InputStream dstream)

Method Summary
void adjustBeginLineColumn(int newLine, int newCol)
Method to adjust line and column numbers for the start of a token.

Page 1247 of 1521


de.intarsys.pdf.postscript.JavaCharStream

void backup(int amount)

char BeginToken()

void Done()

int getBeginColumn()

int getBeginLine()

int getColumn()
Deprecated.

int getEndColumn()

int getEndLine()

String GetImage()

int getLine()
Deprecated.

char[] GetSuffix(int len)

char readChar()

void ReInit(java.io.InputStream dstream)

void ReInit(java.io.InputStream dstream, int startline, int startcolumn)

void ReInit(java.io.InputStream dstream, int startline, int startcolumn, int


buffersize)

void ReInit(java.io.InputStream dstream, String encoding)

void ReInit(java.io.InputStream dstream, String encoding, int startline, int


startcolumn)

void ReInit(java.io.InputStream dstream, String encoding, int startline, int


startcolumn, int buffersize)

void ReInit(java.io.Reader dstream)

void ReInit(java.io.Reader dstream, int startline, int startcolumn)

void ReInit(java.io.Reader dstream, int startline, int startcolumn, int


buffersize)

Fields

Page 1248 of 1521


de.intarsys.pdf.postscript.JavaCharStream

(continued from last page)

staticFlag
public static final boolean staticFlag

Constant value: false

bufpos
public int bufpos

Constructors
JavaCharStream
public JavaCharStream(java.io.Reader dstream,
int startline,
int startcolumn,
int buffersize)

JavaCharStream
public JavaCharStream(java.io.Reader dstream,
int startline,
int startcolumn)

JavaCharStream
public JavaCharStream(java.io.Reader dstream)

JavaCharStream
public JavaCharStream(java.io.InputStream dstream,
String encoding,
int startline,
int startcolumn,
int buffersize)

JavaCharStream
public JavaCharStream(java.io.InputStream dstream,
int startline,
int startcolumn,
int buffersize)

Page 1249 of 1521


de.intarsys.pdf.postscript.JavaCharStream

(continued from last page)

JavaCharStream
public JavaCharStream(java.io.InputStream dstream,
String encoding,
int startline,
int startcolumn)

JavaCharStream
public JavaCharStream(java.io.InputStream dstream,
int startline,
int startcolumn)

JavaCharStream
public JavaCharStream(java.io.InputStream dstream,
String encoding)

JavaCharStream
public JavaCharStream(java.io.InputStream dstream)

Methods
BeginToken
public char BeginToken()
throws java.io.IOException

readChar
public char readChar()
throws java.io.IOException

getColumn
public int getColumn()

Deprecated.

See Also:
getEndColumn()

Page 1250 of 1521


de.intarsys.pdf.postscript.JavaCharStream

(continued from last page)

getLine
public int getLine()

Deprecated.

See Also:
getEndLine()

getEndColumn
public int getEndColumn()

getEndLine
public int getEndLine()

getBeginColumn
public int getBeginColumn()

getBeginLine
public int getBeginLine()

backup
public void backup(int amount)

ReInit
public void ReInit(java.io.Reader dstream,
int startline,
int startcolumn,
int buffersize)

ReInit
public void ReInit(java.io.Reader dstream,
int startline,
int startcolumn)

Page 1251 of 1521


de.intarsys.pdf.postscript.JavaCharStream

(continued from last page)

ReInit
public void ReInit(java.io.Reader dstream)

ReInit
public void ReInit(java.io.InputStream dstream,
String encoding,
int startline,
int startcolumn,
int buffersize)
throws java.io.UnsupportedEncodingException

ReInit
public void ReInit(java.io.InputStream dstream,
int startline,
int startcolumn,
int buffersize)

ReInit
public void ReInit(java.io.InputStream dstream,
String encoding,
int startline,
int startcolumn)
throws java.io.UnsupportedEncodingException

ReInit
public void ReInit(java.io.InputStream dstream,
int startline,
int startcolumn)

ReInit
public void ReInit(java.io.InputStream dstream,
String encoding)
throws java.io.UnsupportedEncodingException

ReInit
public void ReInit(java.io.InputStream dstream)

Page 1252 of 1521


de.intarsys.pdf.postscript.JavaCharStream

(continued from last page)

GetImage
public String GetImage()

GetSuffix
public char[] GetSuffix(int len)

Done
public void Done()

adjustBeginLineColumn
public void adjustBeginLineColumn(int newLine,
int newCol)

Method to adjust line and column numbers for the start of a token.

Page 1253 of 1521


de.intarsys.pdf.postscript.Operator_abs

de.intarsys.pdf.postscript
Class Operator_abs
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_abs
All Implemented Interfaces:
IOperator

public class Operator_abs


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_abs Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1254 of 1521


de.intarsys.pdf.postscript.Operator_add

de.intarsys.pdf.postscript
Class Operator_add
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_add
All Implemented Interfaces:
IOperator

public class Operator_add


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_add Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1255 of 1521


de.intarsys.pdf.postscript.Operator_and

de.intarsys.pdf.postscript
Class Operator_and
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_and
All Implemented Interfaces:
IOperator

public class Operator_and


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_and Instance

Methods
execute
public void execute(java.util.Stack stack)
throws ParseException

Page 1256 of 1521


de.intarsys.pdf.postscript.Operator_atan

de.intarsys.pdf.postscript
Class Operator_atan
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_atan
All Implemented Interfaces:
IOperator

public class Operator_atan


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_atan Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1257 of 1521


de.intarsys.pdf.postscript.Operator_bitshift

de.intarsys.pdf.postscript
Class Operator_bitshift
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_bitshift
All Implemented Interfaces:
IOperator

public class Operator_bitshift


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_bitshift Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1258 of 1521


de.intarsys.pdf.postscript.Operator_ceiling

de.intarsys.pdf.postscript
Class Operator_ceiling
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_ceiling
All Implemented Interfaces:
IOperator

public class Operator_ceiling


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_ceiling Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1259 of 1521


de.intarsys.pdf.postscript.Operator_copy

de.intarsys.pdf.postscript
Class Operator_copy
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_copy
All Implemented Interfaces:
IOperator

public class Operator_copy


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_copy Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1260 of 1521


de.intarsys.pdf.postscript.Operator_cos

de.intarsys.pdf.postscript
Class Operator_cos
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_cos
All Implemented Interfaces:
IOperator

public class Operator_cos


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_cos Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1261 of 1521


de.intarsys.pdf.postscript.Operator_cvi

de.intarsys.pdf.postscript
Class Operator_cvi
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_cvi
All Implemented Interfaces:
IOperator

public class Operator_cvi


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_cvi Instance

Methods
execute
public void execute(java.util.Stack stack)
throws ParseException

Page 1262 of 1521


de.intarsys.pdf.postscript.Operator_cvr

de.intarsys.pdf.postscript
Class Operator_cvr
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_cvr
All Implemented Interfaces:
IOperator

public class Operator_cvr


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_cvr Instance

Methods
execute
public void execute(java.util.Stack stack)
throws ParseException

Page 1263 of 1521


de.intarsys.pdf.postscript.Operator_div

de.intarsys.pdf.postscript
Class Operator_div
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_div
All Implemented Interfaces:
IOperator

public class Operator_div


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_div Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1264 of 1521


de.intarsys.pdf.postscript.Operator_dup

de.intarsys.pdf.postscript
Class Operator_dup
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_dup
All Implemented Interfaces:
IOperator

public class Operator_dup


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_dup Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1265 of 1521


de.intarsys.pdf.postscript.Operator_eq

de.intarsys.pdf.postscript
Class Operator_eq
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_eq
All Implemented Interfaces:
IOperator

public class Operator_eq


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_eq Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1266 of 1521


de.intarsys.pdf.postscript.Operator_exch

de.intarsys.pdf.postscript
Class Operator_exch
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_exch
All Implemented Interfaces:
IOperator

public class Operator_exch


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_exch Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1267 of 1521


de.intarsys.pdf.postscript.Operator_exp

de.intarsys.pdf.postscript
Class Operator_exp
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_exp
All Implemented Interfaces:
IOperator

public class Operator_exp


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_exp Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1268 of 1521


de.intarsys.pdf.postscript.Operator_false

de.intarsys.pdf.postscript
Class Operator_false
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_false
All Implemented Interfaces:
IOperator

public class Operator_false


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_false Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1269 of 1521


de.intarsys.pdf.postscript.Operator_floor

de.intarsys.pdf.postscript
Class Operator_floor
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_floor
All Implemented Interfaces:
IOperator

public class Operator_floor


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_floor Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1270 of 1521


de.intarsys.pdf.postscript.Operator_ge

de.intarsys.pdf.postscript
Class Operator_ge
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_ge
All Implemented Interfaces:
IOperator

public class Operator_ge


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_ge Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1271 of 1521


de.intarsys.pdf.postscript.Operator_gt

de.intarsys.pdf.postscript
Class Operator_gt
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_gt
All Implemented Interfaces:
IOperator

public class Operator_gt


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_gt Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1272 of 1521


de.intarsys.pdf.postscript.Operator_idiv

de.intarsys.pdf.postscript
Class Operator_idiv
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_idiv
All Implemented Interfaces:
IOperator

public class Operator_idiv


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_idiv Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1273 of 1521


de.intarsys.pdf.postscript.Operator_if

de.intarsys.pdf.postscript
Class Operator_if
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_if
All Implemented Interfaces:
IOperator

public class Operator_if


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_if Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1274 of 1521


de.intarsys.pdf.postscript.Operator_ifelse

de.intarsys.pdf.postscript
Class Operator_ifelse
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_ifelse
All Implemented Interfaces:
IOperator

public class Operator_ifelse


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_ifelse Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1275 of 1521


de.intarsys.pdf.postscript.Operator_index

de.intarsys.pdf.postscript
Class Operator_index
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_index
All Implemented Interfaces:
IOperator

public class Operator_index


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_index Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1276 of 1521


de.intarsys.pdf.postscript.Operator_le

de.intarsys.pdf.postscript
Class Operator_le
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_le
All Implemented Interfaces:
IOperator

public class Operator_le


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_le Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1277 of 1521


de.intarsys.pdf.postscript.Operator_ln

de.intarsys.pdf.postscript
Class Operator_ln
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_ln
All Implemented Interfaces:
IOperator

public class Operator_ln


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_ln Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1278 of 1521


de.intarsys.pdf.postscript.Operator_log

de.intarsys.pdf.postscript
Class Operator_log
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_log
All Implemented Interfaces:
IOperator

public class Operator_log


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_log Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1279 of 1521


de.intarsys.pdf.postscript.Operator_lt

de.intarsys.pdf.postscript
Class Operator_lt
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_lt
All Implemented Interfaces:
IOperator

public class Operator_lt


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_lt Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1280 of 1521


de.intarsys.pdf.postscript.Operator_mod

de.intarsys.pdf.postscript
Class Operator_mod
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_mod
All Implemented Interfaces:
IOperator

public class Operator_mod


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_mod Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1281 of 1521


de.intarsys.pdf.postscript.Operator_mul

de.intarsys.pdf.postscript
Class Operator_mul
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_mul
All Implemented Interfaces:
IOperator

public class Operator_mul


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_mul Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1282 of 1521


de.intarsys.pdf.postscript.Operator_ne

de.intarsys.pdf.postscript
Class Operator_ne
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_ne
All Implemented Interfaces:
IOperator

public class Operator_ne


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_ne Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1283 of 1521


de.intarsys.pdf.postscript.Operator_neg

de.intarsys.pdf.postscript
Class Operator_neg
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_neg
All Implemented Interfaces:
IOperator

public class Operator_neg


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_neg Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1284 of 1521


de.intarsys.pdf.postscript.Operator_not

de.intarsys.pdf.postscript
Class Operator_not
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_not
All Implemented Interfaces:
IOperator

public class Operator_not


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_not Instance

Methods
execute
public void execute(java.util.Stack stack)
throws ParseException

Page 1285 of 1521


de.intarsys.pdf.postscript.Operator_or

de.intarsys.pdf.postscript
Class Operator_or
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_or
All Implemented Interfaces:
IOperator

public class Operator_or


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_or Instance

Methods
execute
public void execute(java.util.Stack stack)
throws ParseException

Page 1286 of 1521


de.intarsys.pdf.postscript.Operator_pop

de.intarsys.pdf.postscript
Class Operator_pop
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_pop
All Implemented Interfaces:
IOperator

public class Operator_pop


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_pop Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1287 of 1521


de.intarsys.pdf.postscript.Operator_roll

de.intarsys.pdf.postscript
Class Operator_roll
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_roll
All Implemented Interfaces:
IOperator

public class Operator_roll


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_roll Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1288 of 1521


de.intarsys.pdf.postscript.Operator_round

de.intarsys.pdf.postscript
Class Operator_round
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_round
All Implemented Interfaces:
IOperator

public class Operator_round


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_round Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1289 of 1521


de.intarsys.pdf.postscript.Operator_sin

de.intarsys.pdf.postscript
Class Operator_sin
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_sin
All Implemented Interfaces:
IOperator

public class Operator_sin


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_sin Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1290 of 1521


de.intarsys.pdf.postscript.Operator_sqrt

de.intarsys.pdf.postscript
Class Operator_sqrt
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_sqrt
All Implemented Interfaces:
IOperator

public class Operator_sqrt


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_sqrt Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1291 of 1521


de.intarsys.pdf.postscript.Operator_sub

de.intarsys.pdf.postscript
Class Operator_sub
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_sub
All Implemented Interfaces:
IOperator

public class Operator_sub


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_sub Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1292 of 1521


de.intarsys.pdf.postscript.Operator_true

de.intarsys.pdf.postscript
Class Operator_true
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_true
All Implemented Interfaces:
IOperator

public class Operator_true


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_true Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1293 of 1521


de.intarsys.pdf.postscript.Operator_truncate

de.intarsys.pdf.postscript
Class Operator_truncate
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_truncate
All Implemented Interfaces:
IOperator

public class Operator_truncate


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_truncate Instance

Methods
execute
public void execute(java.util.Stack stack)

Page 1294 of 1521


de.intarsys.pdf.postscript.Operator_xor

de.intarsys.pdf.postscript
Class Operator_xor
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_xor
All Implemented Interfaces:
IOperator

public class Operator_xor


extends Object
implements IOperator

Field Summary
public static Instance

Method Summary
void execute(java.util.Stack stack)

Fields
Instance
public static de.intarsys.pdf.postscript.Operator_xor Instance

Methods
execute
public void execute(java.util.Stack stack)
throws ParseException

Page 1295 of 1521


de.intarsys.pdf.postscript.ParseException

de.intarsys.pdf.postscript
Class ParseException
java.lang.Object
|
+-java.lang.Throwable
|
+-java.lang.Exception
|
+-de.intarsys.pdf.postscript.ParseException
All Implemented Interfaces:
java.io.Serializable

public class ParseException


extends Exception

This exception is thrown when parse errors are encountered. You can explicitly create objects of this exception type by calling the
method generateParseException in the generated parser. You can modify this class to customize your error reporting mechanisms
so long as you retain the public fields.

Field Summary
public currentToken
This is the last token that has been consumed successfully.

public expectedTokenSequences
Each entry in this array is an array of integers.

public tokenImage
This is a reference to the "tokenImage" array of the generated parser within which the parse
error occurred.

Constructor Summary
public ParseException()
The following constructors are for use by you for whatever purpose you can think of.

public ParseException(String message)

public ParseException(Throwable cause)

public ParseException(Token currentTokenVal, int[][]


expectedTokenSequencesVal, String[] tokenImageVal)
This constructor is used by the method "generateParseException" in the generated parser.

Method Summary
String getMessage()
This method has the standard behavior when this object has been created using the standard
constructors.

Fields

Page 1296 of 1521


de.intarsys.pdf.postscript.ParseException

(continued from last page)

currentToken
public de.intarsys.pdf.postscript.Token currentToken

This is the last token that has been consumed successfully. If this object has been created due to a parse error, the token
followng this token will (therefore) be the first error token.

expectedTokenSequences
public int expectedTokenSequences

Each entry in this array is an array of integers. Each array of integers represents a sequence of tokens (by their ordinal
values) that is expected at this point of the parse.

tokenImage
public java.lang.String tokenImage

This is a reference to the "tokenImage" array of the generated parser within which the parse error occurred. This array is
defined in the generated ...Constants interface.

Constructors
ParseException
public ParseException()

The following constructors are for use by you for whatever purpose you can think of. Constructing the exception in this
manner makes the exception behave in the normal way - i.e., as documented in the class "Throwable". The fields
"errorToken", "expectedTokenSequences", and "tokenImage" do not contain relevant information. The JavaCC generated
code does not use these constructors.

ParseException
public ParseException(String message)

ParseException
public ParseException(Throwable cause)

ParseException
public ParseException(Token currentTokenVal,
int[][] expectedTokenSequencesVal,
String[] tokenImageVal)

This constructor is used by the method "generateParseException" in the generated parser. Calling this constructor generates
a new object of this type with the fields "currentToken", "expectedTokenSequences", and "tokenImage" set. The boolean
flag "specialConstructor" is also set to true to indicate that this constructor was used to create this object. This constructor
calls its super class with the empty string to force the "toString" method of parent class "Throwable" to print the error
message in the form: ParseException:

Methods

Page 1297 of 1521


de.intarsys.pdf.postscript.ParseException

(continued from last page)

getMessage
public String getMessage()

This method has the standard behavior when this object has been created using the standard constructors. Otherwise, it uses
"currentToken" and "expectedTokenSequences" to generate a parse error message and returns it. If this object has been
created due to a parse error, and you do not catch it (it gets thrown from the parser), then this method is called during the
printing of the final stack trace, and hence the correct error message gets displayed.

Page 1298 of 1521


de.intarsys.pdf.postscript.Parser

de.intarsys.pdf.postscript
Class Parser
java.lang.Object
|
+-de.intarsys.pdf.postscript.Parser
All Implemented Interfaces:
ParserConstants

public class Parser


extends Object
implements ParserConstants

Field Summary
public jj_nt

public token

public token_source

Constructor Summary
public Parser(java.io.InputStream stream)

public Parser(java.io.InputStream stream, String encoding)

public Parser(java.io.Reader stream)

public Parser(ParserTokenManager tm)

Method Summary
void disable_tracing()

void enable_tracing()

ParseException generateParseException()

Token getNextToken()

Token getToken(int index)

void parse(Handler handler)

void ReInit(java.io.InputStream stream)

Page 1299 of 1521


de.intarsys.pdf.postscript.Parser

void ReInit(java.io.InputStream stream, String encoding)

void ReInit(ParserTokenManager tm)

void ReInit(java.io.Reader stream)

Fields
token
public de.intarsys.pdf.postscript.Token token

jj_nt
public de.intarsys.pdf.postscript.Token jj_nt

token_source
public de.intarsys.pdf.postscript.ParserTokenManager token_source

Constructors
Parser
public Parser(java.io.InputStream stream)

Parser
public Parser(java.io.InputStream stream,
String encoding)

Parser
public Parser(java.io.Reader stream)

Parser
public Parser(ParserTokenManager tm)

Methods

Page 1300 of 1521


de.intarsys.pdf.postscript.Parser

(continued from last page)

disable_tracing
public final void disable_tracing()

enable_tracing
public final void enable_tracing()

generateParseException
public ParseException generateParseException()

getNextToken
public final Token getNextToken()

getToken
public final Token getToken(int index)

parse
public final void parse(Handler handler)
throws ParseException

ReInit
public void ReInit(java.io.InputStream stream)

ReInit
public void ReInit(java.io.InputStream stream,
String encoding)

ReInit
public void ReInit(java.io.Reader stream)

Page 1301 of 1521


de.intarsys.pdf.postscript.Parser

(continued from last page)

ReInit
public void ReInit(ParserTokenManager tm)

Page 1302 of 1521


de.intarsys.pdf.postscript.ParserConstants

de.intarsys.pdf.postscript
Interface ParserConstants
All Known Implementing Classes:
Parser, ParserTokenManager

public interface ParserConstants


extends

Field Summary
public static final DECIMAL_LITERAL

Value: 4

public static final DEFAULT

Value: 0

public static final DIGIT

Value: 13

public static final EOF

Value: 0

public static final EXPONENT

Value: 7

public static final FLOATING_POINT_LITERAL

Value: 6

public static final HEX_LITERAL

Value: 5

public static final IDENTIFIER

Value: 9

public static final IMMEDIATE_IDENTIFIER

Value: 11

public static final INTEGER_LITERAL

Value: 3

public static final KEY_IDENTIFIER

Value: 10

public static final LBRACE

Value: 14

Page 1303 of 1521


de.intarsys.pdf.postscript.ParserConstants

public static final LBRACKET

Value: 16

public static final LETTER

Value: 12

public static final RBRACE

Value: 15

public static final RBRACKET

Value: 17

public static final STRING_LITERAL

Value: 8

public static final tokenImage

Fields
DECIMAL_LITERAL
public static final int DECIMAL_LITERAL

Constant value: 4

DEFAULT
public static final int DEFAULT

Constant value: 0

DIGIT
public static final int DIGIT

Constant value: 13

EOF
public static final int EOF

Constant value: 0

EXPONENT
public static final int EXPONENT

Constant value: 7

Page 1304 of 1521


de.intarsys.pdf.postscript.ParserConstants

FLOATING_POINT_LITERAL
public static final int FLOATING_POINT_LITERAL

Constant value: 6

HEX_LITERAL
public static final int HEX_LITERAL

Constant value: 5

IDENTIFIER
public static final int IDENTIFIER

Constant value: 9

IMMEDIATE_IDENTIFIER
public static final int IMMEDIATE_IDENTIFIER

Constant value: 11

INTEGER_LITERAL
public static final int INTEGER_LITERAL

Constant value: 3

KEY_IDENTIFIER
public static final int KEY_IDENTIFIER

Constant value: 10

LBRACE
public static final int LBRACE

Constant value: 14

LBRACKET
public static final int LBRACKET

Constant value: 16

Page 1305 of 1521


de.intarsys.pdf.postscript.ParserConstants

(continued from last page)

LETTER
public static final int LETTER

Constant value: 12

RBRACE
public static final int RBRACE

Constant value: 15

RBRACKET
public static final int RBRACKET

Constant value: 17

STRING_LITERAL
public static final int STRING_LITERAL

Constant value: 8

tokenImage
public static final java.lang.String tokenImage

Page 1306 of 1521


de.intarsys.pdf.postscript.ParserTokenManager

de.intarsys.pdf.postscript
Class ParserTokenManager
java.lang.Object
|
+-de.intarsys.pdf.postscript.ParserTokenManager
All Implemented Interfaces:
ParserConstants

public class ParserTokenManager


extends Object
implements ParserConstants

Field Summary
public debugStream

public static final jjstrLiteralImages

public static final lexStateNames

Constructor Summary
public ParserTokenManager(JavaCharStream stream)

public ParserTokenManager(JavaCharStream stream, int lexState)

Method Summary
Token getNextToken()

void ReInit(JavaCharStream stream)

void ReInit(JavaCharStream stream, int lexState)

void setDebugStream(java.io.PrintStream ds)

void SwitchTo(int lexState)

Fields
jjstrLiteralImages
public static final java.lang.String jjstrLiteralImages

Page 1307 of 1521


de.intarsys.pdf.postscript.ParserTokenManager

(continued from last page)

lexStateNames
public static final java.lang.String lexStateNames

debugStream
public java.io.PrintStream debugStream

Constructors
ParserTokenManager
public ParserTokenManager(JavaCharStream stream)

ParserTokenManager
public ParserTokenManager(JavaCharStream stream,
int lexState)

Methods
getNextToken
public Token getNextToken()

ReInit
public void ReInit(JavaCharStream stream)

ReInit
public void ReInit(JavaCharStream stream,
int lexState)

setDebugStream
public void setDebugStream(java.io.PrintStream ds)

Page 1308 of 1521


de.intarsys.pdf.postscript.ParserTokenManager

(continued from last page)

SwitchTo
public void SwitchTo(int lexState)

Page 1309 of 1521


de.intarsys.pdf.postscript.Token

de.intarsys.pdf.postscript
Class Token
java.lang.Object
|
+-de.intarsys.pdf.postscript.Token

public class Token


extends Object

Describes the input token stream.

Field Summary
public beginColumn
beginLine and beginColumn describe the position of the first character of this token;
endLine and endColumn describe the position of the last character of this token.

public beginLine
beginLine and beginColumn describe the position of the first character of this token;
endLine and endColumn describe the position of the last character of this token.

public endColumn
beginLine and beginColumn describe the position of the first character of this token;
endLine and endColumn describe the position of the last character of this token.

public endLine
beginLine and beginColumn describe the position of the first character of this token;
endLine and endColumn describe the position of the last character of this token.

public image
The string image of the token.

public kind
An integer that describes the kind of this token.

public next
A reference to the next regular (non-special) token from the input stream.

public specialToken
This field is used to access special tokens that occur prior to this token, but after the
immediately preceding regular (non-special) token.

Constructor Summary
public Token()

Method Summary
static Token newToken(int ofKind)
Returns a new Token object, by default.

String toString()
Returns the image.

Page 1310 of 1521


de.intarsys.pdf.postscript.Token

Fields
beginLine
public int beginLine

beginLine and beginColumn describe the position of the first character of this token; endLine and endColumn describe the
position of the last character of this token.

beginColumn
public int beginColumn

beginLine and beginColumn describe the position of the first character of this token; endLine and endColumn describe the
position of the last character of this token.

endLine
public int endLine

beginLine and beginColumn describe the position of the first character of this token; endLine and endColumn describe the
position of the last character of this token.

endColumn
public int endColumn

beginLine and beginColumn describe the position of the first character of this token; endLine and endColumn describe the
position of the last character of this token.

image
public java.lang.String image

The string image of the token.

kind
public int kind

An integer that describes the kind of this token. This numbering system is determined by JavaCCParser, and a table of
these numbers is stored in the file ...Constants.java.

next
public de.intarsys.pdf.postscript.Token next

A reference to the next regular (non-special) token from the input stream. If this is the last token from the input stream, or
if the token manager has not read tokens beyond this one, this field is set to null. This is true only if this token is also a
regular token. Otherwise, see below for a description of the contents of this field.

specialToken
public de.intarsys.pdf.postscript.Token specialToken

Page 1311 of 1521


de.intarsys.pdf.postscript.Token

(continued from last page)

This field is used to access special tokens that occur prior to this token, but after the immediately preceding regular (non-
special) token. If there are no such special tokens, this field is set to null. When there are more than one such special token,
this field refers to the last of these special tokens, which in turn refers to the next previous special token through its
specialToken field, and so on until the first special token (whose specialToken field is null). The next fields of special
tokens refer to other special tokens that immediately follow it (without an intervening regular token). If there is no such
token, this field is null.

Constructors
Token
public Token()

Methods
newToken
public final static Token newToken(int ofKind)

Returns a new Token object, by default. However, if you want, you can create and return subclass objects based on the
value of ofKind. Simply add the cases to the switch for all those special cases. For example, if you have a subclass of
Token called IDToken that you want to create if ofKind is ID, simlpy add something like : case MyParserConstants.ID :
return new IDToken(); to the following switch statement. Then you can cast matchedToken variable to the appropriate type
and use it in your lexical actions.

toString
public String toString()

Returns the image.

Page 1312 of 1521


de.intarsys.pdf.postscript.TokenMgrError

de.intarsys.pdf.postscript
Class TokenMgrError
java.lang.Object
|
+-java.lang.Throwable
|
+-java.lang.Error
|
+-de.intarsys.pdf.postscript.TokenMgrError
All Implemented Interfaces:
java.io.Serializable

public class TokenMgrError


extends Error

Constructor Summary
public TokenMgrError()

public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int


errorColumn, String errorAfter, char curChar, int reason)

public TokenMgrError(String message, int reason)

Method Summary
String getMessage()
You can also modify the body of this method to customize your error messages.

Constructors
TokenMgrError
public TokenMgrError()

TokenMgrError
public TokenMgrError(boolean EOFSeen,
int lexState,
int errorLine,
int errorColumn,
String errorAfter,
char curChar,
int reason)

Page 1313 of 1521


de.intarsys.pdf.postscript.TokenMgrError

(continued from last page)

TokenMgrError
public TokenMgrError(String message,
int reason)

Methods
getMessage
public String getMessage()

You can also modify the body of this method to customize your error messages. For example, cases like
LOOP_DETECTED and INVALID_LEXICAL_STATE are not of end-users concern, so you can return something like :
"Internal Error : Please file a bug report .... " from this method for such cases in the release version of your parser.

Page 1314 of 1521


Package
de.intarsys.pdf.st
The storage level semantics of a PDF document.

Page 1315 of 1521


de.intarsys.pdf.st.AbstractXRefParser

de.intarsys.pdf.st
Class AbstractXRefParser
java.lang.Object
|
+-de.intarsys.pdf.st.AbstractXRefParser
Direct Known Subclasses:
XRefFallbackParser, XRefStreamParser, XRefTrailerParser

public abstract class AbstractXRefParser


extends Object

An abstract parser for the PDF XRef information.

Constructor Summary
public AbstractXRefParser(STDocument doc, COSDocumentParser parser)

Method Summary
abstract parse(IRandomAccess randomAcces)
STXRefSection
Parser the STXRefSection from the randomAccess.

Constructors
AbstractXRefParser
public AbstractXRefParser(STDocument doc,
COSDocumentParser parser)

Methods
parse
public abstract STXRefSection parse(IRandomAccess randomAcces)
throws java.io.IOException,
COSLoadException

Parser the STXRefSection from the randomAccess.

Parameters:
randomAcces

Returns:
The parsed STXRefSection

Throws:
IOException
COSLoadException

Page 1316 of 1521


de.intarsys.pdf.st.AbstractXRefWriter

de.intarsys.pdf.st
Class AbstractXRefWriter
java.lang.Object
|
+-de.intarsys.pdf.st.AbstractXRefWriter
All Implemented Interfaces:
IXRefEntryVisitor

Direct Known Subclasses:


XRefStreamWriter, XRefTrailerWriter

public abstract class AbstractXRefWriter


extends Object
implements IXRefEntryVisitor

An abstract superclass for implementing a XRef serializer.

Field Summary
public static final STARTXREF

Constructor Summary
public AbstractXRefWriter(COSWriter cosWriter)

Method Summary
COSWriter getCosWriter()

void visitFromCompressed(STXRefEntryCompressed entry)

void visitFromFree(STXRefEntryFree entry)

void visitFromOccupied(STXRefEntryOccupied entry)

void writeXRef(STXRefSection xRefSection)

Fields
STARTXREF
public static final byte STARTXREF

Constructors

Page 1317 of 1521


de.intarsys.pdf.st.AbstractXRefWriter

(continued from last page)

AbstractXRefWriter
public AbstractXRefWriter(COSWriter cosWriter)

Methods
getCosWriter
public COSWriter getCosWriter()

visitFromCompressed
public void visitFromCompressed(STXRefEntryCompressed entry)
throws XRefEntryVisitorException

visitFromFree
public void visitFromFree(STXRefEntryFree entry)
throws XRefEntryVisitorException

visitFromOccupied
public void visitFromOccupied(STXRefEntryOccupied entry)
throws XRefEntryVisitorException

writeXRef
public void writeXRef(STXRefSection xRefSection)
throws java.io.IOException

Page 1318 of 1521


de.intarsys.pdf.st.COSObjectStream

de.intarsys.pdf.st
Class COSObjectStream
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.st.COSObjectStream
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport

public class COSObjectStream


extends COSBasedObject

A COSStream containing other COSObjects.

Nested Class Summary


class COSObjectStream.MetaClass
COSObjectStream.MetaClass

Field Summary
public static final CN_Type_ObjStm

public static final DK_Extends

public static final DK_First

public static final DK_N

public static final META


The meta class instance

Method Summary
int getFirst()

int getN()

COSObject loadObject(int index, COSDocumentParser parser)

void parse(int index, COSDocumentParser parser)

Fields

Page 1319 of 1521


de.intarsys.pdf.st.COSObjectStream

(continued from last page)

META
public static final de.intarsys.pdf.st.COSObjectStream.MetaClass META

The meta class instance

CN_Type_ObjStm
public static final de.intarsys.pdf.cos.COSName CN_Type_ObjStm

DK_First
public static final de.intarsys.pdf.cos.COSName DK_First

DK_N
public static final de.intarsys.pdf.cos.COSName DK_N

DK_Extends
public static final de.intarsys.pdf.cos.COSName DK_Extends

Methods
getFirst
public int getFirst()

getN
public int getN()

loadObject
public COSObject loadObject(int index,
COSDocumentParser parser)
throws java.io.IOException,
COSLoadException

Page 1320 of 1521


de.intarsys.pdf.st.COSObjectStream

(continued from last page)

parse
public void parse(int index,
COSDocumentParser parser)
throws java.io.IOException,
COSLoadException

Page 1321 of 1521


de.intarsys.pdf.st.COSObjectStream.MetaClass

de.intarsys.pdf.st
Class COSObjectStream.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.st.COSObjectStream.MetaClass

public static class COSObjectStream.MetaClass


extends COSBasedObject.MetaClass

The meta class implementation

Page 1322 of 1521


de.intarsys.pdf.st.EnumWriteMode

de.intarsys.pdf.st
Class EnumWriteMode
java.lang.Object
|
+-de.intarsys.tools.enumeration.EnumItem
|
+-de.intarsys.pdf.st.EnumWriteMode
All Implemented Interfaces:
Comparable

public class EnumWriteMode


extends de.intarsys.tools.enumeration.EnumItem

The enumeration of available write modes for the document.

Field Summary
public static final FULL
Force full writing

public static final INCREMENTAL


Force incremental writing

public static final META


The meta data for the enumeration.

public static final UNDEFINED


Defer decision until writing

Method Summary
boolean isFull()

boolean isIncremental()

boolean isUndefined()

Fields
META
public static final de.intarsys.tools.enumeration.EnumMeta META

The meta data for the enumeration.

UNDEFINED
public static final de.intarsys.pdf.st.EnumWriteMode UNDEFINED

Defer decision until writing

Page 1323 of 1521


de.intarsys.pdf.st.EnumWriteMode

INCREMENTAL
public static final de.intarsys.pdf.st.EnumWriteMode INCREMENTAL

Force incremental writing

FULL
public static final de.intarsys.pdf.st.EnumWriteMode FULL

Force full writing

Methods
isIncremental
public boolean isIncremental()

isFull
public boolean isFull()

isUndefined
public boolean isUndefined()

Page 1324 of 1521


de.intarsys.pdf.st.PACKAGE

de.intarsys.pdf.st
Class PACKAGE
java.lang.Object
|
+-de.intarsys.pdf.st.PACKAGE

public class PACKAGE


extends Object

Field Summary
public static final Log

public static final Messages

Constructor Summary
public PACKAGE()

Fields
Messages
public static final de.intarsys.tools.message.MessageBundle Messages

Log
public static final java.util.logging.Logger Log

Constructors
PACKAGE
public PACKAGE()

Page 1325 of 1521


de.intarsys.pdf.st.STDocType

de.intarsys.pdf.st
Class STDocType
java.lang.Object
|
+-de.intarsys.pdf.st.STDocType

public class STDocType


extends Object

Constructor Summary
public STDocType()

public STDocType(String typeName, String version)

Method Summary
String getTypeName()

String getVersion()

boolean isFDF()

boolean isPDF()

void setTypeName(String typeName)

void setVersion(String version)

String toString()

Constructors
STDocType
public STDocType()

STDocType
public STDocType(String typeName,
String version)

Page 1326 of 1521


de.intarsys.pdf.st.STDocType

(continued from last page)

Methods
getVersion
public String getVersion()

setVersion
public void setVersion(String version)

getTypeName
public String getTypeName()

setTypeName
public void setTypeName(String typeName)

toString
public String toString()

isFDF
public boolean isFDF()

isPDF
public boolean isPDF()

Page 1327 of 1521


de.intarsys.pdf.st.STDocument

de.intarsys.pdf.st
Class STDocument
java.lang.Object
|
+-de.intarsys.pdf.st.STDocument
All Implemented Interfaces:
ILocatorSupport

public class STDocument


extends Object
implements ILocatorSupport

The most physical abstraction of a PDF document. This object handles the random access representation of the PDF file.

An STDocument manages the cross ref access to data stream positions from COS level objects. As such the ST and the COS
package are highly interdependent.

Field Summary
public static final DOCTYPE_FDF
our current fdf version number *

public static final DOCTYPE_PDF


our current pdf version number *

public static final OPTION_WRITEMODEHINT

Value: writeModeHint

Method Summary
void addChangedReference(COSIndirectObject object)
Mark object as changed within this document.

void addObjectReference(COSIndirectObject newRef)


Add another indirect object to the document.

void close()
Close the document.

STDocument copyDeep()
Return a deep copy of the document.

COSDictionary cosGetTrailer()
The documents trailer dictionary

static STDocument createFromLocator(ILocator locator)


Create a new document representing the data referenced by locator.

static STDocument createNew()


create a new empty pdf document.

static STDocument createNew(STDocType docType)


create a new empty document.

Page 1328 of 1521


de.intarsys.pdf.st.STDocument

STXRefSection createNewXRefSection()

COSObjectKey createObjectKey()
Create a new valid key for use in the document.

void garbageCollect()
Start a garbage collection for the receiver.

Object getAccessLock()

java.util.Collection getChanges()

COSDocument getDoc()

STDocType getDocType()

int getIncrementalCount()

COSDictionary getLinearizedDict()
The /Linearized dictionary of the document.

ILocator getLocator()
THe locator for the document data.

String getName()
A name for the document.

COSIndirectObject getObjectReference(COSObjectKey key)


The indirect object with object number objNum and generation number genNum is looked
up in the document.

COSDocumentParser getParser()
The parser used for decoding the document data stream.

IRandomAccess getRandomAccess()
The random access object for the documents data.

ISystemSecurityHandle getSystemSecurityHandler()
r
The documents security handler

COSTrailer getTrailer()

String getVersion()
The version of the PDF spec for this document

EnumWriteMode getWriteModeHint()
The write mode to be used when the document is written the next time.

STXRefSection getXRefSection()
The most recent STXrefSection of the document.

void incrementalGarbageCollect()

boolean isClosed()

Page 1329 of 1521


de.intarsys.pdf.st.STDocument

boolean isDirty()
true if this has been changed.

boolean isEncrypted()

boolean isLinearized()
true if this document is linearized.

boolean isNew()

boolean isReadOnly()
true if this is read only.

boolean isStreamed()
true if this has only streamed xref sections.

COSObject load(COSIndirectObject ref)


Load a COSObject from the documents data.

void loadAll()

int loadedSize()
The number of objects currently loaded.

java.util.Iterator objects()
An iterator on the indirect objects of the storage layer document.

void reparseFromLocator()
Reparses the XREF sections without actually instantiating.

void restore(ILocator newLocator)

void save()

void save(ILocator pLocator)

void save(ILocator pLocator, java.util.Map options)

void setDirty(boolean dirty)


Set the change flag of this.

void setDoc(COSDocument doc)

void setName(String name)


Rename the document locally.

void setWriteModeHint(EnumWriteMode writeMode)


The write mode to be used when the document is written the next time.

void setXRefSection(STXRefSection xRefSection)


Attach the most recent x ref section to the document.

void updateModificationDate()

Page 1330 of 1521


de.intarsys.pdf.st.STDocument

Fields
DOCTYPE_FDF
public static final de.intarsys.pdf.st.STDocType DOCTYPE_FDF

our current fdf version number *

DOCTYPE_PDF
public static final de.intarsys.pdf.st.STDocType DOCTYPE_PDF

our current pdf version number *

OPTION_WRITEMODEHINT
public static final java.lang.String OPTION_WRITEMODEHINT

Constant value: writeModeHint

Methods
createFromLocator
public static STDocument createFromLocator(ILocator locator)
throws java.io.IOException,
COSLoadException

Create a new document representing the data referenced by locator.

Parameters:
locator - The locator to the documents data

Returns:
A new document representing the data referenced by locator.

Throws:
IOException
COSLoadException

createNew
public static STDocument createNew()

create a new empty pdf document.

Returns:
A new empty pdf document

createNew
public static STDocument createNew(STDocType docType)

create a new empty document.

Returns:
A new empty document

Page 1331 of 1521


de.intarsys.pdf.st.STDocument

addChangedReference
public void addChangedReference(COSIndirectObject object)

Mark object as changed within this document.

Parameters:
object - The object that is new or changed

addObjectReference
public void addObjectReference(COSIndirectObject newRef)

Add another indirect object to the document.

Parameters:
newRef - The new indirect object.

close
public void close()
throws java.io.IOException

Close the document. Accessing a documents content is undefined after close.

Throws:
IOException

copyDeep
public STDocument copyDeep()

Return a deep copy of the document. This will create a copy of the documents content. The new documents location
(random access) is undefined. The objects will not preserve their key values.

Returns:
A deep copy of this.

cosGetTrailer
public COSDictionary cosGetTrailer()

The documents trailer dictionary

Returns:
The documents trailer dictionary

createNewXRefSection
public STXRefSection createNewXRefSection()

createObjectKey
public COSObjectKey createObjectKey()

Create a new valid key for use in the document.

Page 1332 of 1521


de.intarsys.pdf.st.STDocument

(continued from last page)

Returns:
A new valid key for use in the document.

garbageCollect
public void garbageCollect()

Start a garbage collection for the receiver. In a garbage collection every indirect object currently unused (unreachable from
the catalog) is removed.

getAccessLock
public Object getAccessLock()

getChanges
public java.util.Collection getChanges()

getDoc
public COSDocument getDoc()

getDocType
public STDocType getDocType()

getIncrementalCount
public int getIncrementalCount()

getLocator
public ILocator getLocator()

THe locator for the document data.

Returns:
THe locator for the document data.

getName
public String getName()

A name for the document.

This is either a "local" name or the name of the locator reference if present.

Returns:

Page 1333 of 1521


de.intarsys.pdf.st.STDocument

(continued from last page)

A name for the document

getObjectReference
public COSIndirectObject getObjectReference(COSObjectKey key)

The indirect object with object number objNum and generation number genNum is looked up in the document. If the
indirect object is not yet available, it is created and registered.

Parameters:
key

Returns:
The indirect object with object number objNum and generation number genNum

getParser
public COSDocumentParser getParser()

The parser used for decoding the document data stream.

Returns:
The parser used for decoding the document data stream.

getRandomAccess
public IRandomAccess getRandomAccess()

The random access object for the documents data. Be aware that using the IRandomAccess after it is closed will throw an
IOException.

Returns:
The random access object for the documents data.

getSystemSecurityHandler
public ISystemSecurityHandler getSystemSecurityHandler()

The documents security handler

Returns:
The documents security handler

getTrailer
public COSTrailer getTrailer()

getVersion
public String getVersion()

The version of the PDF spec for this document

Returns:
The version of the PDF spec for this document

Page 1334 of 1521


de.intarsys.pdf.st.STDocument

(continued from last page)

getWriteModeHint
public EnumWriteMode getWriteModeHint()

The write mode to be used when the document is written the next time. If defined this overrides any hint that is used when
saving the document. The write mode is reset after each "save".

Returns:
The write mode to be used when the document is written.

getXRefSection
public STXRefSection getXRefSection()

The most recent STXrefSection of the document.

Returns:
The most recent STXrefSection of the document.

incrementalGarbageCollect
public void incrementalGarbageCollect()

isClosed
public boolean isClosed()

isDirty
public boolean isDirty()

true if this has been changed.

Returns:
true if this has been changed.

isEncrypted
public boolean isEncrypted()

Returns:
if the document has an ISystemSecurityHandler

isNew
public boolean isNew()

isReadOnly
public boolean isReadOnly()

Page 1335 of 1521


de.intarsys.pdf.st.STDocument

(continued from last page)

true if this is read only.

Returns:
true if this is read only.

isStreamed
public boolean isStreamed()

true if this has only streamed xref sections.

Returns:
true if this has only streamed xref sections.

load
public COSObject load(COSIndirectObject ref)
throws java.io.IOException,
COSLoadException

Load a COSObject from the documents data.

Parameters:
ref - The object reference to be loaded.

Throws:
IOException
COSLoadException

loadAll
public void loadAll()
throws java.io.IOException,
COSLoadException

loadedSize
public int loadedSize()

The number of objects currently loaded.

Returns:
The number of objects currently loaded.

objects
public java.util.Iterator objects()

An iterator on the indirect objects of the storage layer document. This includes garbage and purely technical objects like x
ref streams.

Returns:
An iterator on the indirect objects of the storage layer document. This includes garbage and purely technical objects
like x ref streams.

Page 1336 of 1521


de.intarsys.pdf.st.STDocument

(continued from last page)

reparseFromLocator
public void reparseFromLocator()
throws java.io.IOException,
COSLoadException

Reparses the XREF sections without actually instantiating. Used for collecting errors on XREF level

Throws:
IOException
COSLoadException

restore
public void restore(ILocator newLocator)
throws java.io.IOException,
COSLoadException

save
public void save()
throws java.io.IOException

save
public void save(ILocator pLocator)
throws java.io.IOException

save
public void save(ILocator pLocator,
java.util.Map options)
throws java.io.IOException

setDirty
public void setDirty(boolean dirty)

Set the change flag of this.

Parameters:
dirty - true if this should be marked as changed

setDoc
public void setDoc(COSDocument doc)

Page 1337 of 1521


de.intarsys.pdf.st.STDocument

(continued from last page)

setName
public void setName(String name)

Rename the document locally.

This has no effect if a locator is present.

Parameters:
name - The new local name of this

setWriteModeHint
public void setWriteModeHint(EnumWriteMode writeMode)

The write mode to be used when the document is written the next time. If defined this overrides any hint that is used when
saving the document. The write mode is reset after each "save".

Parameters:
writeMode - The write mode to be used when the document is written.

setXRefSection
public void setXRefSection(STXRefSection xRefSection)

Attach the most recent x ref section to the document.

Parameters:
xRefSection - The x ref section representing the most recent document changes.

updateModificationDate
public void updateModificationDate()

isLinearized
public boolean isLinearized()

true if this document is linearized.

When linearized reading is truly implemented, this check should be made using the document length instead for
performance reasons.

Returns:
true if this document is linearized.

getLinearizedDict
public COSDictionary getLinearizedDict()

The /Linearized dictionary of the document. The /Linearized dictionary is represented by the first entry in the (logically)
first XRef section.

Note that this method may NOT return a dictionary even if the document contains a /Linearized dictionary as the first
object. This is the case when the document was linearized and was written with an incremental change so that the
linearization is obsolete.

Returns:

Page 1338 of 1521


de.intarsys.pdf.st.STDocument

(continued from last page)

The valid /Linearized dictionary of the document.

Page 1339 of 1521


de.intarsys.pdf.st.STStreamXRefSection

de.intarsys.pdf.st
Class STStreamXRefSection
java.lang.Object
|
+-de.intarsys.pdf.st.STXRefSection
|
+-de.intarsys.pdf.st.STStreamXRefSection

public class STStreamXRefSection


extends STXRefSection

A section in a stream XRef.

Field Summary
public static final CN_Type_XRef

public static final DK_Index

public static final DK_Type

public static final DK_W

Constructor Summary
public STStreamXRefSection(STDocument doc, long offset, COSStream stream)

public STStreamXRefSection(STDocument doc)

Method Summary
COSDictionary cosGetDict()

COSObject cosGetObject()

COSStream cosGetStream()

STXRefSection createSuccessor()

AbstractXRefWriter getWriter(COSWriter cosWriter)

void setIndex(COSArray index)

Fields

Page 1340 of 1521


de.intarsys.pdf.st.STStreamXRefSection

(continued from last page)

DK_Type
public static final de.intarsys.pdf.cos.COSName DK_Type

CN_Type_XRef
public static final de.intarsys.pdf.cos.COSName CN_Type_XRef

DK_Index
public static final de.intarsys.pdf.cos.COSName DK_Index

DK_W
public static final de.intarsys.pdf.cos.COSName DK_W

Constructors
STStreamXRefSection
public STStreamXRefSection(STDocument doc,
long offset,
COSStream stream)

STStreamXRefSection
public STStreamXRefSection(STDocument doc)

Methods
cosGetDict
public COSDictionary cosGetDict()

The "trailer" dictionary associated with the XRef section.

cosGetStream
public COSStream cosGetStream()

setIndex
public void setIndex(COSArray index)

Page 1341 of 1521


de.intarsys.pdf.st.STStreamXRefSection

(continued from last page)

createSuccessor
public STXRefSection createSuccessor()

cosGetObject
public COSObject cosGetObject()

getWriter
public AbstractXRefWriter getWriter(COSWriter cosWriter)

Page 1342 of 1521


de.intarsys.pdf.st.STTrailerXRefSection

de.intarsys.pdf.st
Class STTrailerXRefSection
java.lang.Object
|
+-de.intarsys.pdf.st.STXRefSection
|
+-de.intarsys.pdf.st.STTrailerXRefSection

public class STTrailerXRefSection


extends STXRefSection

A section in a classical XRef.

Constructor Summary
public STTrailerXRefSection(STDocument doc, long offset)

public STTrailerXRefSection(STDocument doc)

Method Summary
COSDictionary cosGetDict()

COSObject cosGetObject()

void cosSetDict(COSDictionary pTrailerDict)

STXRefSection createSuccessor()

AbstractXRefWriter getWriter(COSWriter cosWriter)

STStreamXRefSection getXRefStream()

COSObject load(int objectNumber, ISystemSecurityHandler securityHandler)

void setXRefStream(STStreamXRefSection xRefStream)

Constructors
STTrailerXRefSection
public STTrailerXRefSection(STDocument doc,
long offset)

Page 1343 of 1521


de.intarsys.pdf.st.STTrailerXRefSection

(continued from last page)

STTrailerXRefSection
public STTrailerXRefSection(STDocument doc)

Methods
cosGetDict
public COSDictionary cosGetDict()

The "trailer" dictionary associated with the XRef section.

cosSetDict
public void cosSetDict(COSDictionary pTrailerDict)

getXRefStream
public STStreamXRefSection getXRefStream()

setXRefStream
public void setXRefStream(STStreamXRefSection xRefStream)

createSuccessor
public STXRefSection createSuccessor()

load
public COSObject load(int objectNumber,
ISystemSecurityHandler securityHandler)
throws java.io.IOException,
COSLoadException

cosGetObject
public COSObject cosGetObject()

getWriter
public AbstractXRefWriter getWriter(COSWriter cosWriter)

Page 1344 of 1521


de.intarsys.pdf.st.STXRefEntry

de.intarsys.pdf.st
Class STXRefEntry
java.lang.Object
|
+-de.intarsys.pdf.st.STXRefEntry
All Implemented Interfaces:
Comparable

Direct Known Subclasses:


STXRefEntryCompressed, STXRefEntryFree, STXRefEntryOccupied

public abstract class STXRefEntry


extends Object
implements Comparable

Abstract superclass for a XRef entry.

The XRef entry describes an object slot in a XRef. The entry consists of an offset in the file, a generation number and a token
indicating if this entry is free.

Method Summary
abstract void accept(IXRefEntryVisitor visitor)

int compareTo(Object obj)

abstract STXRefEntry copy()

abstract fill(int pos)


STXRefEntryOccupied

abstract long getColumn1()

abstract int getColumn2()

int getGenerationNumber()

COSObjectKey getKey()

int getObjectNumber()

abstract boolean isFree()

abstract COSObject load(STDocument doc, ISystemSecurityHandler securityHandler)

String toString()

Page 1345 of 1521


de.intarsys.pdf.st.STXRefEntry

(continued from last page)

Methods
isFree
public abstract boolean isFree()

getGenerationNumber
public int getGenerationNumber()

compareTo
public int compareTo(Object obj)

fill
public abstract STXRefEntryOccupied fill(int pos)

getObjectNumber
public int getObjectNumber()

toString
public String toString()

load
public abstract COSObject load(STDocument doc,
ISystemSecurityHandler securityHandler)
throws java.io.IOException,
COSLoadException

getColumn1
public abstract long getColumn1()

getColumn2
public abstract int getColumn2()

Page 1346 of 1521


de.intarsys.pdf.st.STXRefEntry

getKey
public COSObjectKey getKey()

accept
public abstract void accept(IXRefEntryVisitor visitor)
throws XRefEntryVisitorException

copy
public abstract STXRefEntry copy()

Page 1347 of 1521


de.intarsys.pdf.st.STXRefEntryCompressed

de.intarsys.pdf.st
Class STXRefEntryCompressed
java.lang.Object
|
+-de.intarsys.pdf.st.STXRefEntry
|
+-de.intarsys.pdf.st.STXRefEntryCompressed
All Implemented Interfaces:
Comparable

public class STXRefEntryCompressed


extends STXRefEntry

An entry in a XRef stream.

Constructor Summary
public STXRefEntryCompressed(COSObjectKey key, COSObjectKey stmObjectKey, int
indexOfObject)

Method Summary
void accept(IXRefEntryVisitor visitor)

STXRefEntry copy()

STXRefEntryOccupied fill(int pos)

long getColumn1()

int getColumn2()

int getIndex()

COSObjectKey getStreamObjectKey()

int getStreamObjectNumber()

boolean isFree()

COSObject load(STDocument doc, ISystemSecurityHandler securityHandler)

Constructors

Page 1348 of 1521


de.intarsys.pdf.st.STXRefEntryCompressed

(continued from last page)

STXRefEntryCompressed
public STXRefEntryCompressed(COSObjectKey key,
COSObjectKey stmObjectKey,
int indexOfObject)

Methods
isFree
public boolean isFree()

load
public COSObject load(STDocument doc,
ISystemSecurityHandler securityHandler)
throws java.io.IOException,
COSLoadException

getColumn1
public long getColumn1()

getColumn2
public int getColumn2()

fill
public STXRefEntryOccupied fill(int pos)

accept
public void accept(IXRefEntryVisitor visitor)
throws XRefEntryVisitorException

getIndex
public int getIndex()

Page 1349 of 1521


de.intarsys.pdf.st.STXRefEntryCompressed

(continued from last page)

getStreamObjectKey
public COSObjectKey getStreamObjectKey()

getStreamObjectNumber
public int getStreamObjectNumber()

copy
public STXRefEntry copy()

Page 1350 of 1521


de.intarsys.pdf.st.STXRefEntryFree

de.intarsys.pdf.st
Class STXRefEntryFree
java.lang.Object
|
+-de.intarsys.pdf.st.STXRefEntry
|
+-de.intarsys.pdf.st.STXRefEntryFree
All Implemented Interfaces:
Comparable

public class STXRefEntryFree


extends STXRefEntry

Represents a free object entry in a pdf xref table.

Constructor Summary
public STXRefEntryFree(COSObjectKey key, int nextFreeObject)

Method Summary
void accept(IXRefEntryVisitor visitor)

STXRefEntry copy()

void enqueue(STXRefEntryFree entry)


Add a new free entry in the linked list of free entries.

STXRefEntryOccupied fill(int pos)

long getColumn1()

int getColumn2()

int getNextFreeObjectNumber()

boolean isFree()

COSObject load(STDocument doc, ISystemSecurityHandler securityHandler)

Constructors
STXRefEntryFree
public STXRefEntryFree(COSObjectKey key,
int nextFreeObject)

Page 1351 of 1521


de.intarsys.pdf.st.STXRefEntryFree

(continued from last page)

Methods
getColumn1
public long getColumn1()

getColumn2
public int getColumn2()

isFree
public boolean isFree()

getNextFreeObjectNumber
public int getNextFreeObjectNumber()

enqueue
public void enqueue(STXRefEntryFree entry)

Add a new free entry in the linked list of free entries. The linked list is formed by the head entry with index 0. This entry
and all subsequent hold a reference to their successor and predecessor. Adding a new entry means that we look up the entry
in the linked list, starting at the head, that has the highest index smaller than the index of the new entry. The new entry is
inserted after that position in the linked list.

Parameters:
entry - The new entry to insert in the linked list.

fill
public STXRefEntryOccupied fill(int pos)

load
public COSObject load(STDocument doc,
ISystemSecurityHandler securityHandler)

accept
public void accept(IXRefEntryVisitor visitor)
throws XRefEntryVisitorException

Page 1352 of 1521


de.intarsys.pdf.st.STXRefEntryFree

copy
public STXRefEntry copy()

Page 1353 of 1521


de.intarsys.pdf.st.STXRefEntryOccupied

de.intarsys.pdf.st
Class STXRefEntryOccupied
java.lang.Object
|
+-de.intarsys.pdf.st.STXRefEntry
|
+-de.intarsys.pdf.st.STXRefEntryOccupied
All Implemented Interfaces:
Comparable

public class STXRefEntryOccupied


extends STXRefEntry

Represents an occupied object entry in a pdf xref table.

Constructor Summary
public STXRefEntryOccupied(COSObjectKey key, long offset)

Method Summary
void accept(IXRefEntryVisitor visitor)

STXRefEntry copy()

STXRefEntryOccupied fill(int pos)

long getColumn1()

int getColumn2()

long getOffset()

boolean isFree()

COSObject load(STDocument doc, ISystemSecurityHandler securityHandler)

void setOffset(long offset)

Constructors
STXRefEntryOccupied
public STXRefEntryOccupied(COSObjectKey key,
long offset)

Page 1354 of 1521


de.intarsys.pdf.st.STXRefEntryOccupied

Methods
isFree
public boolean isFree()

See Also:
STXRefEntry.isFree()

load
public COSObject load(STDocument doc,
ISystemSecurityHandler securityHandler)
throws java.io.IOException,
COSLoadException

fill
public STXRefEntryOccupied fill(int pos)

getOffset
public long getOffset()

setOffset
public void setOffset(long offset)

getColumn1
public long getColumn1()

getColumn2
public int getColumn2()

accept
public void accept(IXRefEntryVisitor visitor)
throws XRefEntryVisitorException

Page 1355 of 1521


de.intarsys.pdf.st.STXRefEntryOccupied

(continued from last page)

copy
public STXRefEntry copy()

Page 1356 of 1521


de.intarsys.pdf.st.STXRefSection

de.intarsys.pdf.st
Class STXRefSection
java.lang.Object
|
+-de.intarsys.pdf.st.STXRefSection
Direct Known Subclasses:
STStreamXRefSection, STTrailerXRefSection

public abstract class STXRefSection


extends Object

A section in a XRef.

The XRef allows random access to the objects in the PDF file.

A XRef section is the part of a pdf document starting with a "xref" token. It consists of several, non contiguous subsections, one
additional for each incremental update.

Field Summary
public static final DK_XRefStm

Method Summary
void addEntry(STXRefEntry entry)

boolean contains(int number)

abstract cosGetDict()
COSDictionary
The "trailer" dictionary associated with the XRef section.

COSObject cosGetEncryption()

abstract COSObject cosGetObject()

void cosSetEncryption(COSObject encryption)

abstract createSuccessor()
STXRefSection

java.util.Iterator entryIterator()

STDocument getDoc()

STXRefEntry getEntry(int number)

COSArray getID()

int getIncrementalCount()

Page 1357 of 1521


de.intarsys.pdf.st.STXRefSection

int getMaxObjectNumber()

long getOffset()

STXRefSection getPrevious()

int getPreviousOffset()

int getSize()
The total number of indirect objects in the document.

int getStart()
The object number of the first object in this section.

abstract getWriter(COSWriter cosWriter)


AbstractXRefWriter

STXRefSubsection getXRefSubsection()
The first subsection in this section.

COSObject load(int objectNumber, ISystemSecurityHandler securityHandler)

java.util.Iterator subsectionIterator()

Fields
DK_XRefStm
public static final de.intarsys.pdf.cos.COSName DK_XRefStm

Methods
addEntry
public void addEntry(STXRefEntry entry)

contains
public boolean contains(int number)

cosGetDict
public abstract COSDictionary cosGetDict()

The "trailer" dictionary associated with the XRef section.

Returns:
The "trailer" dictionary associated with the XRef section.

Page 1358 of 1521


de.intarsys.pdf.st.STXRefSection

cosGetEncryption
public COSObject cosGetEncryption()

cosGetObject
public abstract COSObject cosGetObject()

cosSetEncryption
public void cosSetEncryption(COSObject encryption)

createSuccessor
public abstract STXRefSection createSuccessor()

entryIterator
public java.util.Iterator entryIterator()

getDoc
public STDocument getDoc()

getEntry
public STXRefEntry getEntry(int number)

getID
public COSArray getID()

getIncrementalCount
public int getIncrementalCount()

getMaxObjectNumber
public int getMaxObjectNumber()

Page 1359 of 1521


de.intarsys.pdf.st.STXRefSection

(continued from last page)

getOffset
public long getOffset()

getPrevious
public STXRefSection getPrevious()

getPreviousOffset
public int getPreviousOffset()

Returns:
offset of previous trailer dict or -1 if none exists

getSize
public int getSize()

The total number of indirect objects in the document.

Returns:
The total number of indirect objects in the document.

getStart
public int getStart()

The object number of the first object in this section.

Returns:
The object number of the first object in this section.

getWriter
public abstract AbstractXRefWriter getWriter(COSWriter cosWriter)

getXRefSubsection
public STXRefSubsection getXRefSubsection()

The first subsection in this section. All other subsections are implemented as a linked list.

Returns:
The first subsection in this section.

Page 1360 of 1521


de.intarsys.pdf.st.STXRefSection

(continued from last page)

load
public COSObject load(int objectNumber,
ISystemSecurityHandler securityHandler)
throws java.io.IOException,
COSLoadException

subsectionIterator
public java.util.Iterator subsectionIterator()

Page 1361 of 1521


de.intarsys.pdf.st.STXRefSubsection

de.intarsys.pdf.st
Class STXRefSubsection
java.lang.Object
|
+-de.intarsys.pdf.st.STXRefSubsection

public class STXRefSubsection


extends Object

A XRef subsection in a pdf document.

A XRef section consists of at least one subsection. The subsections describe the objects that have changed with regard to the
previous document version.

Each subsection contains entries for a contiguous range of objects. The serialized form starts with 2 number, the object number of
the first entry and the number of entries. Following this ther is one line for each enty in the form In Use entry: offset[10] " "
generation[5] " " n eol[2] Free entry: next free[10] " " generation[5] " " f eol[2]

Constructor Summary
public STXRefSubsection(STXRefSection xRefSection, int start)

Method Summary
int getSize()

int getStart()

int getStop()

Constructors
STXRefSubsection
public STXRefSubsection(STXRefSection xRefSection,
int start)

Methods
getStart
public int getStart()

getStop
public int getStop()

Page 1362 of 1521


de.intarsys.pdf.st.STXRefSubsection

(continued from last page)

getSize
public int getSize()

Page 1363 of 1521


de.intarsys.pdf.st.XRefEntryVisitorException

de.intarsys.pdf.st
Class XRefEntryVisitorException
java.lang.Object
|
+-java.lang.Throwable
|
+-java.lang.Exception
|
+-de.intarsys.pdf.st.XRefEntryVisitorException
All Implemented Interfaces:
java.io.Serializable

public class XRefEntryVisitorException


extends Exception

Constructor Summary
public XRefEntryVisitorException(Throwable cause)

Constructors
XRefEntryVisitorException
public XRefEntryVisitorException(Throwable cause)

Page 1364 of 1521


de.intarsys.pdf.st.XRefFallbackParser

de.intarsys.pdf.st
Class XRefFallbackParser
java.lang.Object
|
+-de.intarsys.pdf.st.AbstractXRefParser
|
+-de.intarsys.pdf.st.XRefFallbackParser

public class XRefFallbackParser


extends AbstractXRefParser

A simple xref rebuilding parser.

The parser reads lines in the document and looks if the line begins with a object definition, which looks like: number number "obj".
Every object definition found is added as a XRefEntry to the STDocument.

False object definitions can be read and they can cause a problem, if a real object with the same object number is read after the
false one. On the other side: the document was already broke before this parser was called.

Constructor Summary
public XRefFallbackParser(STDocument doc, COSDocumentParser parser)

Method Summary
STXRefSection parse(IRandomAccess input)

Constructors
XRefFallbackParser
public XRefFallbackParser(STDocument doc,
COSDocumentParser parser)

Methods
parse
public STXRefSection parse(IRandomAccess input)
throws java.io.IOException,
COSLoadException

Parser the STXRefSection from the randomAccess.

Page 1365 of 1521


de.intarsys.pdf.st.XRefStreamParser

de.intarsys.pdf.st
Class XRefStreamParser
java.lang.Object
|
+-de.intarsys.pdf.st.AbstractXRefParser
|
+-de.intarsys.pdf.st.XRefStreamParser

public class XRefStreamParser


extends AbstractXRefParser

A parser for XRef streams.

Constructor Summary
public XRefStreamParser(STDocument doc, COSDocumentParser parser)

Method Summary
STXRefSection parse(IRandomAccess randomAcces)

Constructors
XRefStreamParser
public XRefStreamParser(STDocument doc,
COSDocumentParser parser)

Methods
parse
public STXRefSection parse(IRandomAccess randomAcces)
throws java.io.IOException,
COSLoadException

Parser the STXRefSection from the randomAccess.

Page 1366 of 1521


de.intarsys.pdf.st.XRefStreamWriter

de.intarsys.pdf.st
Class XRefStreamWriter
java.lang.Object
|
+-de.intarsys.pdf.st.AbstractXRefWriter
|
+-de.intarsys.pdf.st.XRefStreamWriter
All Implemented Interfaces:
IXRefEntryVisitor

public class XRefStreamWriter


extends AbstractXRefWriter

A XRef serializer to a XRef stream.

Field Summary
public static TYPE_COMPRESSED

public static TYPE_FREE

public static TYPE_OCCUPIED

Constructor Summary
public XRefStreamWriter(COSWriter cosWriter)

Fields
TYPE_FREE
public static byte TYPE_FREE

TYPE_OCCUPIED
public static byte TYPE_OCCUPIED

TYPE_COMPRESSED
public static byte TYPE_COMPRESSED

Constructors

Page 1367 of 1521


de.intarsys.pdf.st.XRefStreamWriter

(continued from last page)

XRefStreamWriter
public XRefStreamWriter(COSWriter cosWriter)

Page 1368 of 1521


de.intarsys.pdf.st.XRefTrailerParser

de.intarsys.pdf.st
Class XRefTrailerParser
java.lang.Object
|
+-de.intarsys.pdf.st.AbstractXRefParser
|
+-de.intarsys.pdf.st.XRefTrailerParser

public class XRefTrailerParser


extends AbstractXRefParser

A parser for XRef objects in "classical" format.

Constructor Summary
public XRefTrailerParser(STDocument doc, COSDocumentParser parser)

Method Summary
STXRefSection parse(IRandomAccess randomAcces)

Constructors
XRefTrailerParser
public XRefTrailerParser(STDocument doc,
COSDocumentParser parser)

Methods
parse
public STXRefSection parse(IRandomAccess randomAcces)
throws java.io.IOException,
COSLoadException

Parser the STXRefSection from the randomAccess.

Page 1369 of 1521


de.intarsys.pdf.st.XRefTrailerWriter

de.intarsys.pdf.st
Class XRefTrailerWriter
java.lang.Object
|
+-de.intarsys.pdf.st.AbstractXRefWriter
|
+-de.intarsys.pdf.st.XRefTrailerWriter
All Implemented Interfaces:
IXRefEntryVisitor

public class XRefTrailerWriter


extends AbstractXRefWriter

A XRef serializer to the classical XRef format.

Field Summary
public static final FORMAT_XREF_GENERATION

public static final FORMAT_XREF_OFFSET

public static final TYPE_FREE

public static final TYPE_OCCUPIED

public static final XREF

Constructor Summary
public XRefTrailerWriter(COSWriter cosWriter)

Method Summary
void visitFromCompressed(STXRefEntryCompressed entry)

Fields
TYPE_FREE
public static final byte TYPE_FREE

TYPE_OCCUPIED
public static final byte TYPE_OCCUPIED

Page 1370 of 1521


de.intarsys.pdf.st.XRefTrailerWriter

(continued from last page)

FORMAT_XREF_GENERATION
public static final java.text.NumberFormat FORMAT_XREF_GENERATION

FORMAT_XREF_OFFSET
public static final java.text.NumberFormat FORMAT_XREF_OFFSET

XREF
public static final byte XREF

Constructors
XRefTrailerWriter
public XRefTrailerWriter(COSWriter cosWriter)

Methods
visitFromCompressed
public void visitFromCompressed(STXRefEntryCompressed entry)
throws XRefEntryVisitorException

Page 1371 of 1521


Package
de.intarsys.pdf.tools.kernel
Tool classes for working with the kernel of the PDF implementation.

Page 1372 of 1521


de.intarsys.pdf.tools.kernel.PDFGeometryTools

de.intarsys.pdf.tools.kernel
Class PDFGeometryTools
java.lang.Object
|
+-de.intarsys.pdf.tools.kernel.PDFGeometryTools

public class PDFGeometryTools


extends Object

Tool class for calculations regarding the PDF geometry.

Method Summary
static void adjustTransform(java.awt.geom.AffineTransform transform, int rotate,
java.awt.geom.Rectangle2D rect)
Given a transformation in user space, apply the necessary transformation steps to move the
origin of the coordinate system to the lower left corner of rect after rotating it clockwise
by rotate.

static int normalizeRotate(int rotation)


Normalize the rotation parameter to a positive multiple of 90 between 0 and 270.

Methods
normalizeRotate
public static int normalizeRotate(int rotation)

Normalize the rotation parameter to a positive multiple of 90 between 0 and 270.

Parameters:
rotation

Returns:
Normalize the rotation parameter to a positive multiple of 90 between 0 and 270.

adjustTransform
public static void adjustTransform(java.awt.geom.AffineTransform transform,
int rotate,
java.awt.geom.Rectangle2D rect)

Given a transformation in user space, apply the necessary transformation steps to move the origin of the coordinate system
to the lower left corner of rect after rotating it clockwise by rotate.

transform is modified, rect is read only.

Parameters:
transform
rotate
rect

Page 1373 of 1521


Package
de.intarsys.pdf.writer
Serializing a PDF document.

Serializing currently supports "full" and "incremental" writing.

Somebody around wants to do linearization??

Page 1374 of 1521


de.intarsys.pdf.writer.COSWriter

de.intarsys.pdf.writer
Class COSWriter
java.lang.Object
|
+-de.intarsys.pdf.writer.COSWriter
All Implemented Interfaces:
ICOSProxyVisitor, ICOSObjectVisitor

public class COSWriter


extends Object
implements ICOSObjectVisitor, ICOSProxyVisitor

A writer for PDF related data structures.

Field Summary
public static final ARRAY_CLOSE

public static final ARRAY_OPEN

public static final COMMENT

public static final CRLF


To be used when 2 byte sequence is enforced.

public static final DICT_CLOSE

public static final DICT_OPEN

public static final ENDOBJ

public static final ENDSTREAM

public static final EOF

public static final EOL


standard line separator on this platform

public static final FALSE

public static final GARBAGE

public static final LF


Line feed character.

public static final LITERAL_ESCAPED_BS

public static final LITERAL_ESCAPED_CR

Page 1375 of 1521


de.intarsys.pdf.writer.COSWriter

public static final LITERAL_ESCAPED_FF

public static final LITERAL_ESCAPED_HT

public static final LITERAL_ESCAPED_LF

public static final NAME_ESCAPE

public static final NAME_PREFIX

public static final NULL

public static final OBJ

public static final PDF_ESCAPE

public static final REFERENCE

public static final SPACE

public static final STREAM

public static final STRING_CLOSE

public static final STRING_HEX_CLOSE

public static final STRING_HEX_OPEN

public static final STRING_OPEN

public static final TRAILER

public static final TRUE

Constructor Summary
public COSWriter(IRandomAccess randomAccess, ISystemSecurityHandler
securityHandler)

Method Summary
static void basicWriteFixed(IRandomAccess randomAccess, float value, int precision)

static void basicWriteInteger(IRandomAccess randomAccess, int value)

static void basicWriteName(IRandomAccess randomAccess, byte[] name)


create the byte stream for the representation of a name

Page 1376 of 1521


de.intarsys.pdf.writer.COSWriter

static void basicWriteStringHex(IRandomAccess randomAccess, byte[] string)


create a hex encoded byte stream representation of string

static void basicWriteStringLiteral(IRandomAccess randomAccess, byte[] string)


create the literal byte stream representation of string

java.util.List getProxies()
The collection of proxies to COSObjects visited by the writer.

IRandomAccess getRandomAccess()

boolean isIncremental()

void seekToEnd()

void setIncremental(boolean incremental)

static byte[] toByteArray(COSObject object)


Create a byte array representation from a COSObject.

Object visitFromArray(COSArray obj)


visitFromArray.

Object visitFromBoolean(COSBoolean obj)


visitFromBoolean.

Object visitFromDictionary(COSDictionary obj)


visitFromDictionary.

Object visitFromFixed(COSFixed obj)


visitFromFixed.

Object visitFromIndirectObject(COSIndirectObject obj)


This will write an indirect object reference

Object visitFromInteger(COSInteger obj)


visitFromInteger.

Object visitFromName(COSName obj)


visitFromName.

Object visitFromNull(COSNull obj)


visitFromNull.

Object visitFromProxy(COSObjectProxy obj)

Object visitFromStream(COSStream obj)


visitFromStream.

Object visitFromString(COSString obj)


visitFromString.

void write(byte[] b)
This will write some byte to the stream.

void write(byte[] b, int off, int len)


This will write some byte to the stream.

Page 1377 of 1521


de.intarsys.pdf.writer.COSWriter

void write(int b)
This will write a single byte to the stream.

void writeContentStream(CSContent contentStream)

void writeDocument(STDocument doc)

void writeEOL()
This will write an EOL to the stream.

void writeIndirectObject(COSIndirectObject object)

void writeObject(COSObject object)


This will write a cos object to the stream

Fields
ARRAY_CLOSE
public static final byte ARRAY_CLOSE

ARRAY_OPEN
public static final byte ARRAY_OPEN

COMMENT
public static final byte COMMENT

CRLF
public static final byte CRLF

To be used when 2 byte sequence is enforced.

DICT_CLOSE
public static final byte DICT_CLOSE

DICT_OPEN
public static final byte DICT_OPEN

Page 1378 of 1521


de.intarsys.pdf.writer.COSWriter

(continued from last page)

ENDOBJ
public static final byte ENDOBJ

ENDSTREAM
public static final byte ENDSTREAM

EOF
public static final byte EOF

EOL
public static final byte EOL

standard line separator on this platform

FALSE
public static final byte FALSE

GARBAGE
public static final byte GARBAGE

LF
public static final byte LF

Line feed character.

LITERAL_ESCAPED_BS
public static final byte LITERAL_ESCAPED_BS

LITERAL_ESCAPED_CR
public static final byte LITERAL_ESCAPED_CR

LITERAL_ESCAPED_FF
public static final byte LITERAL_ESCAPED_FF

Page 1379 of 1521


de.intarsys.pdf.writer.COSWriter

(continued from last page)

LITERAL_ESCAPED_HT
public static final byte LITERAL_ESCAPED_HT

LITERAL_ESCAPED_LF
public static final byte LITERAL_ESCAPED_LF

NAME_ESCAPE
public static final byte NAME_ESCAPE

NAME_PREFIX
public static final byte NAME_PREFIX

NULL
public static final byte NULL

OBJ
public static final byte OBJ

PDF_ESCAPE
public static final byte PDF_ESCAPE

REFERENCE
public static final byte REFERENCE

SPACE
public static final byte SPACE

Page 1380 of 1521


de.intarsys.pdf.writer.COSWriter

(continued from last page)

STREAM
public static final byte STREAM

STRING_CLOSE
public static final byte STRING_CLOSE

STRING_HEX_CLOSE
public static final byte STRING_HEX_CLOSE

STRING_HEX_OPEN
public static final byte STRING_HEX_OPEN

STRING_OPEN
public static final byte STRING_OPEN

TRAILER
public static final byte TRAILER

TRUE
public static final byte TRUE

Constructors
COSWriter
public COSWriter(IRandomAccess randomAccess,
ISystemSecurityHandler securityHandler)

Methods

Page 1381 of 1521


de.intarsys.pdf.writer.COSWriter

(continued from last page)

basicWriteFixed
public static void basicWriteFixed(IRandomAccess randomAccess,
float value,
int precision)
throws java.io.IOException

basicWriteInteger
public static void basicWriteInteger(IRandomAccess randomAccess,
int value)
throws java.io.IOException

basicWriteName
public static void basicWriteName(IRandomAccess randomAccess,
byte[] name)
throws java.io.IOException

create the byte stream for the representation of a name

Parameters:
randomAccess - the randomAccessData to write to
name - the names byte stream

Throws:
IOException

basicWriteStringHex
public static void basicWriteStringHex(IRandomAccess randomAccess,
byte[] string)
throws java.io.IOException

create a hex encoded byte stream representation of string

Parameters:
randomAccess - the randomAccessData to write to
string - the string to write

Throws:
IOException

basicWriteStringLiteral
public static void basicWriteStringLiteral(IRandomAccess randomAccess,
byte[] string)
throws java.io.IOException

create the literal byte stream representation of string

Parameters:
randomAccess - the randomAccessData to write to
string - the string to write

Throws:

Page 1382 of 1521


de.intarsys.pdf.writer.COSWriter

(continued from last page)


IOException

toByteArray
public final static byte[] toByteArray(COSObject object)

Create a byte array representation from a COSObject.

Parameters:
object - The object to be serialized.

Returns:
A byte array representation from a COSObject.

getProxies
public java.util.List getProxies()

The collection of proxies to COSObjects visited by the writer.

Returns:
The collection of proxies to COSObjects visited by the writer.

getRandomAccess
public IRandomAccess getRandomAccess()

isIncremental
public boolean isIncremental()

seekToEnd
public void seekToEnd()
throws java.io.IOException

setIncremental
public void setIncremental(boolean incremental)

visitFromArray
public Object visitFromArray(COSArray obj)
throws COSVisitorException

visitFromArray.

Parameters:
obj - The object that is being visited.

Returns:

Page 1383 of 1521


de.intarsys.pdf.writer.COSWriter

(continued from last page)

unused

Throws:
COSVisitorException - If there is an exception while visiting this object.

visitFromBoolean
public Object visitFromBoolean(COSBoolean obj)
throws COSVisitorException

visitFromBoolean.

Parameters:
obj - The object that is being visited.

Returns:
unused

Throws:
COSVisitorException - If there is an exception while visiting this object.

visitFromDictionary
public Object visitFromDictionary(COSDictionary obj)
throws COSVisitorException

visitFromDictionary.

Parameters:
obj - The object that is being visited.

Returns:
unused

Throws:
COSVisitorException - If there is an exception while visiting this object.

visitFromFixed
public Object visitFromFixed(COSFixed obj)
throws COSVisitorException

visitFromFixed.

Parameters:
obj - The object that is being visited.

Returns:
unused

Throws:
COSVisitorException - If there is an exception while visiting this object.

visitFromIndirectObject
public Object visitFromIndirectObject(COSIndirectObject obj)
throws COSVisitorException

This will write an indirect object reference

Page 1384 of 1521


de.intarsys.pdf.writer.COSWriter

(continued from last page)

Parameters:
obj - The indirect object to write.

Throws:
COSVisitorException - If there is an exception while visiting this object.

visitFromInteger
public Object visitFromInteger(COSInteger obj)
throws COSVisitorException

visitFromInteger.

Parameters:
obj - The object that is being visited.

Returns:
unused

Throws:
COSVisitorException - If there is an exception while visiting this object.

visitFromName
public Object visitFromName(COSName obj)
throws COSVisitorException

visitFromName.

Parameters:
obj - The object that is being visited.

Returns:
unused

Throws:
COSVisitorException - If there is an exception while visiting this object.

visitFromNull
public Object visitFromNull(COSNull obj)
throws COSVisitorException

visitFromNull.

Parameters:
obj - The object that is being visited.

Returns:
unused

Throws:
COSVisitorException - If there is an exception while visiting this object.

visitFromProxy
public Object visitFromProxy(COSObjectProxy obj)
throws COSVisitorException

Page 1385 of 1521


de.intarsys.pdf.writer.COSWriter

(continued from last page)

visitFromStream
public Object visitFromStream(COSStream obj)
throws COSVisitorException

visitFromStream.

Parameters:
obj - The object that is being visited.

Returns:
unused

Throws:
COSVisitorException - If there is an exception while visiting this object.

visitFromString
public Object visitFromString(COSString obj)
throws COSVisitorException

visitFromString.

Parameters:
obj - The object that is being visited.

Returns:
unused

Throws:
COSVisitorException - If there is an exception while visiting this object.

write
public void write(byte[] b)
throws java.io.IOException

This will write some byte to the stream.

Parameters:
b - The source byte array.

Throws:
IOException - If the underlying stream throws an exception.

write
public void write(byte[] b,
int off,
int len)
throws java.io.IOException

This will write some byte to the stream.

Parameters:
b - The source byte array.
off - The offset into the array to start writing.

Page 1386 of 1521


de.intarsys.pdf.writer.COSWriter

(continued from last page)

len - The number of bytes to write.

Throws:
IOException - If the underlying stream throws an exception.

write
public void write(int b)
throws java.io.IOException

This will write a single byte to the stream.

Parameters:
b - The byte to write to the stream.

Throws:
IOException - If there is an error writing to the underlying stream.

writeContentStream
public void writeContentStream(CSContent contentStream)
throws java.io.IOException

writeDocument
public void writeDocument(STDocument doc)
throws java.io.IOException

writeEOL
public void writeEOL()
throws java.io.IOException

This will write an EOL to the stream.

Throws:
IOException - If there is an error writing to the stream

writeIndirectObject
public void writeIndirectObject(COSIndirectObject object)
throws java.io.IOException

writeObject
public void writeObject(COSObject object)
throws java.io.IOException

This will write a cos object to the stream

Parameters:
object - the object to write

Page 1387 of 1521


de.intarsys.pdf.writer.COSWriter

(continued from last page)

Throws:
IOException - If an error occurs while generating the data.

Page 1388 of 1521


Package
de.intarsys.tools.attribute

Page 1389 of 1521


de.intarsys.tools.attribute.Attribute

de.intarsys.tools.attribute
Class Attribute
java.lang.Object
|
+-de.intarsys.tools.attribute.Attribute

public class Attribute


extends Object

A generic object to be used as a key with IAttributeSupport.

ATTENTION: Do NOT override equals as this is intended to be used in secure environments where foreign code should not be
able to gain access to attributes.

Constructor Summary
public Attribute(String name)

Method Summary
String toString()

Constructors
Attribute
public Attribute(String name)

Methods
toString
public String toString()

Page 1390 of 1521


de.intarsys.tools.attribute.AttributeSupport

de.intarsys.tools.attribute
Class AttributeSupport
java.lang.Object
|
+-de.intarsys.tools.attribute.AttributeSupport
All Implemented Interfaces:
IAttributeSupport

public class AttributeSupport


extends Object
implements IAttributeSupport

A common implementation of IAttributeSupport for quick linking in a host object.

This is not thread safe.

Constructor Summary
public AttributeSupport()

Method Summary
Object getAttribute(Object key)

Object removeAttribute(Object key)

Object setAttribute(Object key, Object o)

Constructors
AttributeSupport
public AttributeSupport()

Methods
getAttribute
public Object getAttribute(Object key)

removeAttribute
public Object removeAttribute(Object key)

Page 1391 of 1521


de.intarsys.tools.attribute.AttributeSupport

(continued from last page)

setAttribute
public Object setAttribute(Object key,
Object o)

Page 1392 of 1521


de.intarsys.tools.attribute.IAttributeSupport

de.intarsys.tools.attribute
Interface IAttributeSupport
All Known Implementing Classes:
AttributeSupport, PDDocument, COSBasedObject, COSCompositeObject, COSDocument

public interface IAttributeSupport


extends

This interface declares support for "generic attributes".

This means the object implementing this interface may be extended transparently by its clients with name/value pairs. These
attributes and their values are stored but not interpreted by the object that implements this interface.

Method Summary
Object getAttribute(Object key)
get an attribute from the context

Object removeAttribute(Object key)


remove an attribute in the context

Object setAttribute(Object key, Object o)


set the value of an attribute in the context

Methods
setAttribute
public Object setAttribute(Object key,
Object o)

set the value of an attribute in the context

Parameters:
key - the name of the attribute to set
o - the new value the attribute

Returns:
The previously associated object for key

getAttribute
public Object getAttribute(Object key)

get an attribute from the context

Parameters:
key - the name of the attribute to get

Returns:
The value of the attribute to get

Page 1393 of 1521


de.intarsys.tools.attribute.IAttributeSupport

removeAttribute
public Object removeAttribute(Object key)

remove an attribute in the context

Parameters:
key - the name of the attribute to remove

Returns:
The previously associated object for key

Page 1394 of 1521


Package
de.intarsys.tools.authenticate

Page 1395 of 1521


de.intarsys.tools.authenticate.IPasswordProvider

de.intarsys.tools.authenticate
Interface IPasswordProvider

public interface IPasswordProvider


extends

A simple interface for a password provider. Implementors can provide passwords from any source, for example a database or a
GUI.

Method Summary
char[] getPassword()
Returns a password or null to indicate cancelation.

Methods
getPassword
public char[] getPassword()

Returns a password or null to indicate cancelation.

Returns:
a char[] containing the password or null

Page 1396 of 1521


de.intarsys.tools.authenticate.IPasswordValidator

de.intarsys.tools.authenticate
Interface IPasswordValidator

public interface IPasswordValidator


extends

A simple interface for a password validator.

Method Summary
boolean isValid(char[] password)
Check if the password provided by the user is valid.

Methods
isValid
public boolean isValid(char[] password)
throws java.io.IOException

Check if the password provided by the user is valid.

Parameters:
password - The password provided by the user.

Returns:
true if password valid.

Page 1397 of 1521


Package
de.intarsys.tools.locator

Page 1398 of 1521


de.intarsys.tools.locator.ByteArrayLocator

de.intarsys.tools.locator
Class ByteArrayLocator
java.lang.Object
|
+-de.intarsys.tools.locator.CommonLocator
|
+-de.intarsys.tools.locator.ByteArrayLocator
All Implemented Interfaces:
ILocator

public class ByteArrayLocator


extends CommonLocator

An adapter from a byte[] object to ILocator.

Constructor Summary
public ByteArrayLocator(byte[] data, String name, String type)

Method Summary
void delete()

boolean exists()

ILocator getChild(String name)

String getFullName()

java.io.InputStream getInputStream()

String getLocalName()

java.io.OutputStream getOutputStream()

ILocator getParent()

IRandomAccess getRandomAccess()

java.io.Reader getReader()

java.io.Reader getReader(String encoding)

String getType()

String getTypedName()

Page 1399 of 1521


de.intarsys.tools.locator.ByteArrayLocator

java.io.Writer getWriter()

java.io.Writer getWriter(String encoding)

boolean isDirectory()

boolean isOutOfSynch()

boolean isSynchSynchronous()

ILocator[] listLocators(ILocatorNameFilter filter)

void rename(String newName)

void synch()

java.net.URL toURL()

Constructors
ByteArrayLocator
public ByteArrayLocator(byte[] data,
String name,
String type)

Methods
getInputStream
public java.io.InputStream getInputStream()

getRandomAccess
public IRandomAccess getRandomAccess()

getChild
public ILocator getChild(String name)

isDirectory
public boolean isDirectory()

Page 1400 of 1521


de.intarsys.tools.locator.ByteArrayLocator

(continued from last page)

getFullName
public String getFullName()

getLocalName
public String getLocalName()

getTypedName
public String getTypedName()

getOutputStream
public java.io.OutputStream getOutputStream()

getParent
public ILocator getParent()

getReader
public java.io.Reader getReader()

getReader
public java.io.Reader getReader(String encoding)
throws java.io.IOException

isSynchSynchronous
public boolean isSynchSynchronous()

getType
public String getType()

Page 1401 of 1521


de.intarsys.tools.locator.ByteArrayLocator

(continued from last page)

getWriter
public java.io.Writer getWriter()

getWriter
public java.io.Writer getWriter(String encoding)
throws java.io.IOException

exists
public boolean exists()

listLocators
public ILocator[] listLocators(ILocatorNameFilter filter)

synch
public void synch()

toURL
public java.net.URL toURL()

isOutOfSynch
public boolean isOutOfSynch()

rename
public void rename(String newName)
throws java.io.IOException

delete
public void delete()
throws java.io.IOException

Page 1402 of 1521


de.intarsys.tools.locator.ClassLoaderResourceLocator

de.intarsys.tools.locator
Class ClassLoaderResourceLocator
java.lang.Object
|
+-de.intarsys.tools.locator.CommonLocator
|
+-de.intarsys.tools.locator.ClassLoaderResourceLocator
All Implemented Interfaces:
ILocator

public class ClassLoaderResourceLocator


extends CommonLocator

An ILocator for java resources identified directly by a class loader.

Constructor Summary
public ClassLoaderResourceLocator(ClassLoader classLoader, String name)

Method Summary
boolean equals(Object obj)

boolean exists()

ILocator getChild(String childName)

ClassLoader getClassLoader()
The java.lang.ClassLoader used to access the resource.

String getFullName()

java.io.InputStream getInputStream()

String getLocalName()

String getName()
The resource name defined when constructing this.

java.io.OutputStream getOutputStream()

ILocator getParent()

IRandomAccess getRandomAccess()

java.io.Reader getReader()

java.io.Reader getReader(String newEncoding)

Page 1403 of 1521


de.intarsys.tools.locator.ClassLoaderResourceLocator

String getType()

String getTypedName()

java.io.Writer getWriter()

java.io.Writer getWriter(String pEncoding)

int hashCode()

boolean isDirectory()

boolean isOutOfSynch()

boolean isReadOnly()

boolean isSynchSynchronous()

ILocator[] listLocators(ILocatorNameFilter filter)

void synch()

String toString()

java.net.URL toURL()

Constructors
ClassLoaderResourceLocator
public ClassLoaderResourceLocator(ClassLoader classLoader,
String name)

Methods
getChild
public ILocator getChild(String childName)

isDirectory
public boolean isDirectory()

Page 1404 of 1521


de.intarsys.tools.locator.ClassLoaderResourceLocator

(continued from last page)

getFullName
public String getFullName()

getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException

getLocalName
public String getLocalName()

getTypedName
public String getTypedName()

getName
public String getName()

The resource name defined when constructing this.

Returns:
The resource name defined when constructing this.

isOutOfSynch
public boolean isOutOfSynch()

getParent
public ILocator getParent()

getReader
public java.io.Reader getReader()
throws java.io.IOException

getReader
public java.io.Reader getReader(String newEncoding)
throws java.io.IOException

Page 1405 of 1521


de.intarsys.tools.locator.ClassLoaderResourceLocator

isSynchSynchronous
public boolean isSynchSynchronous()

getType
public String getType()

equals
public boolean equals(Object obj)

exists
public boolean exists()

hashCode
public int hashCode()

listLocators
public ILocator[] listLocators(ILocatorNameFilter filter)
throws java.io.IOException

synch
public void synch()

toString
public String toString()

getOutputStream
public java.io.OutputStream getOutputStream()
throws java.io.IOException

Page 1406 of 1521


de.intarsys.tools.locator.ClassLoaderResourceLocator

(continued from last page)

getWriter
public java.io.Writer getWriter()
throws java.io.IOException

getWriter
public java.io.Writer getWriter(String pEncoding)
throws java.io.IOException

getClassLoader
public ClassLoader getClassLoader()

The java.lang.ClassLoader used to access the resource.

Returns:
The java.lang.ClassLoader used to access the resource.

toURL
public java.net.URL toURL()

getRandomAccess
public IRandomAccess getRandomAccess()
throws java.io.IOException

isReadOnly
public boolean isReadOnly()

Page 1407 of 1521


de.intarsys.tools.locator.ClassResourceLocator

de.intarsys.tools.locator
Class ClassResourceLocator
java.lang.Object
|
+-de.intarsys.tools.locator.CommonLocator
|
+-de.intarsys.tools.locator.ClassResourceLocator
All Implemented Interfaces:
ILocator

public class ClassResourceLocator


extends CommonLocator

An ILocator for java resources relative to a given class.

Constructor Summary
public ClassResourceLocator(Class clazz, String name)

Method Summary
boolean equals(Object obj)

boolean exists()

ILocator getChild(String childName)

Class getClazz()
The java.lang.Class used to define this.

String getFullName()

java.io.InputStream getInputStream()

String getLocalName()

String getName()
The resource name used when constructing this.

java.io.OutputStream getOutputStream()

ILocator getParent()

IRandomAccess getRandomAccess()

java.io.Reader getReader()

java.io.Reader getReader(String newEncoding)

Page 1408 of 1521


de.intarsys.tools.locator.ClassResourceLocator

String getType()

String getTypedName()

java.io.Writer getWriter()

java.io.Writer getWriter(String pEncoding)

int hashCode()

boolean isDirectory()

boolean isOutOfSynch()

boolean isReadOnly()

boolean isSynchSynchronous()

ILocator[] listLocators(ILocatorNameFilter filter)

void synch()

String toString()

java.net.URL toURL()

Constructors
ClassResourceLocator
public ClassResourceLocator(Class clazz,
String name)

Methods
getChild
public ILocator getChild(String childName)

getClazz
public Class getClazz()

The java.lang.Class used to define this.

The resource will be accessed the "getResourceAsStream" of this java.lang.Class object.

Page 1409 of 1521


de.intarsys.tools.locator.ClassResourceLocator

(continued from last page)

Returns:
The java.lang.Class used to define this.

isDirectory
public boolean isDirectory()

getFullName
public String getFullName()

getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException

getLocalName
public String getLocalName()

getName
public String getName()

The resource name used when constructing this.

Returns:
The resource name used when constructing this.

isOutOfSynch
public boolean isOutOfSynch()

getParent
public ILocator getParent()

getReader
public java.io.Reader getReader()
throws java.io.IOException

Page 1410 of 1521


de.intarsys.tools.locator.ClassResourceLocator

(continued from last page)

getReader
public java.io.Reader getReader(String newEncoding)
throws java.io.IOException

isSynchSynchronous
public boolean isSynchSynchronous()

getType
public String getType()

getTypedName
public String getTypedName()

equals
public boolean equals(Object obj)

exists
public boolean exists()

hashCode
public int hashCode()

listLocators
public ILocator[] listLocators(ILocatorNameFilter filter)
throws java.io.IOException

synch
public void synch()

Page 1411 of 1521


de.intarsys.tools.locator.ClassResourceLocator

(continued from last page)

toString
public String toString()

getOutputStream
public java.io.OutputStream getOutputStream()
throws java.io.IOException

getWriter
public java.io.Writer getWriter()
throws java.io.IOException

getWriter
public java.io.Writer getWriter(String pEncoding)
throws java.io.IOException

toURL
public java.net.URL toURL()

getRandomAccess
public IRandomAccess getRandomAccess()
throws java.io.IOException

isReadOnly
public boolean isReadOnly()

Page 1412 of 1521


de.intarsys.tools.locator.CommonLocator

de.intarsys.tools.locator
Class CommonLocator
java.lang.Object
|
+-de.intarsys.tools.locator.CommonLocator
All Implemented Interfaces:
ILocator

Direct Known Subclasses:


ByteArrayLocator, ClassLoaderResourceLocator, ClassResourceLocator, FileLocator, LocatorViewport,
StreamLocator, StringLocator, TransientLocator

public abstract class CommonLocator


extends Object
implements ILocator

Constructor Summary
public CommonLocator()

Method Summary
void delete()

boolean isReadOnly()

void rename(String newName)

void setReadOnly()

Constructors
CommonLocator
public CommonLocator()

Methods
rename
public void rename(String newName)
throws java.io.IOException

Page 1413 of 1521


de.intarsys.tools.locator.CommonLocator

delete
public void delete()
throws java.io.IOException

setReadOnly
public void setReadOnly()

isReadOnly
public boolean isReadOnly()

Page 1414 of 1521


de.intarsys.tools.locator.FileLocator

de.intarsys.tools.locator
Class FileLocator
java.lang.Object
|
+-de.intarsys.tools.locator.CommonLocator
|
+-de.intarsys.tools.locator.FileLocator
All Implemented Interfaces:
ILocator

public class FileLocator


extends CommonLocator

File based implementation of ILocator.

Constructor Summary
public FileLocator(java.io.File file)

public FileLocator(String path)

Method Summary
void delete()

boolean equals(Object obj)

boolean exists()

java.io.File getCanonicalFile()
The canonical file represented by this.

ILocator getChild(String name)

java.io.File getFile()
Answer the file represented by this.

String getFullName()

java.io.InputStream getInputStream()

String getLocalName()

java.io.OutputStream getOutputStream()

ILocator getParent()

IRandomAccess getRandomAccess()

Page 1415 of 1521


de.intarsys.tools.locator.FileLocator

java.io.Reader getReader()

java.io.Reader getReader(String newEncoding)

String getType()

String getTypedName()

java.io.Writer getWriter()

java.io.Writer getWriter(String newEncoding)

int hashCode()

boolean isDirectory()

boolean isOutOfSynch()

boolean isReadOnly()

boolean isSynchSynchronous()

boolean isUseTempFile()
true if temp file should be used.

ILocator[] listLocators(ILocatorNameFilter filter)

void rename(String newName)

void setSynchSynchronous(boolean synchSynchronous)

void setUseTempFile(boolean useTempFile)

void synch()

String toString()

java.net.URL toURL()

Constructors
FileLocator
public FileLocator(java.io.File file)

Page 1416 of 1521


de.intarsys.tools.locator.FileLocator

(continued from last page)

FileLocator
public FileLocator(String path)

Methods
equals
public boolean equals(Object obj)

exists
public boolean exists()

getCanonicalFile
public java.io.File getCanonicalFile()

The canonical file represented by this.

Returns:
The canonical file represented by this.

getChild
public ILocator getChild(String name)

getFile
public java.io.File getFile()

Answer the file represented by this.

Returns:
The canonical file represented by this.

getFullName
public String getFullName()

getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException

Page 1417 of 1521


de.intarsys.tools.locator.FileLocator

(continued from last page)

getLocalName
public String getLocalName()

getOutputStream
public java.io.OutputStream getOutputStream()
throws java.io.IOException

getParent
public ILocator getParent()

getRandomAccess
public IRandomAccess getRandomAccess()
throws java.io.IOException

getReader
public java.io.Reader getReader()
throws java.io.IOException

getReader
public java.io.Reader getReader(String newEncoding)
throws java.io.IOException

getType
public String getType()

getTypedName
public String getTypedName()

getWriter
public java.io.Writer getWriter()
throws java.io.IOException

Page 1418 of 1521


de.intarsys.tools.locator.FileLocator

getWriter
public java.io.Writer getWriter(String newEncoding)
throws java.io.IOException

hashCode
public int hashCode()

isDirectory
public boolean isDirectory()

isOutOfSynch
public boolean isOutOfSynch()

isSynchSynchronous
public boolean isSynchSynchronous()

isUseTempFile
public boolean isUseTempFile()

true if temp file should be used.

Returns:
true if temp file should be used.

listLocators
public ILocator[] listLocators(ILocatorNameFilter filter)
throws java.io.IOException

setSynchSynchronous
public void setSynchSynchronous(boolean synchSynchronous)

Parameters:
synchSynchronous

Page 1419 of 1521


de.intarsys.tools.locator.FileLocator

(continued from last page)

setUseTempFile
public void setUseTempFile(boolean useTempFile)

Parameters:
useTempFile

synch
public void synch()

toString
public String toString()

toURL
public java.net.URL toURL()

isReadOnly
public boolean isReadOnly()

rename
public void rename(String newName)
throws java.io.IOException

delete
public void delete()
throws java.io.IOException

Page 1420 of 1521


de.intarsys.tools.locator.FileLocatorFactory

de.intarsys.tools.locator
Class FileLocatorFactory
java.lang.Object
|
+-de.intarsys.tools.locator.FileLocatorFactory
All Implemented Interfaces:
ILocatorFactory

public class FileLocatorFactory


extends Object
implements ILocatorFactory

The factory for FileLocator objects.

FileLocator instances are created either using an absolute path name or are looked up relative to the factorys search path.
Multiple search paths may be defined.

Field Summary
public static final PATH_SEPARATOR
The separator character for the definition of multiple search paths
Value: ;

Constructor Summary
public FileLocatorFactory()
Create a new factory.

Method Summary
ILocator createLocator(String path)
The file locator factory supports looking up resources in multiple paths.

String getSearchPathDefinition()

java.util.List getSearchPaths()

boolean isSynchSynchronous()

void setSearchPathDefinition(String searchPath)

void setSearchPaths(java.util.List searchPaths)

void setSynchSynchronous(boolean synchSynchronous)

Fields

Page 1421 of 1521


de.intarsys.tools.locator.FileLocatorFactory

(continued from last page)

PATH_SEPARATOR
public static final java.lang.String PATH_SEPARATOR

The separator character for the definition of multiple search paths


Constant value: ;

Constructors
FileLocatorFactory
public FileLocatorFactory()

Create a new factory.

Methods
setSearchPathDefinition
public void setSearchPathDefinition(String searchPath)

getSearchPathDefinition
public String getSearchPathDefinition()

setSearchPaths
public void setSearchPaths(java.util.List searchPaths)

getSearchPaths
public java.util.List getSearchPaths()

setSynchSynchronous
public void setSynchSynchronous(boolean synchSynchronous)

isSynchSynchronous
public boolean isSynchSynchronous()

createLocator
public ILocator createLocator(String path)

Page 1422 of 1521


de.intarsys.tools.locator.FileLocatorFactory

(continued from last page)

The file locator factory supports looking up resources in multiple paths. To preserve compatibility to ILocatorFactory, the
last locator created is returned if no match is found. This is a valid locator, even so no existing physical resource is
designated.

See Also:
ILocatorFactory.createLocator(String)

Page 1423 of 1521


de.intarsys.tools.locator.ILocator

de.intarsys.tools.locator
Interface ILocator
All Known Implementing Classes:
CommonLocator, ReadOnlyLocator

public interface ILocator


extends de.intarsys.tools.component.ISynchronizable

The locator specifies the physical location of a resource.

Method Summary
void delete()
Delete the artifact referenced by this.

boolean exists()
Answer true if the location designated by this exists.

ILocator getChild(String name)


The locator for the resource name within the context of this.

String getFullName()
The full physical name of this.

java.io.InputStream getInputStream()
Return an java.io.InputStream on the data represented by the receiver.

String getLocalName()
The local name of the receiver within its parent.

java.io.OutputStream getOutputStream()
Return an java.io.OutputStream on the location represented by the receiver.

ILocator getParent()
The ILocator that is one hierarchy level up or null.

IRandomAccess getRandomAccess()
The IRandomAccess for this.

java.io.Reader getReader()
A java.io.Reader on the data represented by the receiver.

java.io.Reader getReader(String encoding)


A java.io.Reader on the data represented by the receiver for the given encoding.

String getType()
The type of the resource.

String getTypedName()
The qualified local name of the receiver within its parent that includes the type specification
for the destination if appropriate.

java.io.Writer getWriter()
A java.io.Writer on the location represented by the receiver.

Page 1424 of 1521


de.intarsys.tools.locator.ILocator

java.io.Writer getWriter(String encoding)


A java.io.Writer on the location represented by the receiver for the given encoding.

boolean isDirectory()
Answer true if the location designated by this is a directory.

boolean isReadOnly()
true if the specified resource is read only.

ILocator[] listLocators(ILocatorNameFilter filter)


Return an array of ILocator that are children of the receiver that conform to filter.

void rename(String newName)


Rename the complete physical name to newName.

void setReadOnly()
Make the receiver read only.

java.net.URL toURL()
The location designated by this as an java.net.URL.

Methods
getChild
public ILocator getChild(String name)

The locator for the resource name within the context of this. This may for example be an ILocator to a file within a
directory.

Parameters:
name - The name of the resource to be located.

Returns:
The ILocator for the resource with the name "name" within the context of this.

isDirectory
public boolean isDirectory()

Answer true if the location designated by this is a directory. A directory location serves as a container for other resources,
you can never getInputStream on this.

Returns:
Answer true if the location designated by this is a directory.

getFullName
public String getFullName()

The full physical name of this.

This method returns a representation that is proprietary to the underlying physical representation, for example a file name,
a SQL statement or so on.

Returns:
The full physical name of the receiver.

Page 1425 of 1521


de.intarsys.tools.locator.ILocator

getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException

Return an java.io.InputStream on the data represented by the receiver.

Returns:
An java.io.InputStream on the data represented by the receiver.

Throws:
IOException

getLocalName
public String getLocalName()

The local name of the receiver within its parent.

Returns:
The local name of the receiver within its parent.

getTypedName
public String getTypedName()

The qualified local name of the receiver within its parent that includes the type specification for the destination if
appropriate. This is for example a filename with its correct suffix. Some locator may return the same name as
"getLocalName".

Returns:
The qualified local name of the receiver within its parent that includes the type specification for the destination if
appropriate.

getOutputStream
public java.io.OutputStream getOutputStream()
throws java.io.IOException

Return an java.io.OutputStream on the location represented by the receiver.

Returns:
An java.io.OutputStream on the location represented by the receiver.

Throws:
IOException

getParent
public ILocator getParent()

The ILocator that is one hierarchy level up or null. This may be for example the directory where the currently designated
resource is found.

Returns:
The ILocatorthat is one hierarchy level up or null.

Page 1426 of 1521


de.intarsys.tools.locator.ILocator

(continued from last page)

getRandomAccess
public IRandomAccess getRandomAccess()
throws java.io.IOException

The IRandomAccess for this.

Returns:
The IRandomAccess for this.

Throws:
IOException

getReader
public java.io.Reader getReader()
throws java.io.IOException

A java.io.Reader on the data represented by the receiver.

Returns:
A java.io.Reader on the data represented by the receiver.

Throws:
IOException

getReader
public java.io.Reader getReader(String encoding)
throws java.io.IOException

A java.io.Reader on the data represented by the receiver for the given encoding.

Parameters:
encoding - The encoding.

Returns:
A java.io.Reader on the data represented by the receiver for the given encoding.

Throws:
IOException

getType
public String getType()

The type of the resource. This may be for example a mime type or the file extension of the underlying file.

Returns:
The type of the resource

getWriter
public java.io.Writer getWriter()
throws java.io.IOException

A java.io.Writer on the location represented by the receiver.

Returns:

Page 1427 of 1521


de.intarsys.tools.locator.ILocator

(continued from last page)

A java.io.Writer on the location represented by the receiver.

Throws:
IOException

getWriter
public java.io.Writer getWriter(String encoding)
throws java.io.IOException

A java.io.Writer on the location represented by the receiver for the given encoding.

Parameters:
encoding - The encoding.

Returns:
A java.io.Writer on the location represented by the receiver for the given encoding.

Throws:
IOException

exists
public boolean exists()

Answer true if the location designated by this exists.

Returns:
Answer true if the location designated by this exists.

listLocators
public ILocator[] listLocators(ILocatorNameFilter filter)
throws java.io.IOException

Return an array of ILocator that are children of the receiver that conform to filter. This method never returns null.

Parameters:
filter - The filter used to examine the child resources.

Returns:
An array of ILocator objects that conform to the filter argument.

Throws:
IOException

toURL
public java.net.URL toURL()

The location designated by this as an java.net.URL.

Returns:
The location designated by this as an java.net.URL.

isReadOnly
public boolean isReadOnly()

Page 1428 of 1521


de.intarsys.tools.locator.ILocator

(continued from last page)

true if the specified resource is read only.

Returns:
true if the specified resource is read only.

rename
public void rename(String newName)
throws java.io.IOException

Rename the complete physical name to newName.

Parameters:
newName - The new name of the ILocator. The new name is expected to contain both local and type part of the
name.

Throws:
IOException

delete
public void delete()
throws java.io.IOException

Delete the artifact referenced by this.

Throws:
IOException

setReadOnly
public void setReadOnly()

Make the receiver read only. This is a one way switch only.

Page 1429 of 1521


de.intarsys.tools.locator.ILocatorFactory

de.intarsys.tools.locator
Interface ILocatorFactory
All Known Implementing Classes:
FileLocatorFactory

public interface ILocatorFactory


extends

A factory for ILocator objects.

Method Summary
ILocator createLocator(String location)
Create a ILocator object.

Methods
createLocator
public ILocator createLocator(String location)

Create a ILocator object.

path may for example define a file in the file system.

Parameters:
location - The fully qualified location definition.

Returns:
The ILocator object created from the location.

Page 1430 of 1521


de.intarsys.tools.locator.ILocatorNameFilter

de.intarsys.tools.locator
Interface ILocatorNameFilter

public interface ILocatorNameFilter


extends

ILocatorNameFilter objects can filter ILocator objects when listing their children.

Method Summary
boolean accept(ILocator parent, String name)
This method returns true if the ILocator with name name within parent should be
included in the result list.

Methods
accept
public boolean accept(ILocator parent,
String name)

This method returns true if the ILocator with name name within parent should be included in the result list.

Parameters:
parent - The parent locator.
name - The name of the locator within the parent.

Returns:
true if locator should be included in the result list.

Page 1431 of 1521


de.intarsys.tools.locator.ILocatorSupport

de.intarsys.tools.locator
Interface ILocatorSupport
All Known Implementing Classes:
STDocument, PDDocument, COSDocument

public interface ILocatorSupport


extends

Indicate support for locating the receivers resource physically.

Method Summary
ILocator getLocator()
Return the ILocator that defines the physical resource location for the reciver.

Methods
getLocator
public ILocator getLocator()

Return the ILocator that defines the physical resource location for the reciver.

Returns:
Return the ILocator that defines the physical resource location for the reciver.

Page 1432 of 1521


de.intarsys.tools.locator.LocatorFactory

de.intarsys.tools.locator
Class LocatorFactory
java.lang.Object
|
+-de.intarsys.tools.locator.LocatorFactory

public class LocatorFactory


extends Object

Singleton access to the ILocatorFactory.

Constructor Summary
public LocatorFactory()

Method Summary
static get()
ILocatorFactory

static void set(ILocatorFactory factory)

Constructors
LocatorFactory
public LocatorFactory()

Methods
get
public static ILocatorFactory get()

set
public static void set(ILocatorFactory factory)

Page 1433 of 1521


de.intarsys.tools.locator.LocatorViewport

de.intarsys.tools.locator
Class LocatorViewport
java.lang.Object
|
+-de.intarsys.tools.locator.CommonLocator
|
+-de.intarsys.tools.locator.LocatorViewport
All Implemented Interfaces:
ILocator

public class LocatorViewport


extends CommonLocator

A viewport implementation for ILocator. This object defines a range of bytes visible to the client of the viewport.

Constructor Summary
public LocatorViewport(ILocator delegate)

Method Summary
void delete()

boolean exists()

ILocator getChild(String name)

ILocator getDelegate()

long getEnd()

String getFullName()

java.io.InputStream getInputStream()

String getLocalName()

String getName()

java.io.OutputStream getOutputStream()

ILocator getParent()

IRandomAccess getRandomAccess()

java.io.Reader getReader()

Page 1434 of 1521


de.intarsys.tools.locator.LocatorViewport

java.io.Reader getReader(String encoding)

long getStart()

String getType()

String getTypedName()

java.io.Writer getWriter()

java.io.Writer getWriter(String encoding)

boolean isDirectory()

boolean isOutOfSynch()

boolean isReadOnly()

boolean isSynchSynchronous()

ILocator[] listLocators(ILocatorNameFilter filter)

void rename(String newName)

void setEnd(long end)

void setName(String name)

void setStart(long start)

void synch()

java.net.URL toURL()

Constructors
LocatorViewport
public LocatorViewport(ILocator delegate)

Methods
exists
public boolean exists()

Page 1435 of 1521


de.intarsys.tools.locator.LocatorViewport

getChild
public ILocator getChild(String name)

getFullName
public String getFullName()

getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException

getLocalName
public String getLocalName()

getOutputStream
public java.io.OutputStream getOutputStream()
throws java.io.IOException

getParent
public ILocator getParent()

getRandomAccess
public IRandomAccess getRandomAccess()
throws java.io.IOException

getReader
public java.io.Reader getReader()
throws java.io.IOException

getReader
public java.io.Reader getReader(String encoding)
throws java.io.IOException

Page 1436 of 1521


de.intarsys.tools.locator.LocatorViewport

getType
public String getType()

getTypedName
public String getTypedName()

getWriter
public java.io.Writer getWriter()
throws java.io.IOException

getWriter
public java.io.Writer getWriter(String encoding)
throws java.io.IOException

isDirectory
public boolean isDirectory()

listLocators
public ILocator[] listLocators(ILocatorNameFilter filter)
throws java.io.IOException

toURL
public java.net.URL toURL()

isOutOfSynch
public boolean isOutOfSynch()

isSynchSynchronous
public boolean isSynchSynchronous()

Page 1437 of 1521


de.intarsys.tools.locator.LocatorViewport

synch
public void synch()

getDelegate
public ILocator getDelegate()

Returns:

getEnd
public long getEnd()

setEnd
public void setEnd(long end)

getStart
public long getStart()

setStart
public void setStart(long start)

getName
public String getName()

setName
public void setName(String name)

isReadOnly
public boolean isReadOnly()

Page 1438 of 1521


de.intarsys.tools.locator.LocatorViewport

(continued from last page)

rename
public void rename(String newName)
throws java.io.IOException

delete
public void delete()
throws java.io.IOException

Page 1439 of 1521


de.intarsys.tools.locator.ReadOnlyLocator

de.intarsys.tools.locator
Class ReadOnlyLocator
java.lang.Object
|
+-de.intarsys.tools.locator.ReadOnlyLocator
All Implemented Interfaces:
ILocator

public class ReadOnlyLocator


extends Object
implements ILocator

Constructor Summary
public ReadOnlyLocator(ILocator delegate)

Method Summary
void delete()

boolean exists()

ILocator getChild(String name)

ILocator getDelegate()

String getFullName()

java.io.InputStream getInputStream()

String getLocalName()

java.io.OutputStream getOutputStream()

ILocator getParent()

IRandomAccess getRandomAccess()

java.io.Reader getReader()

java.io.Reader getReader(String encoding)

String getType()

String getTypedName()

Page 1440 of 1521


de.intarsys.tools.locator.ReadOnlyLocator

java.io.Writer getWriter()

java.io.Writer getWriter(String encoding)

boolean isDirectory()

boolean isOutOfSynch()

boolean isReadOnly()

boolean isSynchSynchronous()

ILocator[] listLocators(ILocatorNameFilter filter)

void rename(String newName)

void setReadOnly()

void synch()

java.net.URL toURL()

Constructors
ReadOnlyLocator
public ReadOnlyLocator(ILocator delegate)

Methods
getLocalName
public String getLocalName()

getDelegate
public ILocator getDelegate()

exists
public boolean exists()

Page 1441 of 1521


de.intarsys.tools.locator.ReadOnlyLocator

(continued from last page)

getChild
public ILocator getChild(String name)

getFullName
public String getFullName()

getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException

getOutputStream
public java.io.OutputStream getOutputStream()
throws java.io.IOException

getParent
public ILocator getParent()

getRandomAccess
public IRandomAccess getRandomAccess()
throws java.io.IOException

getReader
public java.io.Reader getReader()
throws java.io.IOException

getReader
public java.io.Reader getReader(String encoding)
throws java.io.IOException

getType
public String getType()

Page 1442 of 1521


de.intarsys.tools.locator.ReadOnlyLocator

getTypedName
public String getTypedName()

getWriter
public java.io.Writer getWriter()
throws java.io.IOException

getWriter
public java.io.Writer getWriter(String encoding)
throws java.io.IOException

isDirectory
public boolean isDirectory()

isOutOfSynch
public boolean isOutOfSynch()

isSynchSynchronous
public boolean isSynchSynchronous()

listLocators
public ILocator[] listLocators(ILocatorNameFilter filter)
throws java.io.IOException

synch
public void synch()

toURL
public java.net.URL toURL()

Page 1443 of 1521


de.intarsys.tools.locator.ReadOnlyLocator

delete
public void delete()
throws java.io.IOException

isReadOnly
public boolean isReadOnly()

rename
public void rename(String newName)
throws java.io.IOException

setReadOnly
public void setReadOnly()

Page 1444 of 1521


de.intarsys.tools.locator.StreamLocator

de.intarsys.tools.locator
Class StreamLocator
java.lang.Object
|
+-de.intarsys.tools.locator.CommonLocator
|
+-de.intarsys.tools.locator.StreamLocator
All Implemented Interfaces:
ILocator

public class StreamLocator


extends CommonLocator

A simple adapter from java.io.InputStream to ILocator.

Constructor Summary
public StreamLocator(java.io.InputStream stream, String name, String type)

public StreamLocator(java.io.OutputStream stream, String name, String type)

public StreamLocator(java.io.InputStream is, java.io.OutputStream os, String


name, String type)

Method Summary
void delete()

boolean exists()

ILocator getChild(String child)

String getFullName()

java.io.InputStream getInputStream()

String getLocalName()

java.io.OutputStream getOutputStream()

ILocator getParent()

IRandomAccess getRandomAccess()

java.io.Reader getReader()

java.io.Reader getReader(String encoding)

Page 1445 of 1521


de.intarsys.tools.locator.StreamLocator

String getType()

String getTypedName()

java.io.Writer getWriter()

java.io.Writer getWriter(String encoding)

boolean isDirectory()

boolean isOutOfSynch()

boolean isReadOnly()

boolean isSynchSynchronous()

ILocator[] listLocators(ILocatorNameFilter filter)

void rename(String newName)

void synch()

java.net.URL toURL()

Constructors
StreamLocator
public StreamLocator(java.io.InputStream stream,
String name,
String type)

StreamLocator
public StreamLocator(java.io.OutputStream stream,
String name,
String type)

StreamLocator
public StreamLocator(java.io.InputStream is,
java.io.OutputStream os,
String name,
String type)

Methods

Page 1446 of 1521


de.intarsys.tools.locator.StreamLocator

(continued from last page)

getChild
public ILocator getChild(String child)

isDirectory
public boolean isDirectory()

getFullName
public String getFullName()

getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException

getLocalName
public String getLocalName()

getTypedName
public String getTypedName()

isOutOfSynch
public boolean isOutOfSynch()

getOutputStream
public java.io.OutputStream getOutputStream()

getParent
public ILocator getParent()

Page 1447 of 1521


de.intarsys.tools.locator.StreamLocator

(continued from last page)

getReader
public java.io.Reader getReader()
throws java.io.IOException

getReader
public java.io.Reader getReader(String encoding)
throws java.io.IOException

isSynchSynchronous
public boolean isSynchSynchronous()

getType
public String getType()

getWriter
public java.io.Writer getWriter()

getWriter
public java.io.Writer getWriter(String encoding)
throws java.io.IOException

exists
public boolean exists()

listLocators
public ILocator[] listLocators(ILocatorNameFilter filter)

synch
public void synch()

Page 1448 of 1521


de.intarsys.tools.locator.StreamLocator

(continued from last page)

toURL
public java.net.URL toURL()

getRandomAccess
public IRandomAccess getRandomAccess()
throws java.io.IOException

isReadOnly
public boolean isReadOnly()

rename
public void rename(String newName)
throws java.io.IOException

delete
public void delete()
throws java.io.IOException

Page 1449 of 1521


de.intarsys.tools.locator.StringLocator

de.intarsys.tools.locator
Class StringLocator
java.lang.Object
|
+-de.intarsys.tools.locator.CommonLocator
|
+-de.intarsys.tools.locator.StringLocator
All Implemented Interfaces:
ILocator

public class StringLocator


extends CommonLocator

A simple adapter from a java.lang.String to ILocator.

Constructor Summary
public StringLocator(String content, String name, String type)

Method Summary
void delete()

boolean exists()

ILocator getChild(String child)

String getFullName()

java.io.InputStream getInputStream()

String getLocalName()

java.io.OutputStream getOutputStream()

ILocator getParent()

IRandomAccess getRandomAccess()

java.io.Reader getReader()

java.io.Reader getReader(String encoding)

String getType()

String getTypedName()

Page 1450 of 1521


de.intarsys.tools.locator.StringLocator

java.io.Writer getWriter()

java.io.Writer getWriter(String encoding)

boolean isDirectory()

boolean isOutOfSynch()

boolean isReadOnly()

boolean isSynchSynchronous()

ILocator[] listLocators(ILocatorNameFilter filter)

void rename(String newName)

void synch()

java.net.URL toURL()

Constructors
StringLocator
public StringLocator(String content,
String name,
String type)

Methods
getFullName
public String getFullName()

getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException

getLocalName
public String getLocalName()

Page 1451 of 1521


de.intarsys.tools.locator.StringLocator

(continued from last page)

getTypedName
public String getTypedName()

getReader
public java.io.Reader getReader()
throws java.io.IOException

getReader
public java.io.Reader getReader(String encoding)
throws java.io.IOException

getType
public String getType()

listLocators
public ILocator[] listLocators(ILocatorNameFilter filter)
throws java.io.IOException

isDirectory
public boolean isDirectory()

exists
public boolean exists()

getParent
public ILocator getParent()

getChild
public ILocator getChild(String child)

Page 1452 of 1521


de.intarsys.tools.locator.StringLocator

(continued from last page)

isOutOfSynch
public boolean isOutOfSynch()

isSynchSynchronous
public boolean isSynchSynchronous()

synch
public void synch()

getOutputStream
public java.io.OutputStream getOutputStream()
throws java.io.IOException

getWriter
public java.io.Writer getWriter()
throws java.io.IOException

getWriter
public java.io.Writer getWriter(String encoding)
throws java.io.IOException

toURL
public java.net.URL toURL()

getRandomAccess
public IRandomAccess getRandomAccess()
throws java.io.IOException

isReadOnly
public boolean isReadOnly()

Page 1453 of 1521


de.intarsys.tools.locator.StringLocator

(continued from last page)

rename
public void rename(String newName)
throws java.io.IOException

delete
public void delete()
throws java.io.IOException

Page 1454 of 1521


de.intarsys.tools.locator.TransientLocator

de.intarsys.tools.locator
Class TransientLocator
java.lang.Object
|
+-de.intarsys.tools.locator.CommonLocator
|
+-de.intarsys.tools.locator.TransientLocator
All Implemented Interfaces:
ILocator

public class TransientLocator


extends CommonLocator

A "non persistent" locator. This is used as a placeholder where an ILocator is necessary but no real location is yet defined.

Constructor Summary
public TransientLocator(String name, String type)

Method Summary
void delete()

boolean equals(Object obj)

boolean exists()

ILocator getChild(String name)

String getFullName()

java.io.InputStream getInputStream()

String getLocalName()

java.io.OutputStream getOutputStream()

ILocator getParent()

IRandomAccess getRandomAccess()

java.io.Reader getReader()

java.io.Reader getReader(String encoding)

String getType()

Page 1455 of 1521


de.intarsys.tools.locator.TransientLocator

String getTypedName()

java.io.Writer getWriter()

java.io.Writer getWriter(String encoding)

int hashCode()

boolean isAlwaysUnchanged()

boolean isDirectory()

boolean isOutOfSynch()

boolean isReadOnly()

boolean isSynchSynchronous()

ILocator[] listLocators(ILocatorNameFilter filter)

void rename(String newName)

void setAlwaysUnchanged(boolean paramAlwaysUnchanged)

void setLocalName(String name)

void synch()

java.net.URL toURL()

Constructors
TransientLocator
public TransientLocator(String name,
String type)

Methods
equals
public boolean equals(Object obj)

Page 1456 of 1521


de.intarsys.tools.locator.TransientLocator

(continued from last page)

exists
public boolean exists()

getChild
public ILocator getChild(String name)

getFullName
public String getFullName()

getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException

getLocalName
public String getLocalName()

getOutputStream
public java.io.OutputStream getOutputStream()
throws java.io.IOException

getParent
public ILocator getParent()

getRandomAccess
public IRandomAccess getRandomAccess()
throws java.io.IOException

getReader
public java.io.Reader getReader()
throws java.io.IOException

Page 1457 of 1521


de.intarsys.tools.locator.TransientLocator

(continued from last page)

getReader
public java.io.Reader getReader(String encoding)
throws java.io.IOException

getType
public String getType()

getTypedName
public String getTypedName()

getWriter
public java.io.Writer getWriter()
throws java.io.IOException

getWriter
public java.io.Writer getWriter(String encoding)
throws java.io.IOException

hashCode
public int hashCode()

isAlwaysUnchanged
public boolean isAlwaysUnchanged()

isDirectory
public boolean isDirectory()

isOutOfSynch
public boolean isOutOfSynch()

Page 1458 of 1521


de.intarsys.tools.locator.TransientLocator

(continued from last page)

isReadOnly
public boolean isReadOnly()

isSynchSynchronous
public boolean isSynchSynchronous()

listLocators
public ILocator[] listLocators(ILocatorNameFilter filter)
throws java.io.IOException

rename
public void rename(String newName)
throws java.io.IOException

setAlwaysUnchanged
public void setAlwaysUnchanged(boolean paramAlwaysUnchanged)

setLocalName
public void setLocalName(String name)

synch
public void synch()

toURL
public java.net.URL toURL()

delete
public void delete()
throws java.io.IOException

Page 1459 of 1521


Package
de.intarsys.tools.randomaccess

Page 1460 of 1521


de.intarsys.tools.randomaccess.AbstractRandomAccess

de.intarsys.tools.randomaccess
Class AbstractRandomAccess
java.lang.Object
|
+-de.intarsys.tools.randomaccess.AbstractRandomAccess
All Implemented Interfaces:
IRandomAccess

Direct Known Subclasses:


BufferedRandomAccess, RandomAccessByteArray, RandomAccessFile, RandomAccessFilter

public abstract class AbstractRandomAccess


extends Object
implements IRandomAccess

Supports reading and writing to a random access data container. A random access data container behaves like a large array of
bytes.

Constructor Summary
public AbstractRandomAccess()

Method Summary
java.io.InputStream asInputStream()

java.io.OutputStream asOutputStream()

void mark()

void reset()

Constructors
AbstractRandomAccess
public AbstractRandomAccess()

Methods
asInputStream
public java.io.InputStream asInputStream()

Page 1461 of 1521


de.intarsys.tools.randomaccess.AbstractRandomAccess

asOutputStream
public java.io.OutputStream asOutputStream()

mark
public void mark()
throws java.io.IOException

reset
public void reset()
throws java.io.IOException

Page 1462 of 1521


de.intarsys.tools.randomaccess.BufferedRandomAccess

de.intarsys.tools.randomaccess
Class BufferedRandomAccess
java.lang.Object
|
+-de.intarsys.tools.randomaccess.AbstractRandomAccess
|
+-de.intarsys.tools.randomaccess.BufferedRandomAccess
All Implemented Interfaces:
IRandomAccess

public class BufferedRandomAccess


extends AbstractRandomAccess

todo 1 length reply may be invalid

Constructor Summary
public BufferedRandomAccess(IRandomAccess randomAccess)

public BufferedRandomAccess(IRandomAccess randomAccess, int bufferSize)

Method Summary
void close()

void flush()

long getLength()

long getOffset()

boolean isReadOnly()

int read()

int read(byte[] buffer)

int read(byte[] buffer, int start, int numBytes)

void seek(long offset)

void seekBy(long delta)

void setLength(long newLength)

void write(byte[] buffer)

Page 1463 of 1521


de.intarsys.tools.randomaccess.BufferedRandomAccess

void write(byte[] buffer, int start, int numBytes)

void write(int b)

Constructors
BufferedRandomAccess
public BufferedRandomAccess(IRandomAccess randomAccess)

BufferedRandomAccess
public BufferedRandomAccess(IRandomAccess randomAccess,
int bufferSize)

Methods
close
public void close()
throws java.io.IOException

flush
public void flush()
throws java.io.IOException

getLength
public long getLength()
throws java.io.IOException

getOffset
public long getOffset()
throws java.io.IOException

isReadOnly
public boolean isReadOnly()

Page 1464 of 1521


de.intarsys.tools.randomaccess.BufferedRandomAccess

read
public int read()
throws java.io.IOException

read
public int read(byte[] buffer)
throws java.io.IOException

read
public int read(byte[] buffer,
int start,
int numBytes)
throws java.io.IOException

seek
public void seek(long offset)
throws java.io.IOException

seekBy
public void seekBy(long delta)
throws java.io.IOException

setLength
public void setLength(long newLength)
throws java.io.IOException

write
public void write(byte[] buffer)
throws java.io.IOException

write
public void write(byte[] buffer,
int start,
int numBytes)
throws java.io.IOException

Page 1465 of 1521


de.intarsys.tools.randomaccess.BufferedRandomAccess

write
public void write(int b)
throws java.io.IOException

Page 1466 of 1521


de.intarsys.tools.randomaccess.IRandomAccess

de.intarsys.tools.randomaccess
Interface IRandomAccess
All Known Implementing Classes:
AbstractRandomAccess

public interface IRandomAccess


extends

An interface for an object that can randomly access bytes in a data stream.

This is an abstraction of RandomAccessFile to support other data storage objects (like byte arrays and so on).

Method Summary
java.io.InputStream asInputStream()
A java.io.InputStream view on the data structure.

java.io.OutputStream asOutputStream()
A java.io.OutputStream view on the data structure.

void close()
Closes this random access data container and releases any system resources associated with
the stream.

void flush()
Force changes to be made persistent.

long getLength()
Returns the length of this data container.

long getOffset()
Returns the current offset in this data container.

boolean isReadOnly()
true if this is a read only data container.

void mark()
Mark the current offset into the data in a stack like manner.

int read()
Reads a byte of data from this data container.

int read(byte[] buffer)


Reads up to buffer.length bytes of data from this data container into an array of bytes.

int read(byte[] buffer, int start, int numBytes)


Reads up to len bytes of data from this data container into an array of bytes.

void reset()
Reset to the last position on the mark-stack.

void seek(long offset)


Sets the offset, measured from the beginning of the data container at which the next read or
write occurs.

Page 1467 of 1521


de.intarsys.tools.randomaccess.IRandomAccess

void seekBy(long delta)


Sets the offset, measured from the current offset at which the next read or write occurs.

void setLength(long newLength)


Assign the length.

void write(byte[] buffer)


Writes b.length bytes from the specified byte array, starting at the current offset.

void write(byte[] buffer, int start, int numBytes)


Writes len bytes from the specified byte array starting at start.

void write(int b)
Writes the specified byte .

Methods
seek
public void seek(long offset)
throws java.io.IOException

Sets the offset, measured from the beginning of the data container at which the next read or write occurs. The offset may be
set beyond the end of the data container. Setting the offset beyond the end of the data container does not change the data
container length. The length will change only by writing after the offset has been set beyond the end of the data container.

Parameters:
offset - the offset position, measured in bytes from the beginning of the data container

Throws:
IOException - if offset is less than 0 or if an I/O error occurs.

seekBy
public void seekBy(long delta)
throws java.io.IOException

Sets the offset, measured from the current offset at which the next read or write occurs. The offset may be set beyond the
end of the data container. Setting the offset beyond the end of the data container does not change the data container length.
The length will change only by writing after the offset has been set beyond the end of the data container.

Parameters:
delta - the ammount of bytes by wich to change the current offset position

Throws:
IOException - if the resulting offset is less than 0 or if an I/O error occurs.

read
public int read()
throws java.io.IOException

Reads a byte of data from this data container. The byte is returned as an integer in the range 0 to 255 (0x00-0x0ff). This
method blocks if no input is yet available.

This method behaves in exactly the same way as the InputStream.read() method of InputStream.

Returns:

Page 1468 of 1521


de.intarsys.tools.randomaccess.IRandomAccess

(continued from last page)

the next byte of data, or -1 if the end of the data container has been reached.

Throws:
IOException - if an I/O error occurs. Not thrown if the end of the data container has been reached.

getOffset
public long getOffset()
throws java.io.IOException

Returns the current offset in this data container.

Returns:
the offset from the beginning of the data container, in bytes, at which the next read or write occurs.

Throws:
IOException - if an I/O error occurs.

getLength
public long getLength()
throws java.io.IOException

Returns the length of this data container.

Returns:
the length of this data container, measured in bytes.

Throws:
IOException - if an I/O error occurs.

setLength
public void setLength(long newLength)
throws java.io.IOException

Assign the length. All bytes after length are truncated. If the real length is currently less than newLength, the data structure
will be enlarged.

Parameters:
newLength

Throws:
IOException

read
public int read(byte[] buffer)
throws java.io.IOException

Reads up to buffer.length bytes of data from this data container into an array of bytes. This method blocks until at least
one byte of input is available.

This method behaves in the exactly the same way as the InputStream.read(byte[]) method of InputStream.

Parameters:
buffer - the buffer into which the data is read.

Returns:

Page 1469 of 1521


de.intarsys.tools.randomaccess.IRandomAccess

(continued from last page)

the total number of bytes read into the buffer, or -1 if there is no more data because the end of this data container has
been reached.

Throws:
IOException - if an I/O error occurs.

read
public int read(byte[] buffer,
int start,
int numBytes)
throws java.io.IOException

Reads up to len bytes of data from this data container into an array of bytes. This method blocks until at least one byte of
input is available.

Parameters:
b - the buffer into which the data is read.
off - the start offset of the data.
len - the maximum number of bytes read.

Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the file has been
reached.

Throws:
IOException - if an I/O error occurs.

close
public void close()
throws java.io.IOException

Closes this random access data container and releases any system resources associated with the stream. A closed random
access data container cannot perform input or output operations and cannot be reopened.

flush
public void flush()
throws java.io.IOException

Force changes to be made persistent.

Throws:
IOException

isReadOnly
public boolean isReadOnly()

true if this is a read only data container.

Returns:
true if this is a read only data container.

Page 1470 of 1521


de.intarsys.tools.randomaccess.IRandomAccess

(continued from last page)

write
public void write(int b)
throws java.io.IOException

Writes the specified byte . The write starts at the current offset.

Parameters:
b - the byte to be written.

Throws:
IOException - if an I/O error occurs.

write
public void write(byte[] buffer)
throws java.io.IOException

Writes b.length bytes from the specified byte array, starting at the current offset.

Parameters:
b - the data.

Throws:
IOException - if an I/O error occurs.

write
public void write(byte[] buffer,
int start,
int numBytes)
throws java.io.IOException

Writes len bytes from the specified byte array starting at start.

Parameters:
buffer - the data.
start - the start offset in the data.
numBytes - the number of bytes to write.

Throws:
IOException - if an I/O error occurs.

asInputStream
public java.io.InputStream asInputStream()

A java.io.InputStream view on the data structure.

Returns:
A java.io.InputStream view on the data structure.

asOutputStream
public java.io.OutputStream asOutputStream()

A java.io.OutputStream view on the data structure.

Returns:

Page 1471 of 1521


de.intarsys.tools.randomaccess.IRandomAccess

(continued from last page)

A java.io.OutputStream view on the data structure.

mark
public void mark()
throws java.io.IOException

Mark the current offset into the data in a stack like manner.

reset
public void reset()
throws java.io.IOException

Reset to the last position on the mark-stack.

Page 1472 of 1521


de.intarsys.tools.randomaccess.PACKAGE

de.intarsys.tools.randomaccess
Class PACKAGE
java.lang.Object
|
+-de.intarsys.tools.randomaccess.PACKAGE

public class PACKAGE


extends Object

Field Summary
public static final Log

Constructor Summary
public PACKAGE()

Fields
Log
public static final java.util.logging.Logger Log

Constructors
PACKAGE
public PACKAGE()

Page 1473 of 1521


de.intarsys.tools.randomaccess.RandomAccessByteArray

de.intarsys.tools.randomaccess
Class RandomAccessByteArray
java.lang.Object
|
+-de.intarsys.tools.randomaccess.AbstractRandomAccess
|
+-de.intarsys.tools.randomaccess.RandomAccessByteArray
All Implemented Interfaces:
IRandomAccess

public class RandomAccessByteArray


extends AbstractRandomAccess

A wrapper around a byte array to allow random access like API.

Constructor Summary
public RandomAccessByteArray(byte[] buffer)

Method Summary
void close()

void flush()

long getLength()

long getOffset()

boolean isReadOnly()

int read()

int read(byte[] buffer)

int read(byte[] buffer, int bufferOffset, int numBytes)

void seek(long pOffset)

void seekBy(long delta)

void setLength(long newLength)

byte[] toByteArray()

void write(byte[] buffer)

Page 1474 of 1521


de.intarsys.tools.randomaccess.RandomAccessByteArray

void write(byte[] buffer, int start, int numBytes)

void write(int b)

Constructors
RandomAccessByteArray
public RandomAccessByteArray(byte[] buffer)

Methods
seek
public void seek(long pOffset)
throws java.io.IOException

seekBy
public void seekBy(long delta)
throws java.io.IOException

read
public int read()

getOffset
public long getOffset()

getLength
public long getLength()
throws java.io.IOException

read
public int read(byte[] buffer)

Page 1475 of 1521


de.intarsys.tools.randomaccess.RandomAccessByteArray

(continued from last page)

read
public int read(byte[] buffer,
int bufferOffset,
int numBytes)

close
public void close()
throws java.io.IOException

flush
public void flush()
throws java.io.IOException

isReadOnly
public boolean isReadOnly()

setLength
public void setLength(long newLength)

write
public void write(int b)

write
public void write(byte[] buffer)

write
public void write(byte[] buffer,
int start,
int numBytes)

toByteArray
public byte[] toByteArray()

Page 1476 of 1521


de.intarsys.tools.randomaccess.RandomAccessFile

de.intarsys.tools.randomaccess
Class RandomAccessFile
java.lang.Object
|
+-de.intarsys.tools.randomaccess.AbstractRandomAccess
|
+-de.intarsys.tools.randomaccess.RandomAccessFile
All Implemented Interfaces:
IRandomAccess

public class RandomAccessFile


extends AbstractRandomAccess

Implements random access to a file.

Constructor Summary
public RandomAccessFile(java.io.File file)

public RandomAccessFile(java.io.File file, boolean create)

Method Summary
void close()

void flush()

long getLength()

long getOffset()

boolean isReadOnly()

int read()

int read(byte[] buffer)

int read(byte[] buffer, int start, int numBytes)

void seek(long offset)

void seekBy(long delta)

void setLength(long newLength)

void write(byte[] buffer)

Page 1477 of 1521


de.intarsys.tools.randomaccess.RandomAccessFile

void write(byte[] buffer, int start, int numBytes)

void write(int b)

Constructors
RandomAccessFile
public RandomAccessFile(java.io.File file)

Parameters:
file - to open for random access

Throws:
FileNotFoundException - if file was not found or the file is locked by a different process

RandomAccessFile
public RandomAccessFile(java.io.File file,
boolean create)

Parameters:
file - to open for random access

Throws:
FileNotFoundException - if file was not found or the file is locked by a different process

Methods
seek
public void seek(long offset)
throws java.io.IOException

seekBy
public void seekBy(long delta)
throws java.io.IOException

read
public int read()
throws java.io.IOException

Page 1478 of 1521


de.intarsys.tools.randomaccess.RandomAccessFile

(continued from last page)

getOffset
public long getOffset()
throws java.io.IOException

getLength
public long getLength()
throws java.io.IOException

read
public int read(byte[] buffer)
throws java.io.IOException

read
public int read(byte[] buffer,
int start,
int numBytes)
throws java.io.IOException

close
public void close()
throws java.io.IOException

flush
public void flush()
throws java.io.IOException

isReadOnly
public boolean isReadOnly()

write
public void write(int b)
throws java.io.IOException

Page 1479 of 1521


de.intarsys.tools.randomaccess.RandomAccessFile

(continued from last page)

write
public void write(byte[] buffer)
throws java.io.IOException

write
public void write(byte[] buffer,
int start,
int numBytes)
throws java.io.IOException

setLength
public void setLength(long newLength)
throws java.io.IOException

Page 1480 of 1521


de.intarsys.tools.randomaccess.RandomAccessFilter

de.intarsys.tools.randomaccess
Class RandomAccessFilter
java.lang.Object
|
+-de.intarsys.tools.randomaccess.AbstractRandomAccess
|
+-de.intarsys.tools.randomaccess.RandomAccessFilter
All Implemented Interfaces:
IRandomAccess

Direct Known Subclasses:


RandomAccessViewport

public class RandomAccessFilter


extends AbstractRandomAccess

Filter implementation for random access.

Constructor Summary
public RandomAccessFilter(IRandomAccess random)

Method Summary
void close()

void flush()

long getLength()

long getOffset()

boolean isReadOnly()

int read()

int read(byte[] buffer)

int read(byte[] buffer, int start, int numBytes)

void seek(long offset)

void seekBy(long delta)

void setLength(long newLength)

void write(byte[] buffer)

Page 1481 of 1521


de.intarsys.tools.randomaccess.RandomAccessFilter

void write(byte[] buffer, int start, int numBytes)

void write(int b)

Constructors
RandomAccessFilter
public RandomAccessFilter(IRandomAccess random)

Methods
seek
public void seek(long offset)
throws java.io.IOException

seekBy
public void seekBy(long delta)
throws java.io.IOException

read
public int read()
throws java.io.IOException

getOffset
public long getOffset()
throws java.io.IOException

getLength
public long getLength()
throws java.io.IOException

setLength
public void setLength(long newLength)
throws java.io.IOException

Page 1482 of 1521


de.intarsys.tools.randomaccess.RandomAccessFilter

read
public int read(byte[] buffer)
throws java.io.IOException

read
public int read(byte[] buffer,
int start,
int numBytes)
throws java.io.IOException

close
public void close()
throws java.io.IOException

flush
public void flush()
throws java.io.IOException

isReadOnly
public boolean isReadOnly()

write
public void write(int b)
throws java.io.IOException

write
public void write(byte[] buffer)
throws java.io.IOException

write
public void write(byte[] buffer,
int start,
int numBytes)
throws java.io.IOException

Page 1483 of 1521


de.intarsys.tools.randomaccess.RandomAccessViewport

de.intarsys.tools.randomaccess
Class RandomAccessViewport
java.lang.Object
|
+-de.intarsys.tools.randomaccess.AbstractRandomAccess
|
+-de.intarsys.tools.randomaccess.RandomAccessFilter
|
+-de.intarsys.tools.randomaccess.RandomAccessViewport
All Implemented Interfaces:
IRandomAccess

public class RandomAccessViewport


extends RandomAccessFilter

A viewport in an existing IRandomAccess.

Constructor Summary
public RandomAccessViewport(IRandomAccess ra, long offset, long length)
Create a viewport to the existing IRandomAccess ra.

Method Summary
long getLength()

long getOffset()

boolean isReadOnly()

int read()

int read(byte[] buffer)

int read(byte[] buffer, int start, int numBytes)

void seek(long offset)

void seekBy(long delta)

void setLength(long newLength)

void write(byte[] buffer)

void write(byte[] buffer, int start, int numBytes)

void write(int b)

Page 1484 of 1521


de.intarsys.tools.randomaccess.RandomAccessViewport

Constructors
RandomAccessViewport
public RandomAccessViewport(IRandomAccess ra,
long offset,
long length)

Create a viewport to the existing IRandomAccess ra.

ATTENTION: This will not seek to offset in ra. This means after creation before initial use you have to position the
IRandomAccess yourself using seek.

Parameters:
ra
offset
length

Throws:
IOException

Methods
getLength
public long getLength()
throws java.io.IOException

getOffset
public long getOffset()
throws java.io.IOException

isReadOnly
public boolean isReadOnly()

read
public int read()
throws java.io.IOException

read
public int read(byte[] buffer,
int start,
int numBytes)
throws java.io.IOException

Page 1485 of 1521


de.intarsys.tools.randomaccess.RandomAccessViewport

(continued from last page)

read
public int read(byte[] buffer)
throws java.io.IOException

seek
public void seek(long offset)
throws java.io.IOException

seekBy
public void seekBy(long delta)
throws java.io.IOException

setLength
public void setLength(long newLength)
throws java.io.IOException

write
public void write(byte[] buffer,
int start,
int numBytes)
throws java.io.IOException

write
public void write(byte[] buffer)
throws java.io.IOException

write
public void write(int b)
throws java.io.IOException

Page 1486 of 1521


Appendix A: Examples

Appendix A: Examples
Examples
Overview
There are some examples in the "examples" directory along with the distribution. We hope some day we will find the chance to
give you an intro here.

Page 1487 of 1521


Index

Appendix B: License
License
/*
* Copyright (c) 2007, intarsys consulting GmbH
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of intarsys nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/

Page 1488 of 1521


Index

Index addNode 1140


addNodeAfter 1141
A addObjectListener 256, 312, 330, 340
addObjectReference 1332
AbstractAccessPermissions 381 addOpenAction 1007
AbstractActionHandler 37 addOperand 139
AbstractBitFlags 770 addOperation 110
AbstractCryptHandler 383 addPageNode 1007
AbstractFontRegistry 9 addPageNodeAfter 1007
AbstractRandomAccess 1461 addPatternResource 1163
AbstractSecurityHandler 384 addResource 1163
AbstractXRefParser 1316 addShadingResource 1163
AbstractXRefWriter 1317 addStringToTable 565, 566
accept 230, 246, 260, 279, 285, 291, 302, 304, 307, 322, 339, addXObjectResource 1164
347, 1347, 1349, 1352, 1355, 1431 adjustBeginLineColumn 1253
AccessPermissionsR2 388 adjustTransform 1373
AccessPermissionsR3 390 AESCryptHandler 393
ACROFORMFIELD_ACTION_TRIGGERS 812 AFMEncoding 593
AcroFormFieldFlags 777 AFMSymbolicEncoding 596
AcroFormSigFlags 783 ALIGNMENT_CENTER 812
ActionDisablement 48 ALIGNMENT_LEFT 812
ActionException 38 ALIGNMENT_RIGHT 812
ActionHandlerRegistry 40 ANNOTATION_ACTION_TRIGGERS 904
ActionProcessor 41 AnnotationFlags 788
ActionTools 43 annotationTriggerBlurred 44
add 230, 271 annotationTriggerFocus 44
addAction 876, 904, 1007 annotationTriggerKeystroke 44
addAll 90, 260 annotationTriggerMouseDown 44
addAnnotation 813, 1124 annotationTriggerMouseEnter 44
addChangedReference 1332 annotationTriggerMouseExit 44
addColorSpaceResource 1163 annotationTriggerMouseUp 44
addContentStream 1125 annotationTriggerPageClose 45
addDocumentListener 271 annotationTriggerPageInvisible 45
addEncoding 505 annotationTriggerPageOpen 45
addEntry 1358 annotationTriggerPageVisible 45
addExtGStateResource 1163 AppearanceCreatorRegistry 64
addField 525, 531, 804, 813, 826 AppearanceCreatorTools 65
addFilter 339 ArcFourCryptHandler 395
addFont 9 ARRAY_CLOSE 1378
addFontResource 1163 ARRAY_OPEN 1378
addIfAbsent 260 asArray 234, 318
addItem 1115 asBoolean 246, 317
addMarkedContent 110, 1050 ASCII85Filter 537
addMonitor 271 ASCII85InputStream 538
addNext 834 ASCII85OutputStream 540

Page 1489 of 1521


Index

ASCIIHexFilter 542 Bit_AppendOnly 783


ASCIIHexInputStream 543 Bit_Assemble 381
ASCIIHexOutputStream 545 Bit_Bold 799
asDictionary 260, 318 Bit_CanonicalFormat 1237
asFixed 286, 317 Bit_Comb 777
asInputStream 1461, 1471 Bit_Combo 776
asInteger 302, 317 Bit_CommitOnSelChange 777
asName 304, 317 Bit_Copy 381
asNull 317 Bit_DoNotScroll 777
asNumber 308, 318 Bit_DoNotSpellCheck 776
asOutputStream 1462, 1471 Bit_Edit 776
associate 256, 271, 292, 363 Bit_EmbedForm 1238
asStream 318, 340 Bit_ExclFKey 1238
asString 317, 347 Bit_ExclNonUserAnnots 1238
Attribute 1390 Bit_ExportFormat 1237
AttributeSupport 1391 Bit_Extract 381
authenticate 409, 413, 420, 430, 434, 436 Bit_FileSelect 776
available 539, 544 Bit_FillForm 381
Bit_FixedPitch 648
B Bit_ForceBold 649
Bit_GetMethod 1237
backup 1251 Bit_Hidden 787
basicAddSilent 230 Bit_Include 1236
basicEntryIterator 260 Bit_IncludeAnnotations 1237
basicGet 230, 260 Bit_IncludeAppendSaves 1237
basicGetFieldFlags 813 Bit_IncludeNoValueFields 1236
basicGetFlags 904, 1109 Bit_Invisible 787
basicIterator 231, 261, 313, 322, 331, 340 Bit_Italic 649, 798
basicPutSilent 261 Bit_Locked 788
basicSetDecodedBytes 340 Bit_LockedContents 788
basicSetEncodedBytes 340 Bit_Modify 381
basicSetFieldFlags 813 Bit_ModifyAnnotation 381
basicSetFlags 905, 1109 Bit_Multiline 775
basicWriteFixed 1381 Bit_MultiSelect 776
basicWriteInteger 1382 Bit_NoExport 775
basicWriteName 1382 Bit_Nonsymbolic 649
basicWriteStringHex 1382 Bit_NoRotate 787
basicWriteStringLiteral 1382 Bit_NotDEFINED 1238
beConstant 313 Bit_NoToggleToOff 776
begin 196 Bit_NoView 787
beginColumn 1311 Bit_NoZoom 787
beginLine 1311 Bit_Password 775
BeginToken 1250 Bit_Print 381, 787
beIndirect 313 Bit_PrintHighQuality 381
Bit_AllCap 649 Bit_Pushbutton 776

Page 1490 of 1521


Index

Bit_Radio 776 canonicalize 826


Bit_RadiosInUnison 777 canReceiveFocus 905, 1227
Bit_ReadOnly 775, 787 CAPTION_CHECK 915
Bit_Required 775 CAPTION_CIRCLE 915
Bit_RichText 777 CAPTION_CROSS 915
Bit_Script 649 CAPTION_DIAMOND 915
Bit_Serif 649 CAPTION_SQUARE 915
Bit_SignatureExists 782 CAPTION_STAR 916
Bit_SmallCap 649 CATALOG_ACTION_TRIGGERS 1006
Bit_Sort 776 CCITTFaxFilter 549
Bit_SubmitCoordinates 1237 CDSDate 75
Bit_SubmitPDF 1237 CDSMatrix 81
Bit_Symbolic 649 CDSNameTreeEntry 86
Bit_ToggleNoView 788 CDSNumberTreeEntry 93
Bit_XFDF 1237 CDSRectangle 97, 98
BLEND_MODES 1031 CDSTreeEntry 103
BOLD 22 CDSTreeNode 106
BOLD_ITALIC 22 changed 237, 367, 370
booleanValue 246, 282, 359 CHAR_BS 760
BufferedRandomAccess 1464 CHAR_CR 760
bufpos 1249 CHAR_FF 760
ByteArrayLocator 1400 CHAR_HT 760
byteValue 304, 347 CHAR_LF 760
CIDFontType0 604
C CIDFontType2 608
CIDSelectorCID 610
C_RENDERING_VALID1 1071 CIDSelectorCode 612
C_RENDERING_VALID2 1071 CIDSelectorName 613
C_RENDERING_VALID3 1071 CIDWidthMap 621
C_RENDERING_VALID4 1071 CIDWidthMapEntry 622
C_WARN_ARRAYSIZE 763 CIPHER_ALGORITHM 392, 394, 423, 425, 427
C_WARN_ENDOBJ_MISSING 764 ClassLoaderResourceLocator 1404
C_WARN_ENDSTREAMCORRUPT 763 ClassResourceLocator 1409
C_WARN_ENDSTREAMEOL 763 clear 231, 261
C_WARN_ILLEGALHEX 762 clearAction 876
C_WARN_NAMETOLONG 762 clearSignature 893
C_WARN_SINGLEEOL 763 close 116, 172, 212, 271, 507, 509, 539, 541, 545, 570, 1008,
C_WARN_SINGLEEOL_OBJ 764 1332, 1464, 1470, 1476, 1479, 1483
C_WARN_SINGLESPACE 763 CMapBFCharCodeMap 627
C_WARN_SINGLESPACE_OBJ 763 CMapBFCharNameMap 628
C_WARN_STREAMEOL 763 CMapBFRangeCodeMap 629
C_WARN_STREAMEXTERNAL 763 CMapBFRangeNameMap 630
C_WARN_STREAMLENGTH 763 CMapCharMap 631
C_WARN_STRINGTOLONG 762 CMapCIDCharCodeMap 632
C_WARN_UNEVENHEX 762 CMapCIDRangeCodeMap 633

Page 1491 of 1521


Index

CMapCIDRangeNotdefMap 634 CN_BM_Normal 1031


CMapEncoding 443 CN_CS_CalGray 958
CMapMap 635 CN_CS_CalRGB 958
CMapRange 640 CN_CS_CMYK 958
CMapRangeMap 642 CN_CS_DeviceCMYK 958
CMO_beginbfchar 637 CN_CS_DeviceGray 958
CMO_beginbfrange 637 CN_CS_DeviceN 959
CMO_begincidchar 638 CN_CS_DeviceRGB 959
CMO_begincidrange 638 CN_CS_G 959
CMO_begincmap 637 CN_CS_I 959
CMO_begincodespacerange 637 CN_CS_ICCBased 959
CMO_beginnotdefchar 638 CN_CS_Indexed 959
CMO_beginnotdefrange 638 CN_CS_Lab 959
CMO_endbfchar 637 CN_CS_Pattern 959
CMO_endbfrange 638 CN_CS_RGB 959
CMO_endcidchar 638 CN_CS_Separation 960
CMO_endcidrange 638 CN_DISPLAY_MODE_Fit 1022
CMO_endcmap 637 CN_DISPLAY_MODE_FitB 1023
CMO_endcodespacerange 637 CN_DISPLAY_MODE_FitBH 1023
CMO_endnotdefchar 638 CN_DISPLAY_MODE_FitBV 1023
CMO_endnotdefrange 638 CN_DISPLAY_MODE_FitH 1022
CMO_usecmap 637 CN_DISPLAY_MODE_FitR 1022
CMO_usefont 637 CN_DISPLAY_MODE_FitV 1022
CN_ActionType_GoTo 841 CN_DISPLAY_MODE_XYZ 1022
CN_ActionType_GoTo3DView 838 CN_DRAFT 1195
CN_ActionType_GoToE 837 CN_F_DOS 1040
CN_ActionType_GoToR 844 CN_F_Mac 1040
CN_ActionType_Hide 837 CN_F_Unix 1040
CN_ActionType_ImportData 837 CN_Filter_A85 553
CN_ActionType_JavaScript 847 CN_Filter_AHx 553
CN_ActionType_Launch 851 CN_Filter_ASCII85Decode 553
CN_ActionType_Movie 837 CN_Filter_ASCIIHexDecode 553
CN_ActionType_Named 854 CN_Filter_CCF 554
CN_ActionType_no_op 838 CN_Filter_CCITTFaxDecode 554
CN_ActionType_Rendition 838 CN_Filter_Crypt 554
CN_ActionType_ResetForm 858 CN_Filter_DCT 554
CN_ActionType_set_state 838 CN_Filter_DCTDecode 554
CN_ActionType_SetOCGState 837 CN_Filter_Fl 554
CN_ActionType_Sound 837 CN_Filter_FlateDecode 554
CN_ActionType_SubmitForm 862 CN_Filter_JBIG2Decode 554
CN_ActionType_Thread 837 CN_Filter_JPXDecode 554
CN_ActionType_Trans 838 CN_Filter_LZW 554
CN_ActionType_URI 869 CN_Filter_LZWDecode 555
CN_AESV2 440 CN_Filter_RL 555
CN_BM_Multiply 1031 CN_Filter_RunLengthDecode 555

Page 1492 of 1521


Index

CN_FS_URL 1040 CN_Subtype_CIDFontType0 662


CN_FT_Btn 810 CN_Subtype_CIDFontType2 662
CN_FT_Ch 811 CN_Subtype_Circle 1091
CN_FT_Sig 811 CN_Subtype_FileAttachment 1035
CN_FT_Tx 811 CN_Subtype_Form 1047
CN_H_I 1085, 1226 CN_Subtype_Highlight 1206
CN_H_N 1086, 1225 CN_Subtype_Image 1071
CN_H_O 1086, 1226 CN_Subtype_Ink 1091
CN_H_P 1086, 1226 CN_Subtype_Line 1091
CN_H_T 1226 CN_Subtype_Link 1085
CN_IDENTITY 397 CN_Subtype_MMType1 662
CN_Identity 618 CN_Subtype_Polygon 1091
CN_Identity_H 654 CN_Subtype_PolyLine 1091
CN_Identity_V 654 CN_Subtype_Popup 1148
CN_MacRomanEncoding 462 CN_Subtype_PS 1152
CN_Name_FirstPage 854 CN_Subtype_Square 1091
CN_Name_Graph 1035 CN_Subtype_Squiggly 1206
CN_Name_LastPage 854 CN_Subtype_Stamp 1194
CN_Name_NextPage 854 CN_Subtype_StrikeOut 1206
CN_Name_Paperclip 1035 CN_Subtype_Text 1202
CN_Name_PrevPage 854 CN_Subtype_TrueType 662
CN_Name_PushPin 1035 CN_Subtype_Type0 663
CN_Name_Tag 1035 CN_Subtype_Type1 663
CN_None 440 CN_Subtype_Type3 663
CN_Perms_DocMDP 1006 CN_Subtype_Underline 1206
CN_Perms_UR 1006 CN_Subtype_Widget 1226
CN_RT_ColorSpace 1162 CN_SW_A 1064
CN_RT_Encoding 1162 CN_SW_B 1065
CN_RT_ExtGState 1162 CN_SW_N 1065
CN_RT_Font 1162 CN_SW_S 1065
CN_RT_Pattern 1162 CN_T_Mouse_Down 876
CN_RT_ProcSet 1162 CN_trigger_Bl 874
CN_RT_Properties 1162 CN_trigger_C 875
CN_RT_Shading 1163 CN_trigger_D 874
CN_RT_XObject 1163 CN_trigger_DC 875
CN_S_A 1065 CN_trigger_DP 875
CN_S_B 943 CN_trigger_DS 875
CN_S_D 943 CN_trigger_E 873
CN_S_I 943 CN_trigger_F 875
CN_S_P 1065 CN_trigger_Fo 874
CN_S_S 943 CN_trigger_K 874
CN_S_U 944 CN_trigger_O 874
CN_Standard 422 CN_trigger_PC 874
CN_StandardEncoding 462 CN_trigger_PI 874
CN_State_Off 1226 CN_trigger_PO 874

Page 1493 of 1521


Index

CN_trigger_PV 874 copy 84, 99, 163, 196, 212, 813, 905, 1347, 1350, 1353, 1355
CN_trigger_U 874 COPY_SUFFIX 1123
CN_trigger_V 875 copyDecodeFirst 340
CN_trigger_WC 875 copyDeep 233, 256, 262, 272, 313, 322, 331, 340, 1008, 1332
CN_trigger_WP 875 copyOptional 314
CN_trigger_WS 875 copyShallow 231, 262, 314, 322, 341
CN_trigger_X 873 copySubGraph 314
CN_Type_Action 833 cosAddContents 1125
CN_Type_Alt_Filespec 1039 cosAddField 525
CN_Type_Annot 904 cosAddKid 531
CN_Type_Border 944 cosAddResource 1164
CN_Type_Catalog 250 cosCreateResource 1164
CN_Type_EmbeddedFile 1018 COSDocumentFactory 281
CN_Type_ExtGState 1031 COSDocumentParser 745
CN_Type_Filespec 1039 cosExtractJPEGStream 1074
CN_Type_Font 663 cosGetActionType 833
CN_Type_FontDescriptor 675 cosGetArray 237
CN_Type_ObjStm 1320 cosGetByteRange 1186
CN_Type_Outlines 1104 cosGetCharProcs 723
CN_Type_Page 1133 cosGetCIDToGIDMap 608
CN_Type_Pattern 1145 cosGetColor 1110
CN_Type_Sig 1184 cosGetColorSpace 1074
CN_Type_SigRef 1192 cosGetContents 1125
CN_Type_TransformParams 1221 cosGetData 937
CN_Type_XObject 1231 cosGetDecode 1171
CN_Type_XRef 1341 cosGetDefaultValue 813
CN_V2 440 cosGetDests 250
CN_Version_1_4 250 cosGetDict 237, 1019, 1155, 1171, 1231, 1341, 1344, 1358
CN_WinAnsiEncoding 462 cosGetDoc 238, 521, 1008
collectLeafFields 829 cosGetDomain 1058
COMMENT 1378 cosGetDownIcon 930
CommonLocator 1413 cosGetEncode 1172
compareTo 347, 1346 cosGetEncryption 357, 1359
compatibilityBegin 116, 173, 212 cosGetExpectedActionType 833, 838, 841, 844, 848, 851, 854,
compatibilityEnd 116, 173, 212 858, 862, 869
composeString 566 cosGetExpectedFieldType 814, 879, 884, 889, 892, 896
compress 664, 706 cosGetFDF 251
computeResultRowSize 581 cosGetField 238
computeSourceRowSize 575, 581 cosGetFieldDescendant 1100
constant 303 cosGetFieldInheritable 1100
CONSTANT_CONTAINER 312 cosGetFieldInherited 1100
containable 256, 271, 279, 292, 313, 364 cosGetFieldType 814
contains 90, 98, 640, 1358 cosGetID 357
containsKey 261 cosGetMask 1074
containsValue 261 cosGetName 855

Page 1494 of 1521


Index

cosGetNames 251 cosSetName 855


cosGetNormalIcon 930 cosSetNames 251
cosGetObject 238, 1342, 1344, 1359 cosSetNormalIcon 931
cosGetOpenAction 251 cosSetOutline 252
cosGetOutline 251 cosSetPermissionsDict 1009
cosGetOutputProfile 1118 cosSetPieceInfo 1051, 1126
cosGetPermissionsDict 1008 cosSetPieceInfoDict 1009
cosGetPieceInfo 1050, 1125 cosSetRolloverIcon 931
cosGetPieceInfoDict 1008 cosSetSig 252
cosGetProfileStream 985 cosSetSubtype 1101
cosGetResource 1164 cosSetType 1101
cosGetResources 1164 cosSetValue 531, 814, 880, 892
cosGetRolloverIcon 930 COSSwapException 350, 351
cosGetSig 251 COSVisitorException 361
cosGetStream 238, 1341 COSWriter 1381
cosGetSubtype 1100 COUNT 21
cosGetTrailer 1332 create 140, 228, 229, 246, 259, 260, 282, 285, 289, 301, 302,
cosGetType 1100 304, 306, 338, 346, 359, 429, 489, 644
cosGetURI 1008 createAcroForm 1009
cosGetValue 531, 814 createAppearance 65, 66, 69
cosGetXfa 804 createColorSpaceResource 1164
cosHasField 238 createDocument 366, 378
COSLoadError 748 createExtGStateResource 1164
COSLoadException 750, 751 createFilter 560, 586
COSLoadWarning 752 createFontResource 1165
COSObjectKey 319 createFormHandler 33, 35
COSObjectProxy 322 createFromBytes 109
COSObjectWalkerDeep 325 createFromContent 210
COSObjectWalkerShallow 327 createFromCOS 75, 81, 98, 520
cosPrependContents 1125 createFromCos 89, 109, 244, 1006
cosRemoveField 239 createFromLocator 270, 1007, 1331
cosRemoveFieldInheritable 1101 createFromProvider 211
COSRuntimeException 333, 334 createFromST 270
COSSecurityException 401 createHex 346
cosSetCharProcs 723 createIntermediate 90
cosSetColorSpace 1077 createLeaf 90
cosSetContents 1125 createLocator 1422, 1430
cosSetData 937 createMap 621
cosSetDests 252 createMultiLine 347
cosSetDict 1344 createNew 110, 211, 244, 270, 271, 520, 705, 716, 717, 838,
cosSetDownIcon 931 848, 854, 858, 866, 869, 1007, 1044, 1331
cosSetEncryption 357, 1359 createNewDetached 211
cosSetFDF 252 createNewXRefSection 1332
cosSetField 239, 1093, 1228 createNextKey 319
cosSetFieldInheritable 1101 createObject 352

Page 1495 of 1521


Index

createObjectKey 1332 CSO_DoubleQuote 151


createPageTree 1009 CSO_DP 151
createPrediction 562, 587 CSO_EI 151
createReader 490 CSO_EMC 145
createResource 1165 CSO_ET 145
createRootIntermediate 89 CSO_EX 152
createRootLeaf 89 CSO_F 147
createShadingResource 1165 CSO_f 147
createStream 111 CSO_fstar 147
createSuccessor 1342, 1344, 1359 CSO_G 148
createWith 229 CSO_g 148
createWriter 490 CSO_gs 150
createXObjectResource 1165 CSO_h 146
CRLF 1378 CSO_i 148
CryptFilter 550 CSO_ID 152
CSBoundingBoxCollector 201 CSO_J 149
CSContentParser 754 CSO_j 149
CSContentTools 203 CSO_K 152
CSDeviceAdapter 115 CSO_k 152
CSDeviceBasedInterpreter 125 CSO_l 147
CSDeviceTools 223 CSO_M 149
CSError 127, 128 CSO_m 147
CSException 129, 130 CSO_MP 152
CSInterpreter 131 CSO_n 148
CSInterpreterFrame 133 CSO_Q 148
CSLiteral 134 CSO_q 148
CSNotSupported 135 CSO_Quote 151
CSO_All 153 CSO_re 148
CSO_B 147 CSO_RG 149
CSO_b 146 CSO_rg 149
CSO_BDC 151 CSO_ri 152
CSO_BI 151 CSO_S 150
CSO_BMC 145 CSO_s 146
CSO_Bstar 147 CSO_SC 152
CSO_bstar 146 CSO_sc 152
CSO_BT 145 CSO_SCN 152
CSO_BX 151 CSO_scn 153
CSO_c 146 CSO_sh 153
CSO_cm 150 CSO_Tc 148
CSO_CS 150 CSO_TD 147
CSO_cs 150 CSO_Td 147
CSO_d 149 CSO_Tf 145
CSO_d0 151 CSO_TJ 151
CSO_d1 151 CSO_Tj 150
CSO_Do 150 CSO_TL 149

Page 1496 of 1521


Index

CSO_Tm 149 DifferenceEncoding 644


CSO_Tr 149 DIGEST_ALGORITHM 393, 395, 423, 425, 428
CSO_Ts 150 DIGIT 1304
CSO_Tstar 146 disable_tracing 1300
CSO_Tw 150 disableActions 45
CSO_Tz 148 disassociate 256, 272, 292, 364
CSO_v 146 dispose 814, 905, 1126, 1133, 1228
CSO_W 146 DK_A 530, 904, 1064, 1108
CSO_w 149 DK_AA 531, 796
CSO_Wstar 147 DK_AC 927
CSO_y 146 DK_AcroForm 249
CSOperation 137 DK_AIS 1030
CSOperator 140 DK_Alternate 984
CSPrettyPrinter 224 DK_Alternates 1071
CSShapeDevice 155 DK_Annots 524, 1123
CSVirtualDevice 158 DK_AP 530, 903
CSWarning 159, 160 DK_App 954
currentToken 1296 DK_APRef 530
DK_AS 903
D DK_Ascent 685
DK_AuthEvent 428
DATE_FORMAT 75 DK_Author 296
DatePattern 75 DK_AvgWidth 685
DCTFilter 551 DK_BaseEncoding 644
debugStream 1308 DK_BaseFont 663
DECIMAL_LITERAL 1304 DK_BBox 1048
decode 490, 555, 559, 561, 566, 568, 581 DK_BC 927
decode1D 589 DK_BG 927, 1029
decode2D 590 DK_BG2 1029
decodeRow 573, 574, 577 DK_BitsPerComponent 579, 1071
decodeSource 848 DK_BitsPerSample 1170
decodeT6 590 DK_BlackIs1 547
decrypt 406, 408, 417, 421 DK_BlackPoint 990
decryptFile 413, 431, 433, 435, 437, 440 DK_BM 1030
decryptStream 412, 431, 433, 435, 437, 440 DK_Border 903
decryptString 412, 431, 434, 436, 437, 440 DK_BPC 1072
DEFAULT 1304 DK_BS 903
DEFAULT_ACCESS_PERMISSIONS 420 DK_ByteRange 1185
DEFAULT_PRECISION 285 DK_C 903, 1108
DefaultAppearance 791 DK_C0 1079
DefaultAppearanceDevice 794 DK_C1 1080
delete 1402, 1414, 1420, 1429, 1439, 1444, 1449, 1454, 1459 DK_CA 903, 927, 1030, 1090
dereference 279, 291, 314, 323 DK_ca 1030
DICT_CLOSE 1378 DK_CapHeight 685
DICT_OPEN 1378 DK_Cert 1184

Page 1497 of 1521


Index

DK_CF 397 DK_EFF 398


DK_CFM 440 DK_EmbeddedFDFs 525
DK_Changes 1185 DK_Encode 1170
DK_CharProcs 721 DK_EncodedByteAlign 548
DK_CIDSystemInfo 601, 726 DK_Encoding 524, 663, 825
DK_CIDToGIDMap 608 DK_Encrypt 355
DK_ClrF 530 DK_EncryptMetadata 420
DK_ClrFf 530 DK_EndOfBlock 548
DK_CMapName 726 DK_EndOfLine 548
DK_CO 802 DK_Extends 1320
DK_Colors 579 DK_F 338, 524, 530, 844, 851, 862, 903, 1040, 1109
DK_ColorSpace 1072 DK_FB 1064
DK_Columns 548, 579 DK_FDecodeParams 338
DK_ContactInfo 1185 DK_FDF 249
DK_Contents 902, 1124, 1184 DK_Ff 529, 811
DK_Count 1114, 1140 DK_FFilter 338
DK_CreationDate 295, 1090 DK_FieldMDP 1211
DK_Creator 296 DK_Fields 524, 801, 858, 862
DK_CropBox 1124 DK_Filter 338, 397, 954, 1184
DK_CS 1072 DK_First 1114, 1320
DK_D 841, 844, 922, 944, 1028, 1072 DK_FirstChar 663
DK_DA 826 DK_FL 1030
DK_DamagedRowsBeforeError 548 DK_Flags 686, 858, 862
DK_Data 1192 DK_Font 826, 1029
DK_Date 948 DK_FontBBox 686, 721
DK_Decode 1072, 1170 DK_FontDescriptor 663
DK_DecodeParms 337, 1072 DK_FontFamily 687
DK_DescendantFonts 710 DK_FontFile 686
DK_Descent 685 DK_FontFile2 686
DK_Dest 1085, 1108 DK_FontFile3 686
DK_DestOutputProfile 1118 DK_FontMatrix 721
DK_Dests 249 DK_FontName 686
DK_Differences 525, 644 DK_FormType 1048
DK_DigestLocation 1192 DK_FS 1035, 1039
DK_DigestMethod 1192 DK_FT 810
DK_DigestValue 1192 DK_FunctionType 1057
DK_DocMDP 1210 DK_Group 1048
DK_Domain 1057 DK_H 548, 1072, 1085, 1225
DK_DP 337, 1072 DK_Height 548, 1072
DK_DR 826 DK_HT 1029
DK_DS 812 DK_I 884, 927, 1072
DK_DV 812 DK_IC 904, 1091
DK_DW 601 DK_ID 355, 524, 1073
DK_DW2 601 DK_Identity 1211
DK_EF 1040 DK_IF 530, 927

Page 1498 of 1521


Index

DK_IM 1073 DK_Names 89, 249


DK_ImageMask 1073 DK_NeedAppearances 801
DK_Index 1341 DK_NewWindow 844, 851
DK_Info 355, 1118 DK_Next 833, 1109
DK_InkList 1091 DK_NM 902
DK_Intent 1073 DK_NonEFontNoWarn 949
DK_Interpolate 1073 DK_Nums 94
DK_IRT 1091 DK_O 420
DK_IsMap 869 DK_OC 904, 1073
DK_ItalicAngle 686 DK_OP 1028
DK_IX 928 DK_op 1029
DK_JavaScript 43, 525 DK_Open 1148
DK_JS 848 DK_OpenAction 249, 1006
DK_K 548 DK_OPI 1048, 1073
DK_Keywords 296 DK_OPM 1029
DK_Kids 105, 529, 811, 1140 DK_Opt 530, 879, 884
DK_L 1090 DK_Order 1170
DK_Last 1114 DK_Ordering 615
DK_LastChar 663 DK_OS 949
DK_LastModified 936 DK_Outlines 249
DK_LC 1028 DK_OutputCondition 1118
DK_Leading 686 DK_OutputConditionIdentifier 1118
DK_Length 338, 397, 428 DK_OutputIntent 1118
DK_Length1 687 DK_OutputIntents 250
DK_Length2 687 DK_P 420, 902, 1221
DK_Length3 687 DK_PA 1085
DK_Limits 105 DK_PageMode 250
DK_LJ 1028 DK_Pages 250, 524, 1133
DK_Location 1185 DK_Parent 811, 1109, 1133, 1148
DK_Lock 892 DK_PatternType 1144
DK_LW 1028 DK_Perms 1006
DK_M 902, 1185 DK_PieceInfo 250, 1048, 1124
DK_Mask 1073 DK_Popup 1090
DK_Matrix 1048 DK_Predictor 579
DK_MaxLen 813 DK_PreRelease 949
DK_MaxWidth 686 DK_Prev 355, 1109
DK_MediaBox 1124 DK_Private 937
DK_Metadata 249, 1073, 1124 DK_Producer 296
DK_MissingWidth 686 DK_Prop_AuthTime 1186
DK_MK 1226 DK_Prop_AuthType 1186
DK_ML 1028 DK_Prop_Build 1186
DK_ModDate 296 DK_PS 1048
DK_N 922, 984, 1080, 1320 DK_PubSec 954
DK_NAME 439 DK_Q 826
DK_Name 664, 854, 948, 1035, 1073, 1185, 1195 DK_QuadPoints 1085, 1206

Page 1499 of 1521


Index

DK_R 420, 422, 922, 928, 948, 1185 DK_TM 811


DK_Range 990, 1057 DK_ToUnicode 663, 721
DK_RC 928, 1090 DK_TP 929
DK_Reason 1185 DK_TR 1029
DK_Rect 902 DK_TR2 1029
DK_Reference 1185 DK_TransformMethod 1192
DK_Registry 615 DK_TransformParams 1192
DK_RegistryName 1118 DK_Trapped 296
DK_Resources 338, 721, 1124, 1231 DK_TrustedMode 949
DK_RF 1040 DK_TU 811
DK_RI 928, 1028 DK_Type 249, 1099, 1340
DK_Root 355 DK_U 420
DK_Rotate 1133 DK_UCR 1029
DK_Rows 548 DK_UCR2 1029
DK_RV 531, 812 DK_UR 1211
DK_S 833, 943, 1064, 1118 DK_URI 250, 869
DK_SA 1030 DK_UseCMap 726
DK_SE 1109 DK_V 397, 529, 812, 949, 1186, 1222
DK_SetF 530 DK_Version 250
DK_SetFf 530 DK_Vertices 1090
DK_Sig 249 DK_W 549, 601, 943, 1074, 1341
DK_SigFlags 801 DK_W2 601
DK_Size 355, 1170 DK_WhitePoint 991
DK_SM 1030 DK_Width 549, 1074
DK_SMask 1030, 1074 DK_Widths 664
DK_SMaskInData 1074 DK_WMode 726
DK_Status 524 DK_XFA 802
DK_StemH 685 DK_XHeight 685
DK_StemV 685 DK_XRefStm 356, 1358
DK_StmF 398 DOCTYPE_FDF 1330
DK_StrF 398 DOCTYPE_PDF 1331
DK_StructParent 904, 1074 documentProcessModules 45
DK_SubFilter 397, 1184 documentTriggerClose 45
DK_Subj 1090 documentTriggerDidPrint 45
DK_Subject 296 documentTriggerDidSave 46
DK_Subtype 1099 documentTriggerOpen 46
DK_Subtype2 1048 documentTriggerWillPrint 46
DK_Supplement 616 documentTriggerWillSave 46
DK_SV 892 Done 1253
DK_SW 1064 doShading 116, 172, 212
DK_T 529, 811, 1090, 1148 doXObject 116, 172, 212
DK_Target 525
DK_TI 884 E
DK_Title 296, 1109
DK_TK 1030 embedFontProgram 717

Page 1500 of 1521


Index

embedFontProgramm 706 FlateFilter 558


enable_tracing 1301 FLOATING_POINT_LITERAL 1305
enableActions 46 floatValue 286, 302, 308
encode 490, 491, 555, 559 flush 212, 509, 541, 1464, 1470, 1476, 1479, 1483
Encoding 489 FONT_Courier 715
encrypt 406, 408, 418, 421 FONT_Courier_Bold 715
encryptFile 413, 432, 434, 436, 438, 441 FONT_Courier_BoldOblique 715
encryptStream 413, 432, 434, 436, 438, 441 FONT_Courier_Oblique 715
encryptString 413, 432, 434, 436, 438, 441 FONT_Helvetica 715
end 196 FONT_Helvetica_Bold 715
endColumn 1311 FONT_Helvetica_BoldOblique 715
ended 323 FONT_Helvetica_Oblique 715
endLine 1311 FONT_Symbol 715
ENDOBJ 1378 FONT_Times_Bold 716
ENDSTREAM 1379 FONT_Times_BoldItalic 716
enqueue 1352 FONT_Times_Italic 716
Entry 265 FONT_Times_Roman 716
entryIterator 262, 1359 FONT_ZapfDingbats 716
EOF 1304, 1379 FontAliasMap 11
EOL 1379 FontAlternatives 714
equals 141, 231, 282, 286, 302, 304, 307, 320, 348, 359, 1406, FontDescriptorFlags 650
1411, 1417, 1456 FontFactory 732
error 188, 756 FontFamily 12
evaluate 1057, 1080, 1156, 1171, 1197 FontFileMap 14
execute 1246, 1254, 1255, 1256, 1257, 1258, 1259, 1260, FontMap 15
1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 1270, FontOutlet 733
1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 1280, FontQuery 735
1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290, FontResourceMap 19
1291, 1292, 1293, 1294, 1295 FONTS_STANDARD 716
exists 1402, 1406, 1411, 1417, 1428, 1435, 1441, 1448, 1452, FontSpecificEncoding 495
1456 FontTools 24
expectedTokenSequences 1297 format 75, 76
EXPONENT 1304 FORMAT_XREF_GENERATION 1371
FORMAT_XREF_OFFSET 1371
F FormHandlerFactory 30
FULL 1324
FALSE 245, 1379
fieldTriggerCalculate 46 G
fieldTriggerFormat 46
fieldTriggerValidate 46 GARBAGE 1379
FileLocator 1416 garbageCollect 1333
FileLocatorFactory 1422 generateParseException 1301
fill 1346, 1349, 1352, 1355 get 30, 40, 41, 64, 90, 231, 262, 281, 415, 416, 557, 582, 732,
Filter 555 733, 1433
FilterFactory 557 getA 81

Page 1501 of 1521


Index

getAccessLock 1333 getBorderColorNegative 917


getAccessPermissions 272, 410, 421, 1009 getBorderStyle 906
getAcroForm 802, 815, 827, 1009 getBorderStyleName 906
getAcroFormField 1186, 1226 getBorderStyleWidth 906
getAction 876, 905, 1110 getBoundingBox 201, 1049, 1177
getActionHandlers 51, 55 getBoundingBoxClipped 203
getActionType 49 getBounds 1198
getActive 17, 386 getBuildProperties 1186
getAdditionalActions 796, 815, 905, 1010, 1126 getByteCode 443, 444, 491, 495, 504, 515, 594, 596, 645
getAfm 594, 717 getBytes 1019, 1231
getAlias 11 getC 82
getAlignment 1065 getC0 1080
getAltAppearanceState 1226 getC1 1080
getAlternate 964, 966, 978, 985, 995 getCachedColorSpace 960
getAlternateFieldName 815 getCalculationOrder 802
getAnnotation 827 getCanonicalFile 1417
getAnnotations 827, 1010, 1126 getCapHeight 677, 688, 694
getAnnotationType 66, 69 getCapStyle 163
getAnyAnnotation 815 getCatalog 272, 521, 1010
getAnyLength 341 getCert 1186
getApp 954 getChange 61
getAppearance 905, 917, 922 getChanges 1333
getAppearanceCharacteristics 1227 getCharSpacing 196
getAppearanceCreators 67, 70 getChild 1400, 1404, 1409, 1417, 1425, 1436, 1441, 1446,
getAppearanceState 906 1452, 1457
getAppearanceStates 906 getChildren 1114
getApplicationData 1010, 1049, 1126 getCIDSystemInfo 602
getAscent 677, 687, 694 getCIDWidthMap 602
getAsStream 11, 14, 16, 19 getClassLoader 1407
getAttribute 239, 255, 272, 1010, 1391, 1393 getClazz 1409
getAuthor 297, 1010 getClip 163
getAvailableButtonAppearanceStates 880 getCMap 710
getAvailableButtonAppearanceStatesNoOff 880 getCode 1156
getAvgWidth 677, 687, 694 getColor 906, 1149
getB 82 getColorBytes 988
getBackgroundColor 929 getColorCount 987
getBaseColorSpace 988 getColorKeyMask 1075
getBaseFont 665 getColors 581
getBeginColumn 1251 getColorSpace 1075, 1177
getBeginLine 1251 getColorSpaceResource 1166
getBitsPerComponent 581, 1075 getColumn 1250
getBitsPerSample 1171 getColumn1 1346, 1349, 1352, 1355
getBlendMode 1032 getColumn2 1346, 1349, 1352, 1355
getBoldFlavor 22, 738, 741 getColumns 581
getBorderColor 917, 929 getCommitKey 59

Page 1502 of 1521


Index

getContactInfo 1187 getDescent 678, 688, 694


getContainer 315 getDescription 153
getContent 212 getDestination 627, 628, 632, 841, 844, 1086, 1110
getContentBytes 1187 getDevice 125
getContents 906, 1149 getDict 342
getContentStream 167, 1049, 1126 getDifferenceGlyphName 493, 645
getContentStreamProvider 222 getDifferenceUnicode 493, 645
getContext 61 getDisplayMode 1023
getCoords 939 getDoc 27, 32, 272, 279, 290, 315, 364, 731, 747, 1101, 1333,
getCosObject 444, 491, 495, 499, 501, 504, 510, 512, 515, 1359
517, 594, 645 getDocType 1333
getCosWriter 1318 getDomain 940, 1060
getCount 1114, 1126, 1133, 1141 getDomainMax 1057
getCreationDate 297, 1010, 1092 getDomainMin 1057
getCreationDateString 297, 1010 getDownAppearance 923, 934
getCreator 297, 1011 getDownCaption 929
getCropBox 1133 getE 83
getCryptFilterDict 399 getEmbeddedFile 1041
getCryptFilterNameFile 399 getEmbeddedFiles 1041
getCryptFilterNameStream 399 getEncode 1198
getCryptFilterNameString 398 getEncodedBytes 342
getCryptHandler 441 getEncodeMax 1172
getCryptKey 409, 421 getEncodeMin 1172
getD 82 getEncoding 506, 508, 665, 735, 740
getDashArray 944 getEncryption 384, 429
getDashPattern 163 getEncryptionIn 398
getDashPhase 163 getEnd 640, 642, 1438
getDate 949, 1187 getEndColumn 1251
getDecode 1075 getEndLine 1251
getDecodedBytes 341 getEntries 92
getDecodedBytesWritable 341 getEntry 1359
getDecodeMax 1171 getEventName 876
getDecodeMin 1172 getEventType 876
getDecodeParams 338, 339, 341, 342 getExceptionHandler 131, 190, 766
getDefaultAppearanceContent 827 getExportValues 885
getDefaultAppearanceFont 827 getExtGStateResource 1166
getDefaultAppearanceFontColor 828 getF 83
getDefaultAppearanceFontName 828 getFdf 521
getDefaultAppearanceFontSize 828 getField 828
getDefaultHandler 55 getFieldBoolean 239
getDefaultMap 17 getFieldDate 239
getDefaultResources 802 getFieldFixed 240
getDefaultValueString 818, 896 getFieldFixedArray 240
getDelegate 1438, 1441 getFieldFlags 815
getDescendantFont 710 getFieldInt 240

Page 1503 of 1521


Index

getFieldMLString 241 1451, 1457


getFields 525, 803, 858, 866 getFunction 940, 1061
getFieldString 241 getFunctions 1198
getFieldValue 28, 32 getGenerationNumber 320, 1346
getFile 14, 526, 844, 851, 1041, 1417 getGenericChildren 803, 815, 1102, 1141
getFileSpecification 1036 getGenericParent 816, 1102, 1134
getFileSpecificationString 1041 getGlyphHeight 702
getFileSystem 1040 getGlyphHeightScaled 702
getFillColor 917 getGlyphIndex 602, 605, 608, 619, 657, 711, 728
getFillColorNegative 917 getGlyphName 444, 491, 495, 497, 504, 515, 594, 645
getFilter 398, 954, 1187 getGlyphWidth 602, 665, 702, 711
getFilters 339, 342 getGlyphWidths 665
getFirst 1114, 1320 getGlyphWidthScaled 702, 703
getFirstAnnotation 1127, 1134 getGraphicsState 124, 187
getFirstChar 665 getHandler 382
getFirstDecodeParam 342 getHeight 99, 1075
getFirstFilter 342 getHighlightingMode 1086, 1227
getFirstNode 1127, 1134, 1141 getHint 751
getFirstPage 1127, 1134, 1141 getHorizontalScaling 196
getFlags 680, 907, 1110 getHorizontalScalingFactor 197
getFlagsValue 678, 688, 695 getIconFit 930
getFont 10, 12, 196, 695, 701, 738, 742, 792 getIconName 1036, 1195
getFontBB 678, 688, 695 getID 1359
getFontColorValues 792 GetImage 1252
getFontDescriptor 665, 710 getIncrementalCount 272, 1333, 1359
getFontDirectories 24 getIndex 1349
getFontFamily 10, 678, 688, 695 getIndirectObject 315
getFontFamilyIterator 10 getInfoDict 273, 356, 1011
getFontFamilyName 25, 602, 664, 670, 705, 710, 717, 722, getInnerColor 1093
735, 740 getInputSize 1057
getFontFile 679, 689 getInputStream 1400, 1405, 1410, 1417, 1426, 1436, 1442,
getFontFile2 680, 689 1447, 1451, 1457
getFontFile3 680, 689 getInReplyTo 1092
getFontIterator 12 getInstanceClass 376
getFontMatrix 723 getInterpreter 116, 186
getFontName 25, 602, 664, 671, 678, 689, 695, 706, 711, 717, getItalicAngle 678, 689, 695
722, 792 getItalicFlavor 22, 737, 742
getFontNumber 599 getJavaScript 848
getFontResource 1166 getJoinStyle 163
getFonts 703 getKey 15, 86, 93, 104, 265, 290, 1347
getFontSize 196, 792 getKeywords 297, 1011
getFontStyle 22, 25, 602, 664, 671, 705, 706, 711, 717, 722, getKids 90, 531, 816, 1141
735, 740 getLabel 22
getFormClipped 203 getLast 1115
getFullName 1401, 1404, 1410, 1417, 1425, 1436, 1442, 1447, getLastAnnotation 1127, 1134

Page 1504 of 1521


Index

getLastChar 666 getNextAnnotation 916, 1127


getLastModification 937 getNextAnnotationAllPages 916
getLastNode 1127, 1134, 1141 getNextCID 605, 608, 625, 653, 666, 671, 706, 711, 717, 723,
getLastOperation 110 726
getLastPage 1127, 1135 getNextCode 565
getLeading 197, 679, 690, 695 getNextFreeObjectNumber 1352
getLength 323, 342, 398, 599, 610, 612, 613, 1464, 1469, getNextNode 1135
1475, 1479, 1482, 1485 getNextPage 1128
getLimits 90 getNextToken 1301, 1308
getLine 1250 getNode 792
getLinearizedDict 1338 getNodeIndex 1135
getLineLength 541 getNonStrokeAlphaValue 164
getLineWidth 163 getNonStrokeColorSpace 164
getLocalName 532, 816, 1401, 1405, 1410, 1417, 1426, 1436, getNonStrokeColorValues 164
1441, 1447, 1451, 1457 getNonStrokingAlphaConstant 1031
getLocation 1187 getNormalAppearance 923, 935
getLocator 273, 521, 1011, 1333, 1432 getNormalCaption 930
getLogicalParent 816 getNormalizedRectangle 907, 1227
getLogicalRoot 816 getNumber 93
getLowerLeftX 99 getObject 290, 323
getLowerLeftY 99 getObjectNumber 320, 1346
getMacintoshRomanCode 666 getObjectReference 1334
getMapper 16 getObjects 229
getMaskImage 1075 getOffset 1355, 1360, 1464, 1469, 1475, 1478, 1482, 1485
getMatrix 1050, 1061, 1179 getOpacity 1092
getMax 91 getOpenAction 1011
getMaxLen 817 getOperand 138
getMaxObjectNumber 1359 getOperands 138
getMaxWidth 679, 690, 695 getOperation 111
getMediaBox 1135 getOperations 111
getMessage 1297, 1314 getOperator 138
getMetadata 1011 getOperatorToken 138
getMin 91 getOptionFieldBoolean 555
getMissingWidth 666, 679, 690, 695 getOptionFieldInt 556
getMiterLimit 163 getOptionNames 885
getModDate 297, 1011 getOptions 131, 190, 556
getModDateString 297, 1011 getOS 949
getModified 907, 1149 getOutline 1012
getN 1080, 1320 getOutputIntent 1012
getName 15, 61, 86, 273, 444, 492, 495, 500, 502, 504, 511, getOutputIntents 1012
513, 515, 518, 594, 613, 645, 907, 949, 996, 1011, 1095, 1187, getOutputSize 1058, 1080, 1156, 1172, 1198
1333, 1405, 1410, 1438 getOutputStream 1401, 1406, 1412, 1418, 1426, 1436, 1442,
getNamed 960 1447, 1453, 1457
getNeedAppearances 803 getOverrideEncoding 736
getNext 833, 1110 getOverrideFontFamilyName 736

Page 1505 of 1521


Index

getOverrideFontStyle 736 getResources 797, 1050, 1053, 1128


getOwner 19 getResourcesProvider 213
getPage 907, 916, 1023, 1149 getResultRowSize 581
getPageAt 1128, 1135 getRichContent 1093
getPageMode 252 getRise 197
getPageTree 1012 getRolloverAppearance 923, 935
getParameters 1023 getRolloverCaption 930
getParent 817, 1110, 1135, 1149, 1401, 1405, 1410, 1418, getRoot 357
1426, 1436, 1442, 1447, 1452, 1457 getRootClass 376, 669, 681, 831, 835, 913, 961, 1001, 1042,
getParser 1334 1059, 1116, 1138, 1146, 1178, 1212, 1233
getPassword 1396 getRotate 1136
getPatternResource 1166 getRotation 930
getPatternType 1145, 1180, 1208 getRowSize 568, 591
getPermissions 1012 getScalingCircumstances 1065
getPopup 1092 getScalingMode 1066
getPosition 323 getSearchPathDefinition 1422
getPrecision 286 getSearchPaths 1422
getPrev 356, 1111 getSecurityHandler 411, 413, 422, 429
getPrevious 1360 getSelEnd 59
getPreviousAnnotation 916, 1128 getSelStart 60
getPreviousAnnotationAllPages 916 getShading 1180
getPreviousNode 1136 getShadingResource 1167
getPreviousOffset 1360 getShadingType 940, 962, 1054, 1061, 1082, 1158, 1177, 1200
getPreviousPage 1128 getSigFlags 803
getProducer 297, 1012 getSignature 892
getProxies 1383 getSingleton 618, 655, 960, 1211
getPubSec 954 getSize 356, 1172, 1173, 1360, 1363
getQuadding 829 getSMask 1075
getQuadPoints 1206 getSource 59, 631
getQualifiedName 817 getSourceRowSize 581
getR 949 getStandard 490
getRandomAccess 1334, 1383, 1400, 1407, 1412, 1418, 1426, getStart 622, 640, 642, 1360, 1362, 1438
1436, 1442, 1449, 1453, 1457 getStateChecked 917
getRange 1058 getStemH 679, 690, 696
getRangeMax 1058 getStemV 679, 691, 696
getRangeMin 1058 getStop 622, 1362
getRc 60 getStream 556, 559
getReader 1401, 1405, 1410, 1418, 1427, 1436, 1442, 1447, getStreamObjectKey 1349
1448, 1452, 1457 getStreamObjectNumber 1350
getReason 61, 1187 getStrokeAlphaValue 164
getRectangle 907 getStrokeColorSpace 164
getRegularFlavor 737, 742 getStrokeColorValues 164
getRenderingMode 197 getStrokingAlphaConstant 1031
getResolvedDestination 1000, 1024, 1096 getStyle 944
getResource 20, 1166 getSubFilter 1188

Page 1506 of 1521


Index

getSubject 297, 1012, 1092, 1149 getVersions 352


getSubtypeLabel 908, 919, 1086, 1093, 1150, 1203, 1206, getVisited 325
1228 getWhitePoint 991
GetSuffix 1253 getWidth 100, 621, 622, 945, 1076
getSupportedTriggerEvents 796, 817, 908, 1012, 1128 getWordSpacing 197
getSystemSecurityHandler 1334 getWriteModeHint 273, 1013, 1334
getTarget 60 getWriter 1342, 1344, 1360, 1401, 1402, 1406, 1407, 1412,
getTargetName 60 1418, 1419, 1427, 1428, 1437, 1443, 1448, 1453, 1458
getText 1092, 1148 getXHeight 679, 691, 696
getTextLineMatrix 197 getXObjectResource 1167
getTextMatrix 197 getXRefSection 1335
getTextPosition 930 getXRefStream 1344
getTextState 189 getXRefSubsection 1360
getTintTransform 979, 996 GLYPH_NOTDEF 497
getTitle 298, 1013, 1111 GraphicsState 163
getToken 140, 1301
getToUnicode 666 H
getTrailer 1334
getTransform 164 handleError 766
getTransformationValues 164 handleException 273, 279, 368
getTransformedBBox 1050 Handler 1243
getTrapped 298, 1013 handleWarning 766
getTTFont 707 hasFilter 339, 343
getTTGlyphWidth 706 hashCode 141, 232, 283, 286, 302, 304, 307, 320, 348, 360,
getType 61, 1401, 1406, 1411, 1418, 1427, 1437, 1442, 1448, 1406, 1411, 1419, 1458
1452, 1458 hasOperator 139
getTypedName 1401, 1405, 1411, 1418, 1426, 1437, 1443, hasTransparency 1076
1447, 1451, 1458 HEX_LITERAL 1305
getTypeName 1327 hexStringValue 347
getUnderlinePosition 602, 666, 671, 706, 711, 717, 722
getUnderlineThickness 602, 666, 671, 706, 711, 717, 722 I
getUnicode 444, 492, 496, 498, 504, 515, 594, 645, 667
getUpperRightX 99 IDENTIFIER 1305
getUpperRightY 99 IdentityCryptHandler 408
getURI 869 image 1311
getURL 1044 IMMEDIATE_IDENTIFIER 1305
getUrl 865 importCMYK_ICCProfile 1119
getUsedFonts 701 importICCProfile 1119
getV 950 importRGB_ICCProfile 1119
getValidByteCode 444, 492, 496, 504, 505, 515, 516, 594, INCREMENTAL 1324
595, 596, 645, 646 incrementalGarbageCollect 1335
getValue 60, 104, 224, 265, 598, 610, 612, 613, 781 indexOf 232
getValueList 885 init 384, 393, 395, 410, 413, 418, 421, 430
getValueString 818, 896 initializeFromScratchFontDescriptor 707, 718
getVersion 252, 399, 1326, 1334 initializeStringTable 566

Page 1507 of 1521


Index

inlineImage 116, 173, 213 isEmpty 233


Instance 1254, 1255, 1256, 1257, 1258, 1259, 1260, 1261, isEnabled 47
1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 1270, 1271, isEncrypted 274, 1013, 1335
1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 1280, 1281, isEncryptOnWrite 291
1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290, 1291, isEOL 764
1292, 1293, 1294, 1295 isExclFKey 863, 1239
INTEGER_LITERAL 1305 isExclNonUserAnnots 863, 1239
intValue 286, 302, 308 isExclude 858
invalidateCaches 81, 100, 241, 357, 804, 818, 829, 841, 845, isExecuted 62
885, 893, 908, 960, 1051, 1076, 1128, 1136, 1142, 1167 isExportFormat 863, 1239
isAlignmentCenter 818 isExternal 339, 343
isAlignmentLeft 818 isFDF 1327
isAlignmentRight 818 isFileSelect 779
isAllCap 650, 675 isFixedPitch 650, 675
isAlwaysUnchanged 1458 isFont 197
isAnnotation 818 isFontSpecificEncoding 492, 495, 646
isAnnotationSpec14 917 isForceBold 650, 675
isAntiAlias 1177 isForm 1049, 1231
isAppendOnly 783, 1014 isFree 1345, 1349, 1352, 1354
isBlendModeMultiply 1032 isFull 1324
isBlendModeNormal 1032 isGetMethod 864, 1239
isBold 799 isHexMode 348
isCalculate 28, 32 isHidden 788, 908
isCanonicalFormat 863, 1238 isIgnoreBorderWidth 1066
isCharUsed 667 isImage 1076, 1231
isCheckbox 879 isImageMask 1076
isChecked 881 isInclude 864, 1240
isClosed 1335 isIncludeAnnotations 864, 1240
isComb 778, 819 isIncludeAppendSaves 864, 1240
isCombo 777, 885 isIncludeNoValueFields 864, 1240
isCommitOnSelChange 778, 885 isIncremental 1324, 1383
isCreateComment 225 isIndirect 315
isCreateIndent 225 isIntermediate 106
isCreateLineSeparator 225 isInterpolate 1076
isDangling 315, 331 isInvisible 788, 908
isDefined 923 isItalic 651, 676, 799
isDelimiter 764 isKnockout 198
isDigit 764 isLeaf 92, 94, 106
isDirectory 1400, 1404, 1410, 1419, 1425, 1437, 1443, 1447, isLinearized 1338
1452, 1458 isLocked 789, 908
isDirty 273, 290, 1013, 1335 isLockedContents 790
isDoNotScroll 778, 819 isMap 869
isEdit 778, 885 isMarkupAnnotation 908, 1093
isEmbedded 667, 722 isModifier 59
isEmbedForm 863, 1239 isMultiline 779, 819

Page 1508 of 1521


Index

isMultiSelect 778, 886 isSignatureExists 784, 804


isNew 274, 1013, 1335 isSigned 804, 892, 1014
isNewWindow 844, 851 isSmallCap 651, 676
isNoExport 779, 819 isStandardFont 667, 718
isNonEFontNoWarn 950 isStateChecked 918
isNonsymbolic 651, 676, 696 isStreamed 1336
isNoRotate 789, 908 isSubmitCoordinates 865, 1241
isNotDEFINED 865, 1240 isSubmitPDF 865, 1241
isNoToggleOff 779 isSubset 667, 722
isNoView 789, 908 isSwapped 279, 291, 316
isNoZoom 789, 909 isSymbolic 652, 676, 696
isNull 307, 315 isSynchSynchronous 1401, 1406, 1411, 1419, 1422, 1437,
isNumber 309, 316 1443, 1448, 1453, 1459
isNumberStart 765 isToggleNoView 790, 909
isObjectListenerAvailable 256, 312, 332 isTokenStart 765
isOctalDigit 765 isTokenXRefAt 746
isOff 1227 isTrustedMode 950
isOpBeginMarkedContent 137 isTypeBtn 819, 880
isOpen 1150 isTypeCh 819, 886
isOpEndMarkedContent 138 isTypeSig 820, 893
isOutline 1104, 1115 isTypeTx 820, 896
isOutOfSynch 1402, 1405, 1410, 1419, 1437, 1443, 1447, isUndefined 1324
1452, 1458 isUseTempFile 1419
isPage 1129, 1136, 1142 isValid 1397
isPassword 779 isValidate 28, 31
isPDF 1327 isWhitespace 543, 765
isPostscript 1152, 1232 isWidgetAnnotation 909, 1227
isPreferIncrementalSave 1013 isWillCommit 59
isPreRelease 950 isXFDF 865, 1241
isPrimitive 255, 316, 331 ITALIC 22
isPrint 790, 909, 1203 iterator 91, 232, 262, 316, 323, 331, 343
isPushbutton 780, 879
isRadio 780, 880 J
isRadiosInUnison 780
isRc 61 JavaCharStream 1249, 1250
isReadOnly 274, 780, 790, 819, 909, 1013, 1335, 1407, 1412, JBIG2Filter 563
1414, 1420, 1428, 1438, 1444, 1449, 1453, 1458, 1464, 1470, jj_nt 1300
1476, 1479, 1483, 1485 jjstrLiteralImages 1307
isReference 278, 290 JPXFilter 564
isRequired 781
isScript 651, 676 K
isSerif 651, 676
isSetAnd 770 KAPPA 209
isSetOr 770 KEY_ALGORITHM 392, 394, 423, 425, 427
isShift 60 KEY_IDENTIFIER 1305

Page 1509 of 1521


Index

keyOf 263 markedContentEnd 117, 174, 213


keySet 263 markedContentPoint 117, 174, 213
kind 1311 markedContentPointProperties 117, 174, 213
markSupported 539, 544
L matchesOperator 139
MATRIX_0 80
LBRACE 1305 MATRIX_180 80
LBRACKET 1305 MATRIX_270 81
LETTER 1305 MATRIX_90 80
lexStateNames 1308 MAX_STACK_SIZE 115
LF 1379 mayAssemble 386, 388, 390, 403
listLocators 1402, 1406, 1411, 1419, 1428, 1437, 1443, 1448, mayContain 91
1452, 1459 mayCopy 387, 389, 391, 403
LITERAL_ESCAPED_BS 1379 mayExtract 387, 389, 391, 404
LITERAL_ESCAPED_CR 1379 mayFillForm 387, 389, 391, 404
LITERAL_ESCAPED_FF 1379 mayModify 387, 389, 391, 404
LITERAL_ESCAPED_HT 1380 mayModifyAnnotation 387, 389, 391, 404
LITERAL_ESCAPED_LF 1380 mayPrint 387, 389, 391, 404
load 1336, 1344, 1346, 1349, 1352, 1355, 1360 mayPrintHighQuality 387, 389, 391, 404
loadAll 1336 Messages 1325
loadedSize 1336 META 237, 250, 296, 356, 398, 525, 531, 534, 601, 604, 607,
loadObject 1320 615, 618, 624, 655, 657, 664, 670, 675, 685, 694, 698, 705,
LocatorFactory 1433 710, 716, 722, 725, 728, 802, 812, 826, 833, 838, 840, 844,
LocatorViewport 1435 848, 850, 854, 857, 862, 869, 876, 879, 884, 888, 892, 895,
Log 53, 1325, 1473 902, 919, 922, 929, 937, 939, 943, 948, 953, 960, 962, 964,
lookup 376, 625, 653, 726 966, 968, 970, 972, 975, 978, 981, 985, 987, 991, 993, 995,
lookupActionHandler 50, 54 998, 1000, 1018, 1022, 1031, 1035, 1039, 1043, 1047, 1054,
lookupAppearanceCreator 67, 70 1057, 1060, 1064, 1074, 1080, 1082, 1085, 1090, 1095, 1099,
lookupDestination 1014 1104, 1109, 1114, 1118, 1123, 1133, 1140, 1145, 1148, 1152,
lookupFontFactory 739, 743 1155, 1158, 1163, 1171, 1176, 1179, 1184, 1191, 1195, 1197,
lookupFontMap 17 1200, 1202, 1205, 1208, 1211, 1213, 1215, 1217, 1219, 1221,
LZWDecoder 565 1225, 1231, 1319, 1323
LZWFilter 567 MetaClass 376
move 100
M moveTo 100
multiLineStringValue 348
MacOSRomanEncoding 499
MacRomanEncoding 501 N
map 627, 628, 629, 630, 632, 633, 634, 635
MappedEncoding 503 NAME_A 462
MappedReader 506 NAME_a 462
MappedWriter 508 NAME_Aacute 462
mark 1462, 1472 NAME_aacute 462
markedContentBegin 116, 173, 213 NAME_Acircumflex 462
markedContentBeginProperties 116, 173, 213 NAME_acircumflex 462

Page 1510 of 1521


Index

NAME_acute 463 NAME_divide 468


NAME_Adieresis 463 NAME_dollar 468
NAME_adieresis 463 NAME_dotaccent 468
NAME_AE 463 NAME_dotlessi 468
NAME_ae 463 NAME_E 469
NAME_Agrave 463 NAME_e 468
NAME_agrave 463 NAME_Eacute 469
NAME_ampersand 463 NAME_eacute 469
NAME_Aring 464 NAME_Ecircumflex 469
NAME_aring 464 NAME_ecircumflex 469
NAME_asciicircum 464 NAME_Edieresis 469
NAME_asciitilde 464 NAME_edieresis 469
NAME_asterisk 464 NAME_Egrave 470
NAME_at 464 NAME_egrave 469
NAME_Atilde 464 NAME_eight 470
NAME_atilde 464 NAME_ellipsis 470
NAME_B 465 NAME_emdash 470
NAME_b 465 NAME_endash 470
NAME_backslash 465 NAME_equal 470
NAME_bar 465 NAME_ESCAPE 1380
NAME_braceleft 465 NAME_Eth 470
NAME_braceright 465 NAME_eth 470
NAME_bracketleft 465 NAME_Euro 471
NAME_bracketright 465 NAME_exclam 471
NAME_breve 465 NAME_exclamdown 471
NAME_brokenbar 466 NAME_F 471
NAME_bullet 466 NAME_f 471
NAME_C 466 NAME_fi 471
NAME_c 466 NAME_five 471
NAME_caron 466 NAME_fl 471
NAME_Ccedilla 466 NAME_florin 471
NAME_ccedilla 466 NAME_four 472
NAME_cedilla 466 NAME_fraction 472
NAME_cent 467 NAME_G 472
NAME_circumflex 467 NAME_g 472
NAME_colon 467 NAME_germandbls 472
NAME_comma 467 NAME_grave 472
NAME_copyright 467 NAME_greater 472
NAME_currency 467 NAME_guillemotleft 472
NAME_D 467 NAME_guillemotright 473
NAME_d 467 NAME_guilsinglleft 473
NAME_dagger 468 NAME_guilsinglright 473
NAME_daggerdbl 468 NAME_H 473
NAME_degree 468 NAME_h 473
NAME_dieresis 468 NAME_hungarumlaut 473

Page 1511 of 1521


Index

NAME_hyphen 473 NAME_ograve 479


NAME_I 474 NAME_one 479
NAME_i 473 NAME_onehalf 479
NAME_Iacute 474 NAME_onequarter 479
NAME_iacute 474 NAME_onesuperior 479
NAME_Icircumflex 474 NAME_ordfeminine 479
NAME_icircumflex 474 NAME_ordmasculine 479
NAME_Idieresis 474 NAME_Oslash 480
NAME_idieresis 474 NAME_oslash 480
NAME_Igrave 474 NAME_Otilde 480
NAME_igrave 474 NAME_otilde 480
NAME_J 475 NAME_P 480
NAME_j 475 NAME_p 480
NAME_K 475 NAME_paragraph 480
NAME_k 475 NAME_parenleft 480
NAME_L 475 NAME_parenright 480
NAME_l 475 NAME_percent 481
NAME_less 475 NAME_period 481
NAME_logicalnot 475 NAME_periodcentered 481
NAME_Lslash 476 NAME_perthousand 481
NAME_lslash 476 NAME_plus 481
NAME_M 476 NAME_plusminus 481
NAME_m 476 NAME_PREFIX 1380
NAME_macron 476 NAME_Q 481
NAME_minus 476 NAME_q 481
NAME_mu 476 NAME_question 482
NAME_multiply 476 NAME_questiondown 482
NAME_N 477 NAME_quotedbl 482
NAME_n 477 NAME_quotedblbase 482
NAME_nine 477 NAME_quotedblleft 482
NAME_Ntilde 477 NAME_quotedblright 482
NAME_ntilde 477 NAME_quoteleft 482
NAME_numbersign 477 NAME_quoteright 482
NAME_O 477 NAME_quotesinglbase 483
NAME_o 477 NAME_quotesingle 483
NAME_Oacute 478 NAME_R 483
NAME_oacute 477 NAME_r 483
NAME_Ocircumflex 478 NAME_registered 483
NAME_ocircumflex 478 NAME_ring 483
NAME_Odieresis 478 NAME_S 483
NAME_odieresis 478 NAME_s 483
NAME_OE 478 NAME_Scaron 484
NAME_oe 478 NAME_scaron 483
NAME_ogonek 478 NAME_section 484
NAME_Ograve 479 NAME_semicolon 484

Page 1512 of 1521


Index

NAME_seven 484 newToken 1312


NAME_six 484 next 1311
NAME_slash 484 None 580
NAME_space 484 NoPrediction 568
NAME_sterling 484 normalize 100
NAME_T 485 normalizeRotate 1373
NAME_t 485 Notdef 598
NAME_Thorn 485 NULL 306, 1380
NAME_thorn 485 NULL_CONTAINER 312
NAME_three 485 NullAppearanceCreator 69
NAME_threequarters 485
NAME_threesuperior 485 O
NAME_tilde 485
NAME_trademark 486 OBJ 1380
NAME_two 486 objects 274, 1336
NAME_twosuperior 486 open 117, 158, 174, 202, 212
NAME_U 486 OPERAND_Tx 137
NAME_u 486 operandSize 139
NAME_Uacute 486 OPTION_WRITEMODEHINT 1331
NAME_uacute 486 OutlineItemFlags 799
NAME_Ucircumflex 486
NAME_ucircumflex 486 P
NAME_Udieresis 487
NAME_udieresis 487 PACKAGE 53, 1325, 1473
NAME_Ugrave 487 PAGE_ACTION_TRIGGERS 1124
NAME_ugrave 487 pageTriggerClose 47
NAME_underscore 487 pageTriggerOpen 47
NAME_V 487 parse 1301, 1316, 1320, 1365, 1366, 1369
NAME_v 487 parseElement 766
NAME_W 488 ParseException 1297
NAME_w 487 parseHeader 767
NAME_X 488 parseIndirectObject 746
NAME_x 488 Parser 1300
NAME_Y 488 ParserTokenManager 1308
NAME_y 488 parseStartXRef 746
NAME_Yacute 488 parseStream 754, 755
NAME_yacute 488 parseTrailer 747
NAME_Ydieresis 489 PATH_SEPARATOR 1421
NAME_ydieresis 488 pathClipEvenOdd 117, 155, 174, 214
NAME_yen 489 pathClipNonZero 117, 155, 174, 214
NAME_Z 489 pathClose 117, 155, 175, 214
NAME_z 489 pathCloseFillStrokeEvenOdd 117, 155, 175, 214
NAME_Zcaron 489 pathCloseFillStrokeNonZero 117, 155, 175, 214
NAME_zcaron 489 pathCloseStroke 118, 155, 175, 214
NAME_zero 489 pathEnd 118, 156, 175, 214

Page 1513 of 1521


Index

pathFillEvenOdd 118, 156, 175, 214 processEndProcedure 1244


pathFillNonZero 118, 156, 175, 214 processIdentifier 1244
pathFillStrokeEvenOdd 118, 156, 176, 214 processImmediateIdentifier 1244
pathFillStrokeNonZero 118, 156, 176, 215 processKeyIdentifier 1244
pathStroke 118, 156, 176, 215 processLiteral 1244
PATTERN_TYPE_SHADING 1145 processStartArray 1245
PATTERN_TYPE_TILING 1145 processStartProcedure 1245
PDAFIntermediateNode 888 pushArgs 1245
PDAppearanceTools 934 put 91, 263
PDF_ESCAPE 1380
PDFDeflaterOutputStream 569 R
PDFDocEncoding 510
PDFileAttachmentAnnotation 1036 RandomAccessByteArray 1475
PDFontTools 700 RandomAccessFile 1478
PDFontType0 710 RandomAccessFilter 1482
PDFontType3 722 RandomAccessViewport 1485
PDFParser 764 RBRACE 1306
PDStampAnnotation 1195 RBRACKET 1306
penCircle 215 read 507, 539, 544, 1465, 1468, 1469, 1470, 1475, 1478, 1479,
penCurveToC 118, 156, 176, 215 1482, 1483, 1485, 1486
penCurveToV 119, 156, 176, 215 readChar 1250
penCurveToY 119, 157, 177, 215 readInteger 767
penEllipse 215 ReadOnlyLocator 1441
penLineTo 119, 157, 177, 216 readSpaces 767
penMoveTo 119, 157, 177, 216 readToken 767, 768
penRectangle 119, 157, 177, 216 rebalance 1142
PNGAverage 580 recalculate 28, 29, 32
PNGAveragePrediction 571 REFERENCE 1380
PNGNone 580 referenceCount 257, 274, 293, 365
PNGNonePrediction 572 referenceIndirect 232, 255, 263, 274, 292, 365
PNGOptimum 580 register 257, 274, 291, 365
PNGOptimumPrediction 573 registerActionHandler 50, 55
PNGPaeth 580 registerAlias 18
PNGPaethPrediction 574 registerAppearanceCreator 67, 70
PNGPrediction 575 registerDefaultHandler 55
PNGSub 580 registerFile 18
PNGSubPrediction 576 registerResource 18
PNGUp 580 registerWith 292
PNGUpPrediction 577 REGULAR 22
popResult 1244 ReInit 1251, 1252, 1301, 1308
Prediction 580 remove 92, 232, 263
PredictionFactory 582 removeAnnotation 1129
print 225 removeApplicationData 1014, 1129
process 49, 52, 56, 125, 132, 190 removeAttribute 241, 256, 275, 1014, 1391, 1394
processEndArray 1244 removeDocumentListener 275

Page 1514 of 1521


Index

removeField 804, 820, 827 SecurityHandlerFactory 416


removeFilters 343 seek 1465, 1468, 1475, 1478, 1482, 1486
removeFontFile2 691 seekBy 1465, 1468, 1475, 1478, 1482, 1486
removeFontProgramm 706 seekToEnd 1383
removeItem 1115 set 30, 40, 41, 64, 233, 281, 415, 416, 557, 582, 732, 733,
removeLastOperation 111 1433
removeMonitor 275 setA 81
removeNext 834 setAcroForm 1015
removeNode 1142 setAcroFormField 1188
removeObjectListener 256, 316, 331, 343 setAction 876, 909, 1111
removeOperation 111 setAdditionalActions 796, 820, 909, 1015, 1129
rename 1402, 1413, 1420, 1429, 1438, 1444, 1449, 1453, 1459 setAfm 718
renameState 935 setAlignment 1065
RENDERING_MODE_CLIP 195 setAlignmentCenter 820
RENDERING_MODE_FILL 195 setAlignmentLeft 820
RENDERING_MODE_FILL_CLIP 195 setAlignmentRight 820
RENDERING_MODE_FILL_STROKE 195 setAllCap 650, 676
RENDERING_MODE_FILL_STROKE_CLIP 195 setAlternateFieldName 821
RENDERING_MODE_NONE 195 setAlwaysUnchanged 1459
RENDERING_MODE_STROKE 195 setApp 954
RENDERING_MODE_STROKE_CLIP 196 setAppearance 910
reparseFromLocator 1336 setAppearanceCharacteristics 1227
reserveData 324 setAppearanceState 910
reset 539, 544, 820, 880, 896, 1462, 1472 setAppendOnly 783
resetFields 28, 32 setApplicationData 1015, 1048, 1129
resize 100 setAscent 687
resizeTo 101 setAttribute 241, 255, 276, 1015, 1392, 1393
restore 275, 1014, 1337 setAuthor 298, 1015
restoreState 119, 178, 202, 216, 234, 264, 286, 304, 316, 343, setAvgWidth 687
348 setB 82
restoreStateContainer 257, 275, 293, 365 setBackgroundColor 930
rotate 84 setBaseFont 667
RunLengthFilter 583 setBitsPerComponent 1076
RunLengthInputStream 584 setBlendMode 1032
RunLengthOutputStream 585 setBlendModeMultiply 1032
setBlendModeNormal 1032
S setBold 799
setBorderColor 931
save 275, 276, 521, 1014, 1015, 1337 setBorderStyle 910
saveState 119, 178, 202, 216, 234, 264, 283, 286, 302, 305, setBorderStyleName 910
307, 324, 343, 348, 360 setBorderStyleWidth 910
saveStateContainer 257, 276, 293, 365 setBoundingBox 1049
scale 84 setBuildProperties 1188
searchLastStartXRef 746 setBytes 1019, 1232
searchLinearized 747 setC 82

Page 1515 of 1521


Index

setCachedColorSpace 960 setDoc 1337


setCalculate 28, 32 setDocumentInfo 1015
setCanonicalFormat 862, 1238 setDoNotScroll 778, 821
setCapHeight 687 setDownAppearance 922
setCapStyle 164 setDownCaption 931
setCert 1188 setE 83
setChange 61 setEdit 778
setCharSpacing 198 setEmbeddedFile 1041
setCharUsed 667 setEmbedForm 863, 1238
setClip 164 setEmbedNew 738, 741
setColor 910 setEncodedBytes 344
setColorSpace 1076 setEncoding 667
setComb 778, 821 setEncryptionIn 398
setCombo 777 setEncryptOnWrite 292
setCommitKey 59 setEnd 1438
setCommitOnSelChange 778 setExceptionHandler 132, 191, 768
setContactInfo 1188 setExclFKey 863, 1239
setContents 911, 1149 setExclNonUserAnnots 863, 1239
setContentStream 167, 1049, 1129 setExecuted 62
setCorners 101 setExportFormat 863, 1239
setCreateComment 225 setExtendedState 119, 165, 178, 217
setCreateIndent 225 setF 83
setCreateLineSeparator 225 setFieldBoolean 241
setCreationDate 298 setFieldFixed 242
setCreationDateString 1015 setFieldInt 242
setCreator 298, 1015 setFieldMLString 242
setCropBox 1136 setFieldName 242
setD 82 setFieldObject 243
setDash 165 setFields 525, 531
setDashArray 944 setFieldString 242
setDate 950, 1188 setFieldValue 28, 32
setDebugStream 1308 setFile 526, 1041
setDecode 1077 setFileSelect 780
setDecodedBytes 344 setFileSpecification 1036
setDefaultAppearanceContent 829 setFileSpecificationString 1041
setDefaultAppearanceFont 829 setFileSystem 1040
setDefaultAppearanceFontColor 829 setFilter 954, 1189
setDefaultAppearanceFontSize 830 setFixedPitch 650, 676
setDefaultMap 17 setFlags 688
setDefaultResources 802 setFlagsValue 678, 688, 695
setDefaultValue 821, 896 setFlatnessTolerance 120, 178, 217
setDescent 688 setFont 12, 198, 792
setDestination 1086, 1111 setFontBB 688
setDirty 290, 1337 setFontColorValues 792
setDisplayMode 1023 setFontDescriptor 668

Page 1516 of 1521


Index

setFontFamily 688 setLockedContents 790


setFontFile 689 setLowerLeftX 101
setFontFile2 689 setLowerLeftY 101
setFontFile3 689 setMap 870
setFontName 689, 792 setMarkedContent 110, 1049
setFontSize 793 setMask 1077
setForceBold 650, 676 setMatrix 723, 1050
setGenericParent 803, 1102, 1136 setMaxLength 821
setGetMethod 863, 1239 setMaxWidth 690
setHeight 101, 1077 setMediaBox 1136
setHexMode 348 setMissingWidth 690
setHidden 788, 911 setMiterLimit 120, 165, 179, 217
setHighlightingMode 1086, 1227 setModDate 298
setHint 751 setModDateString 1016
setHorizontalScaling 198 setModifier 59
setIconFit 931 setMultiline 779, 821
setIconName 1036, 1195 setMultiSelect 779
setIgnoreBorderWidth 1066 setName 276, 911, 950, 1016, 1189, 1337, 1438
setImageMask 1077 setNeedAppearances 803
setInclude 864, 1239 setNoExport 779, 821
setIncludeAnnotations 864, 1240 setNonEFontNoWarn 950
setIncludeAppendSaves 864, 1240 setNonStrokeAlphaValue 165
setIncludeNoValueFields 864, 1240 setNonStrokeColor 223
setIncremental 1383 setNonStrokeColorCMYK 120, 179, 217
setIndex 1341 setNonStrokeColorGray 120, 180, 217
setInfoDict 276, 356, 1016 setNonStrokeColorRGB 120, 180, 218
setInnerColor 1093 setNonStrokeColorSpace 121, 165, 180, 218, 795
setInvisible 788, 911 setNonStrokeColorValues 121, 165, 180, 181, 218, 795
setItalic 650, 676, 799 setNonStrokeColorWithPattern 165
setItalicAngle 689 setNonStrokingAlphaConstant 1031
setJavaScript 848 setNonsymbolic 651, 677
setJoinStyle 165 setNormalAppearance 923
setKey 291 setNormalCaption 931
setKeywords 298, 1016 setNoRotate 789, 911
setKnockout 198 setNotDEFINED 865, 1240
setLeading 198, 690 setNoToggleToOff 779
setLength 1465, 1469, 1476, 1480, 1482, 1486 setNoView 789, 911
setLineCap 120, 178, 217 setNoZoom 789, 911
setLineDash 120, 179, 216, 217 setObject 290
setLineJoin 120, 179, 217 setOffset 1355
setLineLength 541 setOpacity 1093
setLineWidth 120, 165, 179, 217 setOpen 1150
setLocalName 532, 821, 1459 setOpenAction 1016
setLocation 1189 setOperand 138
setLocked 789, 911 setOptions 886

Page 1517 of 1521


Index

setOS 950 setSerif 651, 677


setOutline 1016 setShift 61
setOverrideEncoding 735 setSignature 893
setOverrideFontFamilyName 736 setSignatureExists 783
setOverrideFontStyle 736 setSmallCap 651, 677
setPage 1023 setSMask 1077
setPageMode 252 setStart 1438
setPageTree 1016 setStemH 690
setParameters 1023, 1024 setStemV 690
setParent 1149 setStream 556, 559
setPassword 780 setStrokeAlphaValue 166
setPermissions 1016 setStrokeColor 223
setPopup 1092 setStrokeColorCMYK 121, 181, 218
setPosition 324 setStrokeColorGray 121, 181, 218
setPrecision 287 setStrokeColorRGB 121, 181, 218
setPreRelease 950 setStrokeColorSpace 121, 166, 182, 219, 795
setPrint 789, 911 setStrokeColorValues 121, 122, 166, 182, 219, 795
setProducer 298, 1016 setStrokeColorWithPattern 166
setPubSec 954 setStrokingAlphaConstant 1031
setPushbutton 779, 879 setStyle 944
setQuadding 830 setSubFilter 1189
setQuadPoints 1206 setSubject 298, 1017, 1092, 1149
setR 951 setSubmitCoordinates 865, 1240
setRadio 780 setSubmitPDF 865, 1241
setRc 60 setSymbolic 651, 677
setReadOnly 780, 790, 822, 912, 1414, 1429, 1444 setSynchSynchronous 1419, 1422
setReason 1189 setTarget 61
setRectangle 912 setTargetName 61
setRenderingIntent 121, 181, 218 setText 1092
setRenderingMode 199 setTextPosition 931
setRequired 780 setTitle 299, 1017, 1111
setResources 797, 1050, 1129 setToggleNoView 790, 912
setRise 199 setTransform 166, 199
setRolloverAppearance 923 setTransformation 83, 84
setRolloverCaption 931 setTransformationValues 166
setRoot 356 setTrapped 299, 1017
setRotate 1137 setTrustedMode 951
setRotation 931 setTTFont 707
setScalingCircumstances 1065 setTypeName 1327
setScalingMode 1066 setUpperRightX 102
setScript 651, 677 setUpperRightY 102
setSearchPathDefinition 1422 setURI 869
setSearchPaths 1422 setURL 1043
setSelEnd 60 setUrl 865
setSelStart 60 setUseTempFile 1419

Page 1518 of 1521


Index

setV 951 StandardSecurityHandlerR3 426


setValidate 28, 31 StandardSecurityHandlerR4 428
setValue 60, 103, 266 STARTXREF 1317
setValueString 822, 880, 886, 896 staticFlag 1248
setValueStrings 822, 886 STDocType 1326
setVersion 252, 1327 stGetDoc 277, 292
setWidth 102, 944, 1077 STREAM 1380
setWillCommit 59 StreamBasedFilter 588
setWordSpacing 199 StreamLocator 1446
setWriteModeHint 277, 1017, 1338 STRING_CLOSE 1381
setXFDF 865, 1241 STRING_HEX_CLOSE 1381
setXHeight 691 STRING_HEX_OPEN 1381
setXRefSection 1338 STRING_LITERAL 1306
setXRefStream 1344 STRING_OPEN 1381
SHADING_TYPE_AXIAL 1176 StringLocator 1451
SHADING_TYPE_COONS 1176 stringValue 77, 305, 316, 348
SHADING_TYPE_FREEFORM 1176 STStreamXRefSection 1341
SHADING_TYPE_FUNCTIONBASED 1176 STTrailerXRefSection 1343
SHADING_TYPE_LATTICEFORM 1176 STXRefEntryCompressed 1348
SHADING_TYPE_RADIAL 1177 STXRefEntryFree 1351
SHADING_TYPE_TENSORPRODUCT 1177 STXRefEntryOccupied 1354
SINGLETON 653, 657, 972, 975, 981, 1213, 1215, 1217, STXRefSubsection 1362
1219 SubmitFormFlags 1238
size 111, 233, 264 subsectionIterator 1361
SIZE_A4 97 supportsPrint 909, 1203
skip 539, 544 SwitchTo 1308
SLOT_BYTES 337 SymbolEncoding 514
SLOT_CONTAINER 312 synch 1402, 1406, 1411, 1420, 1438, 1443, 1448, 1453, 1459
SLOT_DIRTY 269
SLOT_LOCATOR 270 T
SLOT_TRAILER 270
SPACE 1380 textBegin 122, 182, 219
specialToken 1311 textEnd 122, 182, 219
Standard 497 textLineMove 122, 182, 220
StandardActionHandlerRegistry 54 textLineMoveSetLeading 220
StandardActionProcessor 56 textLineMoveTo 220
StandardCryptHandler 417 textLineNew 122, 183, 220
StandardDocumentFactory 378 textMove 122, 183, 219
StandardEncoding 512 textMoveTo 122, 183, 219
StandardFilterFactory 586 textSetCharSpacing 122, 183, 220
StandardFontOutlet 743 textSetFont 123, 183, 220, 794
StandardFormHandlerFactory 35 textSetHorizontalScaling 123, 184, 220
StandardPredictionFactory 587 textSetLeading 123, 184, 221
StandardSecurityHandler 420 textSetRenderingMode 123, 184, 221
StandardSecurityHandlerR2 424 textSetRise 123, 184, 221

Page 1519 of 1521


Index

textSetTransform 123, 184, 221 1346, 1390, 1406, 1411, 1420


textSetWordSpacing 123, 185, 221 toStringWithZone 76, 77
textShow 123, 185, 219 toTransform 85
TextState 196 touch 912, 937
textState 162 toURL 1402, 1407, 1412, 1420, 1428, 1437, 1443, 1448, 1453,
textT3SetGlyphWidth 124, 186, 221 1459
textT3SetGlyphWidthBB 124, 186, 221 TP_CAPTION_ABOVE_ICON 928
TIFF 580 TP_CAPTION_BELOW_ICON 928
TIFFFaxDecoder 589 TP_CAPTION_LEFT_OF_ICON 929
TIFFPrediction 591 TP_CAPTION_ONLY 928
tlmMove 198 TP_CAPTION_OVERLAIS_ICON 929
tmMove 198 TP_CAPTION_RIGHT_OF_ICON 928
tmMoveTo 198 TP_ICON_ONLY 928
toByteArray 111, 1383, 1476 TRAILER 1381
toCOSObject 766 transform 84, 124, 186, 202, 221, 1227
toDate 76, 77 TransientLocator 1456
toDateWithZone 76 translate 85
toDictionary 352 triggerChangedAll 277
toFormattedString 77 TriggerEvent 58
toInt 624, 625 TRUE 245, 1381
Token 1312 TYPE_COMPRESSED 1367
token 1300 TYPE_FREE 1367, 1370
TOKEN_endobj 761 TYPE_OCCUPIED 1367, 1370
TOKEN_endstream 762
TOKEN_EOF 761 U
TOKEN_false 761
TOKEN_FDFHEADER 760 UNDEFINED 22, 1323
TOKEN_ndstream 762 UNIQUE 494, 499, 501, 510, 512, 514, 517
TOKEN_null 761 unregisterActionHandler 50, 55
TOKEN_obj 761 unregisterAppearanceCreator 67, 70
TOKEN_PDFHEADER 760 updateFileID 357
TOKEN_R 762 updateModificationDate 1338
TOKEN_s_tream 762
token_source 1300 V
TOKEN_startxref 761
TOKEN_stream 762 VALUE_COLOR_PRECISION 210
TOKEN_trailer 761 VALUE_COORDINATE_PRECISION 210
TOKEN_true 761 VALUE_DASH_PRECISION 210
TOKEN_xref 761 VALUE_FACTOR_PRECISION 210
tokenImage 1297, 1306 VALUE_FLATNESS_PRECISION 210
TokenMgrError 1313 VALUE_FONT_PRECISION 210
toNormalizedRectangle 102 VALUE_GRAY_PRECISION 210
toRectangle 102 VALUE_WIDTH_PRECISION 210
toString 22, 76, 111, 139, 141, 243, 291, 317, 320, 493, 534, values 264
668, 723, 804, 822, 912, 972, 975, 981, 1102, 1312, 1327, visitFromArray 328, 371, 1383

Page 1520 of 1521


Index

visitFromBoolean 328, 372, 1384


visitFromCompressed 1318, 1371
visitFromDictionary 328, 372, 1384
visitFromFixed 328, 372, 1384
visitFromFree 1318
visitFromIndirectObject 326, 329, 374, 1384
visitFromInteger 328, 372, 1385
visitFromName 328, 373, 1385
visitFromNull 328, 373, 1385
visitFromOccupied 1318
visitFromProxy 375, 1385
visitFromStream 328, 373, 1386
visitFromString 329, 374, 1386

warning 188, 756


willChange 255, 277, 290, 365, 369
WinAnsiEncoding 517
write 509, 541, 546, 1386, 1387, 1465, 1466, 1470, 1471,
1476, 1479, 1480, 1483, 1486
writeContentStream 1387
writeDocument 1387
writeEOL 1387
writeIndirectObject 1387
writeObject 1387
writeXRef 1318

XREF 1371
XRefEntryVisitorException 1364
XRefFallbackParser 1365
XRefStreamParser 1366
XRefStreamWriter 1367
XRefTrailerParser 1369
XRefTrailerWriter 1371

Page 1521 of 1521

Вам также может понравиться