jPod intarsys PDF Library

Documentation

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. b. c. d. e. f. Installation Overview Implementation Details License References 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 public AbstractFontRegistry() AbstractFontRegistry(int initialCapacity)

Method Summary
void IFont FontFamily java.util.Iterator addFont(IFont font) getFont(String familyName, FontStyle style) getFontFamily(String familyName) 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 java.io.InputStream getAlias() 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 java.util.Iterator void getFont(FontStyle style) getFontIterator() 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 java.io.File getAsStream() 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 java.io.InputStream String FontMapper String getAsStream() getKey() getMapper() 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 FontMap FontMap void void void void getActive() getDefaultMap() lookupFontMap(String name) registerAlias(String name, String alias) registerFile(String name, java.io.File file) registerResource(String name, Class owner, String resource) 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 Class String getAsStream() getOwner() 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 public static final public static final BOLD BOLD_ITALIC COUNT

The number of font styles Value: 4
public static final public static final public static final ITALIC REGULAR UNDEFINED

The enumeration of supported font styles

Method Summary
FontStyle static FontStyle FontStyle String String getBoldFlavor() getFontStyle(String name) getItalicFlavor() getLabel() 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 String boolean boolean void void void void void void void getDoc() getFieldValue(Object fieldref) isCalculate() isValidate() recalculate() recalculate(Object fieldRef) resetFields() resetFields(java.util.List fieldNames, boolean invert) setCalculate(boolean calculate) setFieldValue(Object fieldRef, Object value) 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 IFormHandlerFactory static void get()

The active IFormHandlerFactory for the VM.
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 String boolean boolean void void void void void void void getDoc() getFieldValue(Object fieldRef) isCalculate() isValidate() recalculate() recalculate(Object fieldRef) resetFields() resetFields(java.util.List fieldNames, boolean invert) setCalculate(boolean calculate) setFieldValue(Object fieldRef, Object value) 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 public public public ActionException() ActionException(String message) ActionException(Throwable cause) 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 IActionHandlerRegistr y static void get()

The active IActionHandlerRegistry for the VM.
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 IActionProcessor static void get()

The active IActionHandlerRegistry for the VM.
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 static TriggerEvent static TriggerEvent annotationTriggerBlurred(PDAnnotation annotation) annotationTriggerFocus(PDAnnotation annotation) annotationTriggerKeystroke(PDAnnotation annotation, String change, boolean willCommit, int commitKey, boolean modifier, int selStart, int selEnd, boolean shift, String value) annotationTriggerMouseDown(PDAnnotation annotation) annotationTriggerMouseEnter(PDAnnotation annotation) annotationTriggerMouseExit(PDAnnotation annotation) annotationTriggerMouseUp(PDAnnotation annotation) annotationTriggerPageClose(PDAnnotation annotation) annotationTriggerPageInvisible(PDAnnotation annotation) annotationTriggerPageOpen(PDAnnotation annotation)

static TriggerEvent static TriggerEvent static TriggerEvent static TriggerEvent static TriggerEvent static TriggerEvent static TriggerEvent

Page 42 of 1521

de.intarsys.pdf.app.action.ActionTools

static TriggerEvent static ActionTools.ActionDis ablement static void static TriggerEvent static TriggerEvent static TriggerEvent static TriggerEvent static TriggerEvent static TriggerEvent static void

annotationTriggerPageVisible(PDAnnotation annotation) disableActions(COSDocument doc, COSName actionType)

Set a flag with doc to signal that action processing for the type actionType should be disabled.
documentProcessModules(PDDocument doc) documentTriggerClose(PDDocument doc) documentTriggerDidPrint(PDDocument doc) documentTriggerDidSave(PDDocument doc) documentTriggerOpen(PDDocument doc) documentTriggerWillPrint(PDDocument doc) documentTriggerWillSave(PDDocument doc) 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) fieldTriggerFormat(PDAcroFormField field, boolean willCommit, int commitKey, String value)

static TriggerEvent

Format the value of the widget according to its formatting script.
static TriggerEvent static boolean fieldTriggerValidate(PDAcroFormField field, String value) isEnabled(COSDocument doc, COSName actionType) true if execution of an action of type actionType should be allowed. static TriggerEvent static TriggerEvent pageTriggerClose(PDPage page) 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 IActionHandler IActionHandler void void void getActionHandlers() getDefaultHandler() lookupActionHandler(COSName actionType) registerActionHandler(IActionHandler handler) registerDefaultHandler(IActionHandler handler) 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 public TriggerEvent(Object context, COSName reason) TriggerEvent(Object source, Object context, COSName reason)

Method Summary
String int Object String boolean COSName int int Object Object String getChange() getCommitKey() getContext() getName() getRc() getReason() getSelEnd() getSelStart() getSource() getTarget() getTargetName()

Page 57 of 1521

de.intarsys.pdf.app.action.TriggerEvent

String String boolean boolean boolean boolean boolean void void void void void void void void void void void void

getType() getValue() isExecuted() isModifier() isRc() isShift() isWillCommit() setChange(String change) setCommitKey(int commitKey) setExecuted(boolean executed) setModifier(boolean modifier) setRc(boolean rc) setSelEnd(int selEnd) setSelStart(int selStart) setShift(boolean shift) setTarget(Object target) setTargetName(String targetName) setValue(String value) 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 IAppearanceCreatorReg istry static void get()

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 static PDAppearance createAppearance(PDAcroFormField field) 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 void void lookupAppearanceCreator(COSName type) registerAppearanceCreator(IAppearanceCreator creator) 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 COSName createAppearance(PDAnnotation annotation, PDAppearance appearance) 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 subtype.

Method Summary
java.util.List IAppearanceCreator void void getAppearanceCreators() lookupAppearanceCreator(COSName type) registerAppearanceCreator(IAppearanceCreator creator) 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 static String static String toString(java.util.Date date) toStringWithZone(java.util.Date date) 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 void invalidateCaches() 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 ransform float[] toTransform()

Create an java.awt.geom.AffineTransform that corresponds to this.
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 COSString getKey() 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 CDSNameTreeNode static CDSTreeNode static CDSNameTreeNode static CDSNameTreeNode static CDSNameTreeNode COSObject createFromCos(COSDictionary node)

Create the correct concrete CDSTreeNode implementation for node.
createIntermediate() createLeaf()

createRootIntermediate()

createRootLeaf()

get(COSString name)

Answer the value associated with the key name.
java.util.List java.util.List getEntries() 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 java.util.Iterator isLeaf() 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 COSInteger getKey() 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 void invalidateCaches() 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 le2D java.awt.geom.Rectang le2D toNormalizedRectangle()

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

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 float float float llx, lly, urx, 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 COSObject getKey() 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 abstract boolean isIntermediate() 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 CSOperation createStream() getLastOperation()

remove last operation from the rendering program.
CSOperation getOperation(int index)

Page 108 of 1521

de.intarsys.pdf.content.CSContent

CSOperation[] void

getOperations() removeLastOperation()

remove last operation from the rendering program.
void void removeOperation(int index) 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 void void void void ICSGraphicsState ICSInterpreter void void close() compatibilityBegin() compatibilityEnd() doShading(COSName name, PDShading shading) doXObject(COSName name, PDXObject xobject) getGraphicsState() getInterpreter() inlineImage(PDImage img) markedContentBegin(COSName tag)

Page 112 of 1521

de.intarsys.pdf.content.CSDeviceAdapter

void

markedContentBeginProperties(COSName tag, COSName resourceName, COSDictionary properties) markedContentEnd() markedContentPoint(COSName tag) markedContentPointProperties(COSName tag, COSName resourceName, COSDictionary properties) open(ICSInterpreter pInterpreter) pathClipEvenOdd() pathClipNonZero() pathClose() pathCloseFillStrokeEvenOdd() pathCloseFillStrokeNonZero() pathCloseStroke() pathEnd() pathFillEvenOdd() pathFillNonZero() pathFillStrokeEvenOdd() pathFillStrokeNonZero() pathStroke() penCurveToC(float x1, float y1, float x2, float y2, float x3, float y3) penCurveToV(float x2, float y2, float x3, float y3) penCurveToY(float x1, float y1, float x3, float y3) penLineTo(float x, float y) penMoveTo(float x, float y) penRectangle(float x, float y, float w, float h)

void void void

void void void void void void void void void void void void void void void void void void void

Page 113 of 1521

de.intarsys.pdf.content.CSDeviceAdapter

void void void void void void void void void void void void void void void

restoreState() saveState() setExtendedState(COSName name, PDExtGState gstate) setFlatnessTolerance(float flatness) setLineCap(int capStyle) setLineDash(float[] pattern, float phase) setLineJoin(int joinStyle) setLineWidth(float lineWidth) setMiterLimit(float miterLimit) setNonStrokeColorCMYK(float c, float m, float y, float k) setNonStrokeColorGray(float gray) setNonStrokeColorRGB(float r, float g, float b) setNonStrokeColorSpace(COSName name, PDColorSpace colorSpace) setNonStrokeColorValues(float[] values) setNonStrokeColorValues(float[] values, COSName name, PDPattern pattern) setRenderingIntent(COSName intent) setStrokeColorCMYK(float c, float m, float y, float k) setStrokeColorGray(float gray) setStrokeColorRGB(float r, float g, float b) setStrokeColorSpace(COSName name, PDColorSpace colorSpace) setStrokeColorValues(float[] values) setStrokeColorValues(float[] values, COSName name, PDPattern pattern) textBegin() textEnd()

void void void void void void void void void

Page 114 of 1521

de.intarsys.pdf.content.CSDeviceAdapter

void void void void void void void void void void void void void void void void

textLineMove(float dex, float dy) textLineNew() textMove(float dx, float dy) textMoveTo(float x, float y) textSetCharSpacing(float charSpacing) textSetFont(COSName name, PDFont font, float size) textSetHorizontalScaling(float scaling) textSetLeading(float leading) textSetRenderingMode(int renderingMode) textSetRise(float rise) textSetTransform(float a, float b, float c, float d, float e, float f) textSetWordSpacing(float wordSpacing) textShow(byte[] text, int offset, int length) textShow(String text) textT3SetGlyphWidth(float x, float y) textT3SetGlyphWidthBB(float x, float y, float llx, float lly, float urx, float ury) transform(float a, float b, float c, float d, float e, float f)

void

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 public public public CSError(String message) CSError(String message, Throwable cause) CSError() 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 public public public CSException(String message) CSException(String message, Throwable cause) CSException() 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 java.util.Map void void getExceptionHandler() getOptions() process(CSContent pContent, PDResources pResources) 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 public CSNotSupported(String message, Throwable cause) 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 public public CSOperation(CSOperator operator) CSOperation(CSOperator operator, COSObject[] operands) 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[] boolean getOperatorToken() 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 boolean byte[] int String create(String name) equals(Object o) getToken() hashCode() 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 public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final CSO_All CSO_b CSO_B CSO_BDC CSO_BI CSO_BMC CSO_bstar CSO_Bstar CSO_BT CSO_BX CSO_c CSO_cm CSO_cs CSO_CS CSO_d CSO_d0 CSO_d1

Page 142 of 1521

de.intarsys.pdf.content.CSOperators

public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final

CSO_Do CSO_DoubleQuote CSO_DP CSO_EI CSO_EMC CSO_ET CSO_EX CSO_f CSO_F CSO_fstar CSO_g CSO_G CSO_gs CSO_h CSO_i CSO_ID CSO_j CSO_J CSO_k CSO_K CSO_l CSO_m CSO_M CSO_MP

Page 143 of 1521

de.intarsys.pdf.content.CSOperators

public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final

CSO_n CSO_q CSO_Q CSO_Quote CSO_re CSO_rg CSO_RG CSO_ri CSO_s CSO_S CSO_sc CSO_SC CSO_scn CSO_SCN CSO_sh CSO_Tc CSO_Td CSO_TD CSO_Tf CSO_Tj CSO_TJ CSO_TL CSO_Tm CSO_Tr

Page 144 of 1521

de.intarsys.pdf.content.CSOperators

public static final public static final public static final public static final public static final public static final public static final public static final public static final

CSO_Ts CSO_Tstar CSO_Tw CSO_Tz CSO_v CSO_w CSO_W CSO_Wstar 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 void void void void void void void void void void void pathClipEvenOdd() pathClipNonZero() pathClose() pathCloseFillStrokeEvenOdd() pathCloseFillStrokeNonZero() pathCloseStroke() pathEnd() pathFillEvenOdd() pathFillNonZero() pathFillStrokeEvenOdd() pathFillStrokeNonZero() pathStroke()

Page 154 of 1521

de.intarsys.pdf.content.CSShapeDevice

void void void void void void

penCurveToC(float x1, float y1, float x2, float y2, float x3, float y3) penCurveToV(float x2, float y2, float x3, float y3) penCurveToY(float x1, float y1, float x3, float y3) penLineTo(float x, float y) penMoveTo(float x, float y) 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 public public public CSWarning(String message) CSWarning(String message, Throwable cause) CSWarning() 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 int java.awt.Shape float[] float int float float float PDColorSpace float[] float copy() getCapStyle() getClip() getDashPattern() getDashPhase() getJoinStyle() getLineWidth() getMiterLimit() getNonStrokeAlphaValue() getNonStrokeColorSpace() getNonStrokeColorValues() getStrokeAlphaValue()

Page 161 of 1521

de.intarsys.pdf.content.GraphicsState

PDColorSpace float[] java.awt.geom.AffineT ransform float[] void void void void void void void void void void void void void void void void void

getStrokeColorSpace() getStrokeColorValues() getTransform()

getTransformationValues() setCapStyle(int paramCapStyle) setClip(java.awt.Shape paramClip) setDash(float[] pattern, float phase) setExtendedState(PDExtGState gstate) setJoinStyle(int paramJoinStyle) setLineWidth(float paramWidth) setMiterLimit(float value) setNonStrokeAlphaValue(float paramNonStrokeAlphaValue) setNonStrokeColorSpace(PDColorSpace colorSpace) setNonStrokeColorValues(float[] values) setNonStrokeColorWithPattern(float[] values, COSName pattern) setStrokeAlphaValue(float paramStrokeAlphaValue) setStrokeColorSpace(PDColorSpace paramStrokeColorSpace) setStrokeColorValues(float[] values) setStrokeColorWithPattern(float[] values, COSName pattern) setTransform(java.awt.geom.AffineTransform paramTransform) 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 void error(CSError error) 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 TextState begin() copy()

Page 193 of 1521

de.intarsys.pdf.content.TextState

void float PDFont float float float float int float java.awt.geom.AffineT ransform java.awt.geom.AffineT ransform float boolean

end() getCharSpacing() getFont() getFontSize() getHorizontalScaling() getHorizontalScalingFactor() getLeading() getRenderingMode() getRise() getTextLineMatrix()

getTextMatrix()

getWordSpacing() isFont(PDFont queryFont, float queryFontSize)

Answer true if the actual font in the text state is equal to queryFont and queryFontSize.
boolean void void void void void void void void void isKnockout() setCharSpacing(float paramCharSpacing) setFont(PDFont paramFont, float size) setHorizontalScaling(float paramHorizontalScaling) setKnockout(boolean paramKnockout) setLeading(float paramLeading) setRenderingMode(int paramRenderingMode) setRise(float paramRise) setTransform(float a, float b, float c, float d, float e, float f) setWordSpacing(float paramWordSpacing)

Page 194 of 1521

de.intarsys.pdf.content.TextState

void void void

tlmMove(float dx, float dy) tmMove(float dx, float dy) 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 le2D getBoundingBox()

The bounding box containing all graphics artifacts stemming from operations in the content stream processed.
open(ICSInterpreter pInterpreter) restoreState() saveState() transform(float a, float b, float c, float d, float e, float f)

void void void void

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 java.awt.geom.Rectang le2D static PDForm getBoundingBoxClipped(PDPage page, double border)

Get the rectangle containing all graphics artifacts on the page (stemming from the content stream).
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 void void void close() compatibilityBegin() compatibilityEnd() 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 void void doShading(COSName name, PDShading shading) doXObject(COSName name, PDXObject xObject) flush()

Flush all pending operations on the stream.
CSContent getContent()

The CSContent we are working on.
IContentStreamProvide r IResourcesProvider getContentStreamProvider()

getResourcesProvider()

The IResourcesProvider associated with this.
void void void inlineImage(PDImage img) markedContentBegin(COSName tag) markedContentBeginProperties(COSName tag, COSName resourceName, COSDictionary properties)

Page 206 of 1521

de.intarsys.pdf.content.common.CSCreator

void void void

markedContentEnd() markedContentPoint(COSName tag) markedContentPointProperties(COSName tag, COSName resourceName, COSDictionary properties) open(ICSInterpreter pInterpreter) pathClipEvenOdd() pathClipNonZero() pathClose() pathCloseFillStrokeEvenOdd() pathCloseFillStrokeNonZero() pathCloseStroke() pathEnd() pathFillEvenOdd() pathFillNonZero() pathFillStrokeEvenOdd() pathFillStrokeNonZero() pathStroke() penCircle(float x, float y, float r)

void void void void void void void void void void void void void void

Draw a circle.
void void void void penCurveToC(float x1, float y1, float x2, float y2, float x3, float y3) penCurveToV(float x2, float y2, float x3, float y3) penCurveToY(float x1, float y1, float x3, float y3) penEllipse(float x, float y, float rx, float ry)

Draw an ellipse.
void void penLineTo(float x, float y) penMoveTo(float x, float y)

Page 207 of 1521

de.intarsys.pdf.content.common.CSCreator

void void void void void void void void

penRectangle(float x, float y, float w, float h) restoreState() saveState() setExtendedState(COSName name, PDExtGState gstate) setFlatnessTolerance(float flatness) setLineCap(int style) setLineDash(float[] pattern, float phase) setLineDash(float unitsOn, float unitsOff, float phase)

Convenience method to access "setLineDash".
void void void void void void void void void setLineJoin(int style) setLineWidth(float w) setMiterLimit(float miterLimit) setNonStrokeColorCMYK(float c, float m, float y, float k) setNonStrokeColorGray(float gray) setNonStrokeColorRGB(float red, float green, float blue) setNonStrokeColorSpace(COSName name, PDColorSpace colorSpace) setNonStrokeColorValues(float[] values) setNonStrokeColorValues(float[] values, COSName name, PDPattern pattern) setRenderingIntent(COSName intent) setStrokeColorCMYK(float cyan, float magenta, float yellow, float key) setStrokeColorGray(float gray) setStrokeColorRGB(float red, float green, float blue) setStrokeColorSpace(COSName name, PDColorSpace colorSpace) setStrokeColorValues(float[] values) setStrokeColorValues(float[] values, COSName name, PDPattern pattern)

void void void void void void void

Page 208 of 1521

de.intarsys.pdf.content.common.CSCreator

void void void void

textBegin() textEnd() textLineMove(float dx, float dy) 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 void void void void void void void void void void void void void textLineNew() textMove(float dx, float dy) textMoveTo(float x, float y) textSetCharSpacing(float charSpace) textSetFont(COSName name, PDFont font, float size) textSetHorizontalScaling(float scale) textSetLeading(float leading) textSetRenderingMode(int rendering) textSetRise(float rise) textSetTransform(float a, float b, float c, float d, float e, float f) textSetWordSpacing(float wordSpace) textShow(byte[] text, int offset, int length) textT3SetGlyphWidth(float x, float y) textT3SetGlyphWidthBB(float x, float y, float llx, float lly, float urx, float ury) transform(float a, float b, float c, float d, float e, float f)

void

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 static void setNonStrokeColor(ICSDevice device, float[] color) 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 boolean boolean boolean void void void void getValue() isCreateComment() isCreateIndent() isCreateLineSeparator() print(CSContent content) setCreateComment(boolean createComment) setCreateIndent(boolean createIndent) 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 COSArray accept(ICOSObjectVisitor visitor) add(COSObject object)

Add a COSObject to the collection.
COSArray add(int index, COSObject object)

Add a COSObject to the collection.
COSArray COSArray asArray() 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 COSObject static COSArray copyDeep(java.util.Map copied) copyShallow() 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 COSObject equals(Object o) 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 COSIndirectObject boolean iterator() referenceIndirect(COSObject object) remove(COSObject object)

Remove object from this.
COSObject remove(int index)

Remove the object at index from the collection.
void Object COSObject restoreState(Object object) saveState() 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) cosGetArray()

COSArray

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 boolean getAttribute(Object key) 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 Object removeAttribute(Object key) 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 COSBasedObject createFromCos(COSObject object) 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 public static final FALSE TRUE

Method Summary
Object COSBoolean abstract boolean accept(ICOSObjectVisitor visitor) asBoolean() 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 public static final CN_Type_Catalog CN_Version_1_4

Well known attribute names
public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final DK_AcroForm DK_Dests DK_FDF DK_Metadata DK_Names DK_OpenAction DK_Outlines DK_OutputIntents DK_PageMode DK_Pages DK_PieceInfo

Page 247 of 1521

de.intarsys.pdf.cos.COSCatalog

public static final public static final public static final public static final public static final

DK_Sig DK_Type DK_URI DK_Version 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 ICOSContainer COSDocumentElement COSObject COSObject ICOSContainer Object boolean boolean int COSIndirectObject addObjectListener(ICOSObjectListener listener) associate(ICOSContainer newContainer, COSObject object) containable(COSObject object) copyDeep() copyDeep(java.util.Map copied) disassociate(ICOSContainer oldContainer, COSObject object) getAttribute(Object key) isObjectListenerAvailable() isPrimitive() referenceCount() 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 void ICOSContainer ICOSContainer Object void

removeAttribute(Object key) removeObjectListener(ICOSObjectListener listener) restoreStateContainer(ICOSContainer pContainer) saveStateContainer() setAttribute(Object key, Object value) 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 void accept(ICOSObjectVisitor visitor) 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 java.util.Iterator asDictionary() 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 COSObject static COSDictionary copyDeep(java.util.Map copied) copyShallow() 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 COSObject iterator() 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 COSObject referenceIndirect(COSObject object) remove(COSName key)

Remove the element from the collection associated with key.
void Object int restoreState(Object object) saveState() 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 Object Object getKey() getValue() 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 public static final public static final SLOT_DIRTY SLOT_LOCATOR 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 ICOSContainer addMonitor(ICOSMonitor listener) 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 COSCatalog getAttribute(Object key) 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 boolean handleException(COSRuntimeException ex) 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 void removeAttribute(Object key) removeDocumentListener(ICOSDocumentListener listener)

Remove an ICOSDocumentListener.
void void removeMonitor(ICOSMonitor monitor) 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 void setAttribute(Object key, Object value) 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 COSDocumentElement abstract COSObject containable()

The COSDocumentElement suitable for use in an ICOSContainer.
dereference()

Return the real object.
abstract COSDocument getDoc()

The document where this is contained or null.
void boolean handleException(COSRuntimeException ex) 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 ICOSDocumentFactory static void get() 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 static COSFalse boolean int booleanValue() create() equals(Object o) 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 COSFixed static COSFixed static COSFixed static COSFixed static COSFixed static COSFixed boolean float int accept(ICOSObjectVisitor visitor) asFixed() create(byte[] bytes, int start, int length) create(double value) create(double value, int precision) create(float value) create(float value, int precision) equals(Object o) floatValue() getPrecision()

The precision (digits after period) for this.
int hashCode()

Page 284 of 1521

de.intarsys.pdf.cos.COSFixed

int void Object void

intValue() restoreState(Object object) saveState() 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 ICOSContainer COSDocumentElement COSDocumentElement static COSIndirectObject static COSIndirectObject COSObject ICOSContainer COSDocument COSObjectKey accept(ICOSObjectVisitor visitor) associate(ICOSContainer newContainer, COSObject pObject) containable() containable(COSObject pObject) create(COSObject object)

Create an indirection for object.
create(STDocument stDoc, COSObjectKey key)

dereference() disassociate(ICOSContainer oldContainer, COSObject pObject) getDoc() 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 boolean int COSIndirectObject void void ICOSContainer ICOSContainer void

isReference() isSwapped() referenceCount() referenceIndirect(COSObject pObject) register(COSDocumentElement pObject) registerWith(STDocument pSTDoc) restoreStateContainer(ICOSContainer container) saveStateContainer() 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 void toString() 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 public static final DK_Author DK_CreationDate

Well known attributes
public static final public static final public static final public static final public static final public static final public static final public static final DK_Creator DK_Keywords DK_ModDate DK_Producer DK_Subject DK_Title DK_Trapped 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 COSInteger static COSInteger static COSInteger boolean float int int Object accept(ICOSObjectVisitor visitor) asInteger() create(byte[] bytes, int start, int length) create(int value) equals(Object o) floatValue() hashCode() intValue() 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 COSName byte[] accept(ICOSObjectVisitor visitor) asName() byteValue()

The bytes that make up this name (without "/")
static COSName static COSName static COSName boolean int void Object String constant(String name) create(byte[] bytes) create(String name) equals(Object o) hashCode() restoreState(Object object) saveState() 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 static COSNull boolean int boolean Object accept(ICOSObjectVisitor visitor) create() equals(Object o) hashCode() isNull() 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 abstract float asNumber() 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 COSDictionary COSFixed COSInteger COSName COSNull COSNumber asBoolean() asDictionary() asFixed() asInteger() asName() asNull() asNumber()

Page 310 of 1521

de.intarsys.pdf.cos.COSObject

COSStream COSString abstract java.util.Iterator COSObject

asStream() asString() basicIterator()

An iterator over contained objects and references.
beConstant()

Declare this to be a constant.
COSIndirectObject beIndirect()

Make an indirect object out of a direct one.
COSDocumentElement abstract COSObject containable() 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 abstract java.util.Iterator abstract void isSwapped() iterator()

An iterator over contained objects.
removeObjectListener(ICOSObjectListener listener)

Remove a listener for object changes.
void String restoreState(Object saveState) 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 int equals(Object obj) getGenerationNumber()

The keys generation number.
int getObjectNumber()

The keys object number.
int String hashCode() 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 java.util.Iterator COSObject COSObject COSObject void accept(ICOSObjectVisitor visitor) basicIterator() copyDeep(java.util.Map copied) copyShallow() dereference() 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 void saveState() 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 public COSObjectWalkerDeep() COSObjectWalkerDeep(boolean swap)

Method Summary
java.util.Set Object getVisited() 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 Object Object Object Object Object Object Object Object Object visitFromArray(COSArray array) visitFromBoolean(COSBoolean bool) visitFromDictionary(COSDictionary dict) visitFromFixed(COSFixed fixed) visitFromIndirectObject(COSIndirectObject io) visitFromInteger(COSInteger integer) visitFromName(COSName name) visitFromNull(COSNull nullObj) visitFromStream(COSStream stream) 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 java.util.Iterator COSObject COSObject boolean boolean boolean java.util.Iterator void addObjectListener(ICOSObjectListener listener) basicIterator() copyDeep() copyDeep(java.util.Map copied) isDangling() isObjectListenerAvailable() isPrimitive() iterator() 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 public public public COSRuntimeException() COSRuntimeException(String message, Throwable cause) COSRuntimeException(String message) 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 public static final public static final public static final public static final public static final public static final public static final public static final DK_DecodeParms DK_DP DK_F DK_FDecodeParams DK_FFilter DK_Filter DK_Length DK_Resources SLOT_BYTES

Method Summary
Object void accept(ICOSObjectVisitor visitor) addFilter(COSName name)

Add a new filter to this.
void addObjectListener(ICOSObjectListener listener)

Page 335 of 1521

de.intarsys.pdf.cos.COSStream

COSStream java.util.Iterator void

asStream() basicIterator() 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 COSObject static COSStream copyDeep(java.util.Map copied) copyShallow() 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 void iterator() removeFilters()

Remove all filters from this.
void void Object void removeObjectListener(ICOSObjectListener listener) restoreState(Object object) saveState() 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 COSString byte[] accept(ICOSObjectVisitor visitor) asString() byteValue()

The bytes that make up this string.
int static COSString compareTo(Object o) 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 int String equals(Object o) hashCode() 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 Object void restoreState(Object object) saveState() 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 public public public COSSwapException() COSSwapException(String message) COSSwapException(Throwable cause) 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 public static final public static final DK_Encrypt DK_ID DK_Info

The well known attribute names
public static final public static final public static final public static final public static final DK_Prev DK_Root DK_Size DK_XRefStm 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 COSCatalog getPrev() getRoot()

Get the root object (the catalog) for the document.
int void void getSize() invalidateCaches() 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 static COSTrue boolean int booleanValue() create() equals(Object o) 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 public public public COSVisitorException() COSVisitorException(String message, Throwable cause) COSVisitorException(String message) 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.

constant

| composite | | n.a.

| indirect | n.a. | n.a. | n.a. | n.a.

| | | | |

null | n.a. composite | ok indirect | ok

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 Class static MetaClass getInstanceClass() getRootClass() 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 public static public static public static public static public static public static public static Bit_Assemble Bit_Copy Bit_Extract Bit_FillForm Bit_Modify Bit_ModifyAnnotation Bit_Print Bit_PrintHighQuality

Constructor Summary
public AbstractAccessPermissions(StandardSecurityHandler handler)

Method Summary
StandardSecurityHandl er getHandler()

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 void getEncryption() 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 AccessPermissionsFull boolean boolean boolean boolean boolean boolean boolean boolean getActive() mayAssemble() mayCopy() mayExtract() mayFillForm() mayModify() mayModifyAnnotation() mayPrint() 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 boolean boolean boolean boolean boolean boolean boolean mayAssemble() mayCopy() mayExtract() mayFillForm() mayModify() mayModifyAnnotation() mayPrint() 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 boolean boolean boolean boolean boolean boolean boolean mayAssemble() mayCopy() mayExtract() mayFillForm() mayModify() mayModifyAnnotation() mayPrint() 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 public static final public static final public static final public static final public static final public static final public static final public static final public static final CN_IDENTITY DK_CF DK_EFF DK_Filter DK_Length DK_StmF DK_StrF DK_SubFilter DK_V META

The meta class instance

Method Summary
COSDictionary getCryptFilterDict(COSName name)

Page 396 of 1521

de.intarsys.pdf.crypt.COSEncryption

COSName COSName COSName static COSEncryption COSName int

getCryptFilterNameFile() getCryptFilterNameStream() getCryptFilterNameString() getEncryptionIn(STXRefSection xRefSection) getFilter() getLength()

The length of the encryption key, in bits.
int void getVersion() 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 public public public COSSecurityException() COSSecurityException(String message) COSSecurityException(String message, Throwable cause) 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[] byte[] decrypt(COSObjectKey key, byte[] bytes) 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[] void getCryptKey() 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[] byte[] byte[] byte[] byte[] byte[] ISecurityHandler void decryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes) decryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes) decryptString(COSObjectKey key, byte[] bytes) encryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes) encryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes) encryptString(COSObjectKey key, byte[] bytes) getSecurityHandler() 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 IPasswordProvider static void get()

Return the unique factory.
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 ISecurityHandlerFacto ry static void get()

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[] byte[] void decrypt(COSObjectKey objectKey, byte[] bytes) encrypt(COSObjectKey objectKey, byte[] bytes) 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 public static final public static final public static final public static final DK_EncryptMetadata DK_O DK_P DK_R DK_U

Constructor Summary
public StandardSecurityHandler()

Method Summary
void byte[] byte[] authenticate(IPasswordProvider passwordProvider) decrypt(COSObjectKey key, byte[] bytes) encrypt(COSObjectKey key, byte[] bytes)

Page 419 of 1521

de.intarsys.pdf.crypt.StandardSecurityHandler

IAccessPermissions byte[] void

getAccessPermissions() getCryptKey() 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 public static final CN_Standard 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 public static final public static final DK_AuthEvent DK_Length 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 static ISystemSecurityHandle r COSEncryption ISecurityHandler void authenticate(IPasswordProvider passwordProvider) create(COSEncryption pEncryption)

getEncryption() getSecurityHandler() 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[] byte[] byte[] byte[] byte[] byte[] decryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes) decryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes) decryptString(COSObjectKey key, byte[] bytes) encryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes) encryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes) 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 byte[] byte[] byte[] byte[] byte[] byte[] authenticate(IPasswordProvider passwordProvider) decryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes) decryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes) decryptString(COSObjectKey key, byte[] bytes) encryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes) encryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes) 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 byte[] byte[] byte[] byte[] byte[] byte[] authenticate(IPasswordProvider passwordProvider) decryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes) decryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes) decryptString(COSObjectKey key, byte[] bytes) encryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes) encryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes) 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[] byte[] byte[] byte[] byte[] byte[] decryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes) decryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes) decryptString(COSObjectKey key, byte[] bytes) encryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes) encryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes) 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 public static final public static final public static final public static final CN_AESV2 CN_None CN_V2 DK_CFM DK_NAME

Method Summary
byte[] byte[] byte[] byte[] byte[] byte[] ICryptHandler decryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes) decryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes) decryptString(COSObjectKey key, byte[] bytes) encryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes) encryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes) encryptString(COSObjectKey key, byte[] bytes) 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 int COSObject String String int int int getByteCode(int unicode) getByteCode(String pName) getCosObject() getGlyphName(int codePoint) getName() getUnicode(int byteCode) getValidByteCode(int unicode) 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 public static final public static final public static final CN_MacRomanEncoding CN_StandardEncoding CN_WinAnsiEncoding 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 byte[] byte[] abstract int decode(byte[] bytes) encode(char[] value) encode(String value) 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 int abstract String getDifferenceGlyphName(int codePoint) getDifferenceUnicode(int codePoint) getGlyphName(int codePoint)

Get the character name for a given encoded byte code point.
abstract String static Encoding getName() 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 int COSObject String String int int int boolean getByteCode(int unicode) getByteCode(String name) getCosObject() getGlyphName(int codePoint) getName() getUnicode(int byteCode) getValidByteCode(int unicode) getValidByteCode(String name) 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 String getCosObject() 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 String getCosObject() 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 int COSObject String String int int int getByteCode(int unicode) getByteCode(String name) getCosObject() getGlyphName(int codePoint) getName() getUnicode(int byteValue) getValidByteCode(int unicode) 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 Encoding close() 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 void Encoding close() flush() 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 String getCosObject() 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 String getCosObject() 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 int COSObject String String int int int getByteCode(int unicode) getByteCode(String name) getCosObject() getGlyphName(int codePoint) getName() getUnicode(int byteCode) getValidByteCode(int unicode) 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 String getCosObject() 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 ILocator void void void getFdf() getLocator() save() save(ILocator locator) 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 public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final DK_Annots DK_Differences DK_EmbeddedFDFs DK_Encoding DK_F DK_Fields DK_ID DK_JavaScript DK_Pages DK_Status DK_Target META

The meta class instance

Page 523 of 1521

de.intarsys.pdf.fd.FDFDF

Method Summary
void void java.util.List String void void addField(FDField field) cosAddField(COSDictionary field) getFields() getFile() setFields(java.util.List fields) 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 public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final DK_A DK_AA DK_AP DK_APRef DK_ClrF DK_ClrFf DK_F DK_Ff DK_IF DK_Kids DK_Opt DK_RV DK_SetF

Page 528 of 1521

de.intarsys.pdf.fd.FDField

public static final public static final public static final public static final

DK_SetFf DK_T DK_V META

The meta class instance

Method Summary
void void COSObject void java.util.List String void void addField(FDField field) cosAddKid(COSDictionary field) cosGetValue() cosSetValue(COSObject value) getKids() getLocalName() setFields(java.util.List fields) 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 void boolean int int void long available() close() markSupported() read() read(byte[] data, int offset, int len) reset() 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 void int close() flush() getLineLength()

This will get the length of the line.
void setLineLength(int l)

Set the line length.
void void write(byte[] b, int off, int sz) 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 static boolean boolean int int void long available() isWhitespace(int i) markSupported() read() read(byte[] b, int off, int len) reset() 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 void close() 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 public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final DK_BlackIs1 DK_Columns DK_DamagedRowsBeforeError DK_EncodedByteAlign DK_EndOfBlock DK_EndOfLine DK_H DK_Height DK_K DK_Rows DK_W 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 public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final CN_Filter_A85 CN_Filter_AHx CN_Filter_ASCII85Decode CN_Filter_ASCIIHexDecode CN_Filter_CCF CN_Filter_CCITTFaxDecode CN_Filter_Crypt CN_Filter_DCT CN_Filter_DCTDecode CN_Filter_Fl CN_Filter_FlateDecode CN_Filter_JBIG2Decode CN_Filter_JPXDecode CN_Filter_LZW

Page 552 of 1521

de.intarsys.pdf.filter.Filter

public static final public static final public static final

CN_Filter_LZWDecode CN_Filter_RL CN_Filter_RunLengthDecode

Constructor Summary
public Filter(COSDictionary paramOptions)

Method Summary
byte[] byte[] boolean int COSDictionary COSStream void decode(byte[] source, int offset, int length) encode(byte[] source, int offset, int length) getOptionFieldBoolean(COSName name, boolean defaultValue) getOptionFieldInt(COSName name, int defaultValue) getOptions() getStream() 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 static void get() 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[] byte[] COSStream void decode(byte[] source, int offset, int length) encode(byte[] source, int offset, int length) getStream() 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 void getNextCode(byte[] data) 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[] int decode(byte[] source) 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) PDFDeflaterOutputStream(java.io.OutputStream out, java.util.zip.Deflater def, int size)

public

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 public static final public static final public static final public static final DK_BitsPerComponent DK_Colors DK_Columns DK_Predictor 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 int byte[] int int int int int computeResultRowSize() computeSourceRowSize() decode(byte[] source) getBitsPerComponent() getColors() getColumns() getResultRowSize() 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 IPredictionFactory static void get() 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 void decode1D(byte[] buffer, byte[] compData, int startX, int height) decode2D(byte[] buffer, byte[] compData, int startX, int height, long tiffT4Options) decodeT6(byte[] buffer, byte[] compData, int startX, int height, long tiffT6Options)

void

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 int COSObject String String int int int getByteCode(int unicode) getByteCode(String name) getCosObject() getGlyphName(int codePoint) getName() getUnicode(int byteCode) getValidByteCode(int unicode) 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 int getByteCode(int unicode) 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 public static final public static final public static final public static final public static final DK_CIDSystemInfo DK_DW DK_DW2 DK_W DK_W2 META

The meta class instance

Method Summary
CIDSystemInfo getCIDSystemInfo()

Page 600 of 1521

de.intarsys.pdf.font.CIDFont

CIDWidthMap String String FontStyle abstract int int float int

getCIDWidthMap() getFontFamilyName() getFontName() getFontStyle() getGlyphIndex(CID cid) getGlyphWidth(int cidValue) getUnderlinePosition() 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 CID getGlyphIndex(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 public static final DK_CIDToGIDMap META

The meta class instance

Constructor Summary
public CIDFontType2(COSObject object)

Method Summary
COSObject int CID cosGetCIDToGIDMap() getGlyphIndex(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 public CIDSelectorCID(int value) CIDSelectorCID(byte[] bytes, int offset, int length)

Method Summary
int int getLength() 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 int getLength() 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 COSName int getLength() getName() 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 public static final public static final public static final DK_Ordering DK_Registry DK_Supplement 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 public static final CN_Identity META

The meta class instance

Method Summary
abstract int static CIDToGIDMap getGlyphIndex(CID cid) 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 int createMap(COSArray array) 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 int int getStart() getStop() 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 abstract CID static int static int getNextCID(byte[] bytes, int offset) lookup(byte[] value) toInt(byte[] bytes) 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[] CID getDestination() 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 CID getDestination() 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 CID getDestination() 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 public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final CMO_beginbfchar CMO_beginbfrange CMO_begincidchar CMO_begincidrange CMO_begincmap CMO_begincodespacerange CMO_beginnotdefchar CMO_beginnotdefrange CMO_endbfchar CMO_endbfrange CMO_endcidchar CMO_endcidrange CMO_endcmap CMO_endcodespacerange CMO_endnotdefchar CMO_endnotdefrange 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 byte[] byte[] contains(byte[] value) getEnd() 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 int getEnd() 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 public static final DK_BaseEncoding 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 int COSObject String getByteCode(int unicode) getByteCode(String name) getCosObject() getDifferenceGlyphName(int codePoint)

Page 643 of 1521

de.intarsys.pdf.font.DifferenceEncoding

int String String int int int boolean

getDifferenceUnicode(int codePoint) getGlyphName(int codePoint) getName() getUnicode(int byteCode) getValidByteCode(int unicode) getValidByteCode(String name) 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 boolean boolean boolean boolean boolean boolean boolean boolean void void void void void void void void void isAllCap() isFixedPitch() isForceBold() isItalic() isNonsymbolic() isScript() isSerif() isSmallCap() isSymbolic() setAllCap(boolean flag) setFixedPitch(boolean flag) setForceBold(boolean flag) setItalic(boolean flag) setNonsymbolic(boolean flag) setScript(boolean flag) setSerif(boolean flag) setSmallCap(boolean flag) 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 CID getNextCID(byte[] bytes, int offset) 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 public static final public static final CN_Identity_H CN_Identity_V 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 public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final CN_Subtype_CIDFontType0 CN_Subtype_CIDFontType2 CN_Subtype_MMType1 CN_Subtype_TrueType CN_Subtype_Type0 CN_Subtype_Type1 CN_Subtype_Type3 CN_Type_Font DK_BaseFont DK_Encoding DK_FirstChar

Page 660 of 1521

de.intarsys.pdf.font.PDFont

public static final public static final public static final public static final public static final public static final

DK_FontDescriptor DK_LastChar DK_Name DK_ToUnicode DK_Widths META

The meta class instance

Method Summary
void COSName Encoding compress() getBaseFont() getEncoding()

The encoding of the glyphs in the font
int getFirstChar()

The first codepoint defined in the font.
PDFontDescriptor static String static String getFontDescriptor() getFontFamilyName(String name) 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[] int int getGlyphWidths() getLastChar() 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 abstract CID CMap getMissingWidth() getNextCID(byte[] bytes, int offset) getToUnicode()

Page 661 of 1521

de.intarsys.pdf.font.PDFont

abstract float abstract int int boolean boolean

getUnderlinePosition() getUnderlineThickness() getUnicode(int byteCode) isCharUsed(int c) 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 void void setBaseFont(String name) setCharUsed(int c) setEncoding(Encoding newFontEncoding)

set an encoding for the font
void String setFontDescriptor(PDFontDescriptor descriptor) 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 String FontStyle CID float int getFontFamilyName() getFontName() getFontStyle() getNextCID(byte[] bytes, int offset) getUnderlinePosition() 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 public static final CN_Type_FontDescriptor 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 abstract int getFlags() 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[] byte[] byte[] abstract String getFontFile() getFontFile2() getFontFile3() 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 boolean boolean boolean boolean boolean boolean boolean boolean void isAllCap() isFixedPitch() isForceBold() isItalic() isNonsymbolic() isScript() isSerif() isSmallCap() isSymbolic() setAllCap(boolean flag)

Page 674 of 1521

de.intarsys.pdf.font.PDFontDescriptor

void abstract void void void void void void void void

setFixedPitch(boolean flag) setFlagsValue(int value) setForceBold(boolean flag) setItalic(boolean flag) setNonsymbolic(boolean flag) setScript(boolean flag) setSerif(boolean flag) setSmallCap(boolean flag) 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 public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final DK_Ascent DK_AvgWidth DK_CapHeight DK_Descent DK_Flags DK_FontBBox DK_FontFamily DK_FontFile DK_FontFile2 DK_FontFile3 DK_FontName

Page 682 of 1521

de.intarsys.pdf.font.PDFontDescriptorEmbedded

public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final

DK_ItalicAngle DK_Leading DK_Length1 DK_Length2 DK_Length3 DK_MaxWidth DK_MissingWidth DK_StemH DK_StemV DK_XHeight META

The meta class instance

Method Summary
float float float float int CDSRectangle String byte[] byte[] byte[] String float getAscent() getAvgWidth() getCapHeight() getDescent() getFlagsValue() getFontBB() getFontFamily() getFontFile() getFontFile2() getFontFile3() getFontName() getItalicAngle()

Page 683 of 1521

de.intarsys.pdf.font.PDFontDescriptorEmbedded

int int int int int float void void void void void void void void void void

getLeading() getMaxWidth() getMissingWidth() getStemH() getStemV() getXHeight() removeFontFile2() setAscent(int value) setAvgWidth(int value) setCapHeight(int value) setDescent(int value) setFlags(int value) setFlagsValue(int value) setFontBB(CDSRectangle rect) setFontFamily(String value) setFontFile(byte[] data)

This is the type 1 fontfile stream It will try to parse the input, which must be a pfb file.
void void void void void void void void setFontFile2(byte[] data) setFontFile3(byte[] data) setFontName(String value) setItalicAngle(float value) setLeading(int value) setMaxWidth(int value) setMissingWidth(int value) setStemH(int value)

Page 684 of 1521

de.intarsys.pdf.font.PDFontDescriptorEmbedded

void void

setStemV(int value) 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 float float float int PDFontType1 CDSRectangle String String getAscent() getAvgWidth() getCapHeight() getDescent() getFlagsValue() getFont() getFontBB() getFontFamily() getFontName()

Page 693 of 1521

de.intarsys.pdf.font.PDFontDescriptorType1

float int int int int int float boolean boolean void

getItalicAngle() getLeading() getMaxWidth() getMissingWidth() getStemH() getStemV() getXHeight() isNonsymbolic() isSymbolic() 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 static PDFontTrueType compress() createNew(TTFont ttFont)

create a TrueType font object to be used in the pdf document
void String static String String FontStyle static FontStyle embedFontProgramm() getFontFamilyName() getFontFamilyName(String name) getFontName() getFontStyle() getFontStyle(String name)

Page 704 of 1521

de.intarsys.pdf.font.PDFontTrueType

CID TTFont int

getNextCID(byte[] bytes, int offset) getTTFont() getTTGlyphWidth(int codePoint)

returns the glyph width from the TT font with units and cmap to glyph indexing resolved
float int void void void getUnderlinePosition() getUnderlineThickness() initializeFromScratchFontDescriptor() removeFontProgramm() 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 public static final DK_DescendantFonts META

The meta class instance

Constructor Summary
public PDFontType0(COSObject object)

Method Summary
CMap CIDFont PDFontDescriptor String String FontStyle int getCMap() getDescendantFont() getFontDescriptor() getFontFamilyName() getFontName() getFontStyle() getGlyphIndex(CID cid)

Page 709 of 1521

de.intarsys.pdf.font.PDFontType0

int CID float int

getGlyphWidth(int codePoint) getNextCID(byte[] bytes, int offset) getUnderlinePosition() 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 public static public static public static public static public static public static public static public static public static FONT_Courier FONT_Courier_Bold FONT_Courier_BoldOblique FONT_Courier_Oblique FONT_Helvetica FONT_Helvetica_Bold FONT_Helvetica_BoldOblique FONT_Helvetica_Oblique FONT_Symbol FONT_Times_Bold

Page 713 of 1521

de.intarsys.pdf.font.PDFontType1

public static public static public static public static public static final

FONT_Times_BoldItalic FONT_Times_Italic FONT_Times_Roman FONT_ZapfDingbats FontAlternatives

Map of known alternative names for the builtin fonts
public static final public static final FONTS_STANDARD 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 AFM String String FontStyle CID float int void boolean void embedFontProgram(java.io.InputStream is) getAfm() getFontFamilyName() getFontName() getFontStyle() getNextCID(byte[] bytes, int offset) getUnderlinePosition() getUnderlineThickness() initializeFromScratchFontDescriptor() isStandardFont() 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 public static final public static final public static final public static final public static final DK_CharProcs DK_FontBBox DK_FontMatrix DK_Resources DK_ToUnicode META

The meta class instance

Constructor Summary
public PDFontType3(COSObject object)

Method Summary
COSDictionary COSDictionary String cosGetCharProcs() cosSetCharProcs(COSDictionary newDict) getFontFamilyName()

Page 720 of 1521

de.intarsys.pdf.font.PDFontType3

CDSMatrix String FontStyle CID float int boolean boolean void String

getFontMatrix() getFontName() getFontStyle() getNextCID(byte[] bytes, int offset) getUnderlinePosition() getUnderlineThickness() isEmbedded() isSubset() setMatrix(CDSMatrix fontMatrix) 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 public static final public static final public static final public static final DK_CIDSystemInfo DK_CMapName DK_UseCMap DK_WMode META

The meta class instance

Method Summary
CID CID getNextCID(byte[] bytes, int offset) 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 String FontStyle Encoding getEncoding() getFontFamilyName() getFontStyle() 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 PDFont PDFont PDFont void getBoldFlavor(PDFont font) getFont(IFontQuery query) getItalicFlavor(PDFont font) getRegularFlavor(PDFont font) 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 boolean COSObject getDoc() isTokenXRefAt(IRandomAccess input, int offset) 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 public public public COSLoadError(String message) COSLoadError(String message, Throwable cause) COSLoadError() 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 public public public COSLoadException(String message) COSLoadException(String message, Throwable cause) COSLoadException() COSLoadException(Throwable cause)

Method Summary
Object void getHint() 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 public public public COSLoadWarning(String message) COSLoadWarning(String message, Throwable cause) COSLoadWarning() 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 void error(COSLoadError error) 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 public static public static public static public static public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final CHAR_BS CHAR_CR CHAR_FF CHAR_HT CHAR_LF TOKEN_endobj TOKEN_endstream TOKEN_EOF TOKEN_false TOKEN_FDFHEADER TOKEN_ndstream TOKEN_null TOKEN_obj TOKEN_PDFHEADER TOKEN_R TOKEN_s_tream TOKEN_startxref

Page 758 of 1521

de.intarsys.pdf.parser.PDFParser

public static final public static final public static final public static final

TOKEN_stream TOKEN_trailer TOKEN_true TOKEN_xref

Constructor Summary
public PDFParser()

Method Summary
IPDFParserExceptionHa ndler void getExceptionHandler() 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 static COSObject setExceptionHandler(IPDFParserExceptionHandler exceptionHandler) 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 boolean boolean boolean boolean boolean boolean boolean boolean boolean boolean boolean boolean boolean boolean boolean boolean void void void void void void void

getValue() isComb() isCombo() isCommitOnSelChange() isDoNotScroll() isEdit() isFileSelect() isMultiline() isMultiSelect() isNoExport() isNoToggleOff() isPassword() isPushbutton() isRadio() isRadiosInUnison() isReadOnly() isRequired() setComb(boolean f) setCombo(boolean f) setCommitOnSelChange(boolean f) setDoNotScroll(boolean f) setEdit(boolean edit) setFileSelect(boolean f) setMultiline(boolean f)

Page 774 of 1521

de.intarsys.pdf.pd.AcroFormFieldFlags

void void void void void void void void

setMultiSelect(boolean multiSelect) setNoExport(boolean f) setNoToggleToOff(boolean noToggleToOff) setPassword(boolean f) setPushbutton(boolean f) setRadio(boolean f) setReadOnly(boolean f) 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 public static Bit_AppendOnly Bit_SignatureExists

Constructor Summary
public AcroFormSigFlags(PDAcroForm form)

Method Summary
boolean boolean void isAppendOnly() isSignatureExists() 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 boolean boolean boolean boolean boolean boolean boolean boolean boolean void void void void void void isHidden() isInvisible() isLocked() isLockedContents() isNoRotate() isNoView() isNoZoom() isPrint() isReadOnly() isToggleNoView() setHidden(boolean f) setInvisible(boolean f) setLocked(boolean f) setLockedContents(boolean f) setNoRotate(boolean f) setNoView(boolean f)

Page 786 of 1521

de.intarsys.pdf.pd.AnnotationFlags

void void void void

setNoZoom(boolean f) setPrint(boolean f) setReadOnly(boolean f) 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 float[] getFont() getFontColorValues()

parse the requested font color from the default appearance string
COSName float PDAcroFormNode void void void void getFontName() getFontSize() getNode() setFont(PDFont font) setFontColorValues(float[] color) setFontName(COSName pFontName) 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 void void void void setNonStrokeColorSpace(COSName name, PDColorSpace colorSpace) setNonStrokeColorValues(float[] values) setStrokeColorSpace(COSName name, PDColorSpace colorSpace) setStrokeColorValues(float[] values) 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 java.util.Set void getAdditionalActions() getSupportedTriggerEvents() 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 void getResources() 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 boolean void void isBold() isItalic() setBold(boolean flag) 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 COSObject addField(PDAcroFormField field) 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 boolean getGenericChildren() getNeedAppearances() true if /NeedAppearances is set for this form. AcroFormSigFlags getSigFlags()

The flags associated with an AcroForm.
void boolean invalidateCaches() isSignatureExists() true if this form has a signature field. boolean isSigned() true if this form has a signed signature field. boolean void removeField(PDAcroFormField field) setDefaultResources(PDResources newResources)

Assign the default resource dictionary to be used with the form.
void void setGenericParent(PDObject parent) 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 int addField(PDAcroFormField field) 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 PDAdditionalActions String getAcroForm() getAdditionalActions() 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 PDObject java.util.List getGenericChildren() getGenericParent() 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 String getSupportedTriggerEvents() getValueString()

The value from cosGetValue() converted to a String
void boolean invalidateCaches() 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 void removeField(PDAcroFormField field) 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. 2. 3. 4. returns its own /DV entry, if it is not null returns the /DV entry of its logical root, if it is not null returns the first /DV entry found of the logical roots kids 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. 2. 3. 4. returns its own /V entry, if it is not null returns the /V entry of its logical root, if it is not null returns the first /V entry found of the logical roots kids 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 abstract boolean invalidateCaches() 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 public static final public static final public static final CN_Type_Action DK_Next DK_S 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 public static final CN_ActionType_GoTo3DView CN_ActionType_GoToE

all currently undefined or not implemented action types
public static final public static final public static final public static final public static final public static final public static final public static final public static final CN_ActionType_Hide CN_ActionType_ImportData CN_ActionType_Movie CN_ActionType_no_op CN_ActionType_Rendition CN_ActionType_set_state CN_ActionType_SetOCGState CN_ActionType_Sound CN_ActionType_Thread

Page 836 of 1521

de.intarsys.pdf.pd.PDActionAny

public static final public static final

CN_ActionType_Trans META

The meta class instance

Method Summary
COSName static PDActionAny cosGetExpectedActionType() 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 public static final public static final CN_ActionType_GoTo DK_D META

The meta class instance

Method Summary
COSName PDDestination void cosGetExpectedActionType() getDestination() 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 public static final public static final public static final public static final CN_ActionType_GoToR DK_D DK_F DK_NewWindow META

The meta class instance

Method Summary
COSName PDDestination java.io.File void boolean cosGetExpectedActionType() getDestination() getFile() invalidateCaches() 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 public static final public static final CN_ActionType_JavaScript DK_JS META

The meta class instance

Method Summary
COSName static PDActionJavaScript static String String void cosGetExpectedActionType() createNew(String script)

decodeSource(COSObject cosSource) getJavaScript() 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 public static final public static final public static final CN_ActionType_Launch DK_F DK_NewWindow META

The meta class instance

Method Summary
COSName java.io.File boolean cosGetExpectedActionType() getFile() 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 public static final public static final public static final public static final public static final public static final CN_ActionType_Named CN_Name_FirstPage CN_Name_LastPage CN_Name_NextPage CN_Name_PrevPage DK_Name META

The meta class instance

Method Summary
COSName COSName COSName cosGetExpectedActionType() cosGetName() 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 public static final public static final public static final CN_ActionType_ResetForm DK_Fields DK_Flags META

The meta class instance

Method Summary
COSName static PDActionResetForm java.util.List cosGetExpectedActionType() createNew()

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 public static final public static final public static final public static final CN_ActionType_SubmitForm DK_F DK_Fields DK_Flags META

The meta class instance

Method Summary
COSName static PDActionSubmitForm java.util.List cosGetExpectedActionType() createNew(java.net.URL url)

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 boolean boolean boolean boolean boolean boolean boolean boolean boolean boolean boolean boolean boolean void void void void void void void void void void

isCanonicalFormat() isEmbedForm() isExclFKey() isExclNonUserAnnots() isExportFormat() isGetMethod() isInclude() isIncludeAnnotations() isIncludeAppendSaves() isIncludeNoValueFields() isNotDEFINED() isSubmitCoordinates() isSubmitPDF() isXFDF() setCanonicalFormat(boolean flag) setEmbedForm(boolean flag) setExclFKey(boolean flag) setExclNonUserAnnots(boolean flag) setExportFormat(boolean flag) setGetMethod(boolean flag) setInclude(boolean flag) setIncludeAnnotations(boolean flag) setIncludeAppendSaves(boolean flag) setIncludeNoValueFields(boolean flag)

Page 861 of 1521

de.intarsys.pdf.pd.PDActionSubmitForm

void void void void void

setNotDEFINED(boolean flag) setSubmitCoordinates(boolean flag) setSubmitPDF(boolean flag) setUrl(java.net.URL url) 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 public static final public static final public static final CN_ActionType_URI DK_IsMap DK_URI META

The meta class instance

Method Summary
COSName static PDActionURI String boolean void void cosGetExpectedActionType() createNew(String uri) getURI() isMap() setMap(boolean map) 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 public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final CN_T_Mouse_Down CN_trigger_Bl CN_trigger_C CN_trigger_D CN_trigger_DC CN_trigger_DP CN_trigger_DS CN_trigger_E CN_trigger_F CN_trigger_Fo CN_trigger_K CN_trigger_O

Page 872 of 1521

de.intarsys.pdf.pd.PDAdditionalActions

public static final public static final public static final public static final public static final public static final public static final

CN_trigger_PC CN_trigger_PI CN_trigger_PO CN_trigger_PV CN_trigger_U CN_trigger_V CN_trigger_WC

WC is the same as DC - not specified, but used by acrobat
public static final public static final public static final public static final CN_trigger_WP CN_trigger_WS CN_trigger_X META

The meta class instance

Method Summary
void void PDAction static String static String void addAction(COSName trigger, PDAction action) clearAction(COSName trigger) getAction(COSName trigger) getEventName(COSName reason) getEventType(COSName reason) 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 public static final DK_Opt META

The meta class instance

Method Summary
COSName COSObject java.util.Set cosGetExpectedFieldType() cosSetValue(COSObject state) 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 void void

isTypeBtn() reset() 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 public static final public static final public static final DK_I DK_Opt DK_TI META

The meta class instance

Method Summary
COSName java.util.List cosGetExpectedFieldType() 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 void isTypeCh() setOptions(java.util.Map options)

Assign the currently active options.
void setOptions(String[] names, String[] values)

Assign the currently active options.
void void setValueString(String value) 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 public static final public static final DK_Lock DK_SV META

The meta class instance

Method Summary
void COSName COSObject PDSignature clearSignature() cosGetExpectedFieldType() cosSetValue(COSObject newValue) getSignature()

The associated PDSignature if available.
void boolean invalidateCaches() isSigned() true if this field is already signed.

Page 891 of 1521

de.intarsys.pdf.pd.PDAFSignatureField

boolean void

isTypeSig() 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 String String boolean void void void cosGetExpectedFieldType() getDefaultValueString() getValueString() isTypeTx() reset() setDefaultValue(String value) 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 public static final public static final public static final public static final public static final public static final public static final public static final CN_Type_Annot DK_A DK_AP DK_AS DK_Border DK_BS DK_C DK_CA 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 public static final public static final public static final public static final public static final public static final public static final DK_IC DK_M DK_NM DK_OC DK_P DK_Rect DK_StructParent 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 PDAppearance getAdditionalActions() 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 void boolean getSupportedTriggerEvents() invalidateCaches() 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 void setAdditionalActions(PDAdditionalActions actions) 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 void toString() 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[] static float[] static float[] static float[] static PDAnnotation getBorderColor(PDWidgetAnnotation annotation) getBorderColorNegative(PDWidgetAnnotation annotation) getFillColor(PDWidgetAnnotation annotation) getFillColorNegative(PDWidgetAnnotation annotation) 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 static PDAnnotation getPage(PDAnnotation annotation) 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 public static final public static final public static final DK_D DK_N DK_R META

The meta class instance

Method Summary
PDForm getAppearance(COSName key, COSName state)

The PDForm for state state.
PDForm PDForm PDForm getDownAppearance(COSName state) getNormalAppearance(COSName state) getRolloverAppearance(COSName state)

Page 921 of 1521

de.intarsys.pdf.pd.PDAppearance

boolean

isDefined() true if this appearance dictionary has valid contents.

void void void

setDownAppearance(COSName state, PDForm form) setNormalAppearance(COSName state, PDForm form) 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 public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final DK_AC DK_BC DK_BG DK_CA DK_I DK_IF DK_IX DK_R DK_RC DK_RI 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 COSStream COSStream COSStream COSStream COSStream float[] float[] String PDIconFit String String int cosGetDownIcon() cosGetNormalIcon() cosGetRolloverIcon() cosSetDownIcon(COSStream newDownIcon) cosSetNormalIcon(COSStream newNormalIcon) cosSetRolloverIcon(COSStream newRolloverIcon) getBackgroundColor() getBorderColor() getDownCaption() getIconFit() getNormalCaption() getRolloverCaption() getRotation()

Page 926 of 1521

de.intarsys.pdf.pd.PDAppearanceCharacteristics

int void void void void void void void void

getTextPosition() setBackgroundColor(float[] newBackgroundColor) setBorderColor(float[] newBorderColor) setDownCaption(String newDownCaption) setIconFit(PDIconFit newIconFit) setNormalCaption(String newNormalCaption) setRolloverCaption(String newRolloverCaption) setRotation(int newRotation) 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 public static final public static final DK_LastModified DK_Private 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[] float[] PDFunction int getCoords() getDomain() getFunction() 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[] COSName float void void void getDashArray() getStyle() getWidth() setDashArray(int[] newDashArray) setStyle(COSName newStyle) 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 public static final public static final public static final public static final public static final public static final public static final public static final DK_Date DK_Name DK_NonEFontNoWarn DK_OS DK_PreRelease DK_R DK_TrustedMode DK_V META

The meta class instance

Method Summary
CDSDate String getDate() getName()

Page 947 of 1521

de.intarsys.pdf.pd.PDBuildData

String int int boolean boolean boolean void void void void void void void void

getOS() getR() getV() isNonEFontNoWarn() isPreRelease() isTrustedMode() setDate(CDSDate date) setName(String name) setNonEFontNoWarn(boolean nonEFontNoWarn) setOS(String osString) setPreRelease(boolean preRelease) setR(int moduleRevision) setTrustedMode(boolean trustedMode) 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 public static final public static final public static final DK_App DK_Filter DK_PubSec META

The meta class instance

Method Summary
PDBuildData PDBuildData PDBuildData void void void getApp() getFilter() getPubSec() setApp(PDBuildData appData) setFilter(PDBuildData filterData) 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 public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final CN_CS_CalGray CN_CS_CalRGB CN_CS_CMYK CN_CS_DeviceCMYK CN_CS_DeviceGray CN_CS_DeviceN CN_CS_DeviceRGB CN_CS_G CN_CS_I CN_CS_ICCBased CN_CS_Indexed

Page 957 of 1521

de.intarsys.pdf.pd.PDColorSpace

public static final public static final public static final public static final public static final

CN_CS_Lab CN_CS_Pattern CN_CS_RGB CN_CS_Separation META

The meta class instance

Method Summary
Object static PDColorSpace static PDColorSpace getCachedColorSpace() getNamed(COSName name) getSingleton(COSName name)

return the singleton color space instance corresponding to the given name
void void invalidateCaches() 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 PDFunction getAlternate() 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 public static final public static final DK_Alternate DK_N META

The meta class instance

Method Summary
COSStream PDColorSpace cosGetProfileStream() 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 byte[] int getBaseColorSpace() getColorBytes() 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 public static final public static final public static final DK_BlackPoint DK_Range DK_WhitePoint 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 String PDFunction getAlternate() getName() 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 PDExplicitDestination getResolvedDestination(PDDocument doc)

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 public static final public static final public static final public static final CATALOG_ACTION_TRIGGERS CN_Perms_DocMDP CN_Perms_UR DK_OpenAction DK_Perms

Method Summary
void void addAction(PDAction action) 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 static PDDocument createFromLocator(ILocator locator) 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 java.util.List PDApplicationData Object String COSCatalog getAdditionalActions() getAnnotations() getApplicationData(String name) getAttribute(Object key) getAuthor() getCatalog()

lookup the catalog dictionary in a document
CDSDate String String getCreationDate() getCreationDateString() getCreator()

Page 1003 of 1521

de.intarsys.pdf.pd.PDDocument

COSInfoDict

getInfoDict()

Get the info dictionary containing metadata.
String ILocator String CDSDate String String PDAction PDOutline PDOutputIntent java.util.List PDPageTree getKeywords() getLocator() getMetadata() getModDate() getModDateString() getName() getOpenAction() getOutline() getOutputIntent(COSName oiName) getOutputIntents() getPageTree()

return the documents root page tree
PDSignature getPermissions(COSName key)

Shortcut to a signature dictionary in the document permissions dictionary.
String String java.util.Set String String EnumWriteMode getProducer() getSubject() getSupportedTriggerEvents() getTitle() getTrapped() 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 boolean isDirty() 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 boolean

isReadOnly() isSigned() true if the document contains digital signatures.

COSObject void Object void void void void void

lookupDestination(String name) removeApplicationData(String name) removeAttribute(Object key) restore(ILocator locator) save() save(ILocator locator) save(ILocator locator, java.util.Map options) setAcroForm(PDAcroForm form)

Set AcroForm in PDF Document.
void void Object void void void void void setAdditionalActions(PDAdditionalActions actions) setApplicationData(String name, PDApplicationData data) setAttribute(Object key, Object o) setAuthor(String value) setCreationDateString(String value) setCreator(String value) setDocumentInfo(COSName name, String value) setInfoDict(COSInfoDict infoDict)

Set the info dictionary containing metadata.
void void void void setKeywords(String value) setModDateString(String value) setName(String name) setOpenAction(PDAction newAction)

Page 1005 of 1521

de.intarsys.pdf.pd.PDDocument

void void void void void void void void

setOutline(PDOutline outline) setPageTree(PDPageTree newTree) setPermissions(COSName name, PDSignature signature) setProducer(String value) setSubject(String value) setTitle(String value) setTrapped(String value) 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 public static final CN_Type_EmbeddedFile META

The meta class instance

Method Summary
COSDictionary byte[] cosGetDict() 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 public static final public static final public static final public static final public static final public static final public static final public static final CN_DISPLAY_MODE_Fit CN_DISPLAY_MODE_FitB CN_DISPLAY_MODE_FitBH CN_DISPLAY_MODE_FitBV CN_DISPLAY_MODE_FitH CN_DISPLAY_MODE_FitR CN_DISPLAY_MODE_FitV CN_DISPLAY_MODE_XYZ 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[] PDExplicitDestination void void void void getParameters() getResolvedDestination(PDDocument doc) setDisplayMode(COSName mode) setPage(PDPage page) setParameters(double[] parameters) 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 public static final public static final CN_BM_Multiply CN_BM_Normal CN_Type_ExtGState

The type name
public static final public static final public static final public static final public static final public static final public static final public static final DK_AIS DK_BG DK_BG2 DK_BM DK_ca DK_CA DK_D DK_FL

Page 1026 of 1521

de.intarsys.pdf.pd.PDExtGState

public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final

DK_Font DK_HT DK_LC DK_LJ DK_LW DK_ML DK_op DK_OP DK_OPM DK_RI DK_SA DK_SM DK_SMask DK_TK DK_TR DK_TR2 DK_UCR DK_UCR2 META

The meta class instance

Method Summary
COSName float float boolean getBlendMode() getNonStrokingAlphaConstant() getStrokingAlphaConstant() isBlendModeMultiply()

Page 1027 of 1521

de.intarsys.pdf.pd.PDExtGState

boolean void void void void void

isBlendModeNormal() setBlendMode(COSName blendMode) setBlendModeMultiply() setBlendModeNormal() setNonStrokingAlphaConstant(float alpha) 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 public static final public static final public static final public static final public static final public static final public static final CN_Name_Graph CN_Name_Paperclip CN_Name_PushPin CN_Name_Tag CN_Subtype_FileAttachment DK_FS DK_Name META

The meta class instance

Constructor Summary
public PDFileAttachmentAnnotation(COSObject object)

Method Summary

Page 1034 of 1521

de.intarsys.pdf.pd.PDFileAttachmentAnnotation

PDFileSpecification COSName void void

getFileSpecification() getIconName() setFileSpecification(PDFileSpecification fileSpec) 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 public static final public static final CN_Type_Alt_Filespec CN_Type_Filespec 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 String COSName void void void void getFile() getFileSpecificationString(COSName flavor) getFileSystem() setEmbeddedFile(COSName flavor, PDEmbeddedFile embeddedFile) setFile(String file) setFileSpecificationString(COSName flavor, String spec) 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 PDFileSpecificationUR L java.net.URL void createNew(java.net.URL url)

getURL() 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 public static final public static final public static final public static final public static final public static final public static final public static final public static final CN_Subtype_Form DK_BBox DK_FormType DK_Group DK_Matrix DK_OPI DK_PieceInfo DK_PS DK_Subtype2 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 CDSRectangle getApplicationData(COSName name) getBoundingBox()

The bounding box of the receiver form.
CSContent CDSMatrix getContentStream() getMatrix()

The form matrix of the receiver form.
PDResources getResources()

The resource dictionary of the receiver form.
java.awt.geom.Rectang le2D getTransformedBBox()

Compute a box according to the PDF specification that completely encompasses the transformed bounding box of the form.
invalidateCaches() isForm() setApplicationData(COSName name, PDApplicationData data) setBoundingBox(CDSRectangle rect)

void boolean void void

Set the bounding box of the receiver.
void void setContentStream(CSContent content) 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 public static final DK_Domain DK_FunctionType

Common names
public static final public static final DK_Range META

The meta class instance

Method Summary
COSArray abstract float[] float float int abstract int cosGetDomain() evaluate(float[] values) getDomainMax(int dimension) getDomainMin(int dimension) getInputSize() getOutputSize()

Page 1056 of 1521

de.intarsys.pdf.pd.PDFunction

COSArray float float

getRange() getRangeMax(int dimension) 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[] PDFunction float[] int getDomain() getFunction() getMatrix() 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 public static final public static final public static final public static final DK_A DK_FB DK_S DK_SW META

The meta class instance

Page 1063 of 1521

de.intarsys.pdf.pd.PDIconFit

Method Summary
float[] COSName COSName boolean void void void void getAlignment() getScalingCircumstances() getScalingMode() isIgnoreBorderWidth() setAlignment(float[] align) setIgnoreBorderWidth(boolean ignore) setScalingCircumstances(COSName flag) 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 public static final public static final public static final public static final public static final CN_Subtype_Image DK_Alternates DK_BitsPerComponent DK_BPC DK_ColorSpace DK_CS

Page 1068 of 1521

de.intarsys.pdf.pd.PDImage

public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final public static final

DK_D DK_Decode DK_DecodeParms DK_DP DK_H DK_Height DK_I DK_ID DK_IM DK_ImageMask DK_Intent DK_Interpolate DK_Mask DK_Metadata DK_Name DK_OC DK_OPI DK_SMask DK_SMaskInData DK_StructParent DK_W DK_Width META

The meta class instance

Method Summary

Page 1069 of 1521

de.intarsys.pdf.pd.PDImage

COSStream COSObject COSObject COSArray COSName int

cosExtractJPEGStream() cosGetColorSpace() cosGetMask() cosSetColorSpace(COSArray colorspace) cosSetColorSpace(COSName colorspace) getBitsPerComponent()

The number of bits per component.
byte[][] PDColorSpace getColorKeyMask(int colors) getColorSpace()

The color space used by the image.
int[] int getDecode() getHeight()

get the height of the raster image
PDImage PDXObject int getMaskImage() getSMask() getWidth()

get the width of the raster image
boolean void boolean boolean boolean void void hasTransparency() invalidateCaches() isImage() isImageMask() isInterpolate() setBitsPerComponent(int bits) setColorSpace(PDColorSpace paramCachedColorSpace)

In inline images the color space may reference the resource dictionary.
void void setDecode(int[] decode) setHeight(int height)

set the height of the raster image
void setImageMask(boolean flag)

Page 1070 of 1521

de.intarsys.pdf.pd.PDImage

void void void

setMask(PDXObject object) setSMask(PDXObject object) 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 public static final public static final public static final DK_C0 DK_C1 DK_N META

The meta class instance

Method Summary
float[] float[] float[] float int evaluate(float[] values) getC0() getC1() getN() 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 public static final public static final public static final public static final public static final public static final public static final public static final public static final CN_H_I CN_H_N CN_H_O CN_H_P CN_Subtype_Link DK_Dest DK_H DK_PA DK_QuadPoints META

The meta class instance

Method Summary

Page 1084 of 1521

de.intarsys.pdf.pd.PDLinkAnnotation

PDDestination COSName String void void

getDestination() getHighlightingMode() getSubtypeLabel() setDestination(PDDestination destination) 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 public static final public static final public static final public static final public static final public static final public static final public static final public static final CN_Subtype_Circle CN_Subtype_Ink CN_Subtype_Line CN_Subtype_Polygon CN_Subtype_PolyLine CN_Subtype_Square DK_CA DK_CreationDate DK_IC DK_InkList

Page 1088 of 1521

de.intarsys.pdf.pd.PDMarkupAnnotation

public static final public static final public static final public static final public static final public static final public static final public static final

DK_IRT DK_L DK_Popup DK_RC DK_Subj DK_T DK_Vertices META

The meta class instance

Method Summary
COSObject CDSDate float[] PDAnnotation double PDAnnotation String String String String boolean void void void void cosSetField(COSName name, COSObject cosObj) getCreationDate() getInnerColor() getInReplyTo() getOpacity() getPopup() getRichContent() getSubject() getSubtypeLabel() getText() isMarkupAnnotation() setInnerColor(float[] color) setOpacity(float value) setPopup(PDPopupAnnotation popup) 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 PDExplicitDestination getName() 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 public static final public static final DK_Subtype DK_Type 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 public static final CN_Type_Outlines 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 public static final public static final public static final public static final public static final public static final public static final public static final public static final DK_A DK_C DK_Dest DK_F DK_Next DK_Parent DK_Prev DK_SE DK_Title 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 public static final public static final public static final DK_Count DK_First DK_Last 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 public static final public static final public static final public static final DK_DestOutputProfile DK_Info DK_OutputCondition DK_OutputConditionIdentifier DK_OutputIntent

who am i
public static final public static final public static final DK_RegistryName DK_S META

The meta class instance

Method Summary
COSStream boolean boolean cosGetOutputProfile() importCMYK_ICCProfile() 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 public static final public static final public static final public static final public static final public static final public static final public static final COPY_SUFFIX DK_Annots DK_Contents DK_CropBox DK_MediaBox DK_Metadata DK_PieceInfo DK_Resources 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 PDAdditionalActions java.util.List dispose() getAdditionalActions() 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 PDAnnotation PDPageNode PDPage PDAnnotation PDPageNode PDPage PDAnnotation getCount() getFirstAnnotation() getFirstNode() getFirstPage() getLastAnnotation() getLastNode() getLastPage() 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 PDAnnotation getPageAt(int index) 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 void boolean void getSupportedTriggerEvents() invalidateCaches() isPage() removeAnnotation(PDAnnotation annot)

Remove a PDAnnotation from the page.
void removeApplicationData(String name)

Remove the PDApplicationData associated with name from this page.
void void setAdditionalActions(PDAdditionalActions actions) 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 PDAnno