Академический Документы
Профессиональный Документы
Культура Документы
jPod
intarsys PDF Library
Vision
jPod is an already mature PDF manipulating and rendering framework.
Until now it is contained in shrink wrapped products like
- EFormServer (commercial)
- CABAReT Stage (free for personal use)
jPod can be compared to other PDF libraries, but we believe it has its strengths...
- reading (also lazy), verified against many of the "real world PDF documents" that
slightly deviate from the spec.
- manipulating (COS level, PD level)
- undo and update propagation make it suitable for interactive applications
- sophisticated consistency checks improve resulting PDF documents
- writing (full and incremental)
- data source abstraction makes it easy to integrate in new architecture
(for example file based, web based, database...) and adapt to complex requirements
(for example untrusted or security sensitive environments. Currently a certification on
the base of CommonCriteria is under way…).
- AFM and TrueType support
- ContentStream rendering and creation framework
- - 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.
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.
* 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
Trademarks
Adobe, Adobe Reader are trademarks or registered trademarks of Adobe Systems
Incorporated in the United States and other countries.
Page 4 of 1521
Overview
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:
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.:
Page 6 of 1521
(continued from last page)
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
Constructor Summary
public AbstractFontRegistry()
Method Summary
void addFont(IFont font)
java.util.Iterator getFontFamilyIterator()
Constructors
AbstractFontRegistry
public AbstractFontRegistry()
AbstractFontRegistry
public AbstractFontRegistry(int initialCapacity)
Methods
addFont
public void addFont(IFont font)
Page 9 of 1521
de.intarsys.font.AbstractFontRegistry
getFontFamily
public FontFamily getFontFamily(String familyName)
getFont
public IFont getFont(String familyName,
FontStyle style)
getFontFamilyIterator
public java.util.Iterator getFontFamilyIterator()
Page 10 of 1521
de.intarsys.font.FontAliasMap
de.intarsys.font
Class FontAliasMap
java.lang.Object
|
+-de.intarsys.font.FontMap
|
+-de.intarsys.font.FontAliasMap
Constructor Summary
public FontAliasMap(FontMapper mapper, String name, String alias)
Method Summary
String getAlias()
java.io.InputStream getAsStream()
Constructors
FontAliasMap
public FontAliasMap(FontMapper mapper,
String name,
String alias)
Methods
getAlias
public String getAlias()
getAsStream
public java.io.InputStream getAsStream()
throws java.io.IOException
Page 11 of 1521
de.intarsys.font.FontFamily
de.intarsys.font
Class FontFamily
java.lang.Object
|
+-de.intarsys.font.FontFamily
Constructor Summary
public FontFamily()
Method Summary
IFont getFont(FontStyle style)
java.util.Iterator getFontIterator()
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
Page 13 of 1521
de.intarsys.font.FontFileMap
de.intarsys.font
Class FontFileMap
java.lang.Object
|
+-de.intarsys.font.FontMap
|
+-de.intarsys.font.FontFileMap
DOCUMENT ME!
Constructor Summary
public FontFileMap(FontMapper mapper, String name, java.io.File file)
Method Summary
java.io.InputStream getAsStream()
java.io.File getFile()
Constructors
FontFileMap
public FontFileMap(FontMapper mapper,
String name,
java.io.File file)
Methods
getAsStream
public java.io.InputStream getAsStream()
throws java.io.IOException
getFile
public java.io.File getFile()
Page 14 of 1521
de.intarsys.font.FontMap
de.intarsys.font
Class FontMap
java.lang.Object
|
+-de.intarsys.font.FontMap
Direct Known Subclasses:
FontAliasMap, FontFileMap, FontResourceMap
Constructor Summary
public FontMap(FontMapper mapper, String name)
Method Summary
abstract getAsStream()
java.io.InputStream
String getKey()
FontMapper getMapper()
String getName()
Constructors
FontMap
public FontMap(FontMapper mapper,
String name)
Methods
getName
public String getName()
getKey
public String getKey()
Page 15 of 1521
de.intarsys.font.FontMap
getAsStream
public abstract java.io.InputStream getAsStream()
throws java.io.IOException
getMapper
public FontMapper getMapper()
Page 16 of 1521
de.intarsys.font.FontMapper
de.intarsys.font
Class FontMapper
java.lang.Object
|
+-de.intarsys.font.FontMapper
DOCUMENT ME!
Method Summary
static FontMapper getActive()
FontMap getDefaultMap()
Methods
getActive
public static FontMapper getActive()
setDefaultMap
public void setDefaultMap(FontMap defaultMap)
getDefaultMap
public FontMap getDefaultMap()
Page 17 of 1521
de.intarsys.font.FontMapper
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
DOCUMENT ME!
Constructor Summary
public FontResourceMap(FontMapper mapper, String name, Class owner, String
resource)
Method Summary
java.io.InputStream getAsStream()
Class getOwner()
String getResource()
Constructors
FontResourceMap
public FontResourceMap(FontMapper mapper,
String name,
Class owner,
String resource)
Methods
getAsStream
public java.io.InputStream getAsStream()
throws java.io.IOException
getOwner
public Class getOwner()
Page 19 of 1521
de.intarsys.font.FontResourceMap
getResource
public String getResource()
Page 20 of 1521
de.intarsys.font.FontStyle
de.intarsys.font
Class FontStyle
java.lang.Object
|
+-de.intarsys.font.FontStyle
docme
Field Summary
public static final BOLD
Method Summary
FontStyle getBoldFlavor()
FontStyle getItalicFlavor()
String getLabel()
String toString()
Fields
COUNT
public static final int COUNT
Page 21 of 1521
de.intarsys.font.FontStyle
UNDEFINED
public static final de.intarsys.font.FontStyle UNDEFINED
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
toString
public String toString()
Page 23 of 1521
de.intarsys.font.FontTools
de.intarsys.font
Class FontTools
java.lang.Object
|
+-de.intarsys.font.FontTools
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()
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
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()
Returns:
The font family name.
getFontName
public String getFontName()
Returns:
The complete font name.
getFontStyle
public FontStyle getFontStyle()
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
Method Summary
PDDocument getDoc()
boolean isCalculate()
boolean isValidate()
void recalculate()
void resetFields()
Methods
getDoc
public PDDocument getDoc()
Page 27 of 1521
de.intarsys.pdf.app.acroform.CommonFormHandler
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
Constructor Summary
public FormHandlerFactory()
Method Summary
static get()
IFormHandlerFactory
The active IFormHandlerFactory for the VM.
Constructors
FormHandlerFactory
public FormHandlerFactory()
Methods
get
public static IFormHandlerFactory get()
Returns:
set
public static void set(IFormHandlerFactory factory)
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
Method Summary
PDDocument getDoc()
boolean isCalculate()
boolean isValidate()
void recalculate()
void resetFields()
Methods
setValidate
public void setValidate(boolean validate)
isValidate
public boolean isValidate()
Page 31 of 1521
de.intarsys.pdf.app.acroform.IFormHandler
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
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)
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
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
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
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
Constructor Summary
public ActionException()
Constructors
ActionException
public ActionException()
ActionException
public ActionException(String message)
ActionException
public ActionException(Throwable cause)
Page 38 of 1521
de.intarsys.pdf.app.action.ActionException
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
Constructor Summary
public ActionHandlerRegistry()
Method Summary
static get()
IActionHandlerRegistr
y The active IActionHandlerRegistry for the VM.
Constructors
ActionHandlerRegistry
public ActionHandlerRegistry()
Methods
set
public static void set(IActionHandlerRegistry active)
Parameters:
active - The new active IActionHandlerRegistry.
get
public static IActionHandlerRegistry get()
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
Constructor Summary
public ActionProcessor()
Method Summary
static get()
IActionProcessor
The active IActionHandlerRegistry for the VM.
Constructors
ActionProcessor
public ActionProcessor()
Methods
set
public static void set(IActionProcessor active)
Parameters:
active - The new active IActionProcessor.
get
public static IActionProcessor get()
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
Field Summary
public static final DK_JavaScript
The key where we can find the static JavaScripts in the document catalog.
Constructor Summary
public ActionTools()
Method Summary
static TriggerEvent annotationTriggerBlurred(PDAnnotation annotation)
Page 42 of 1521
de.intarsys.pdf.app.action.ActionTools
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
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.
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
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
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
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.
Methods
getActionType
public COSName getActionType()
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
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
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.
Methods
lookupActionHandler
public IActionHandler lookupActionHandler(COSName 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
unregisterActionHandler
public void unregisterActionHandler(IActionHandler handler)
Unregister an IActionHandler.
Parameters:
handler - The IActionHandler to be unregistered.
getActionHandlers
public java.util.List getActionHandlers()
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
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)
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
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
Constructor Summary
public StandardActionHandlerRegistry()
Method Summary
java.util.List getActionHandlers()
IActionHandler getDefaultHandler()
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
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
The source of the event is always the COSObject responsible for the event, for example the document for document level events,
the field for field events and so on.
Constructor Summary
public TriggerEvent(Object context, COSName reason)
Method Summary
String getChange()
int getCommitKey()
Object getContext()
String getName()
boolean getRc()
COSName getReason()
int getSelEnd()
int getSelStart()
Object getSource()
Object getTarget()
String getTargetName()
Page 57 of 1521
de.intarsys.pdf.app.action.TriggerEvent
String getType()
String getValue()
boolean isExecuted()
boolean isModifier()
boolean isRc()
boolean isShift()
boolean isWillCommit()
Constructors
TriggerEvent
public TriggerEvent(Object context,
COSName reason)
Page 58 of 1521
de.intarsys.pdf.app.action.TriggerEvent
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
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
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
Constructor Summary
public AppearanceCreatorRegistry()
Method Summary
static get()
IAppearanceCreatorReg
istry
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
Constructor Summary
public AppearanceCreatorTools()
Method Summary
static void createAppearance(PDAcroFormField field)
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
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()
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
Method Summary
java.util.List getAppearanceCreators()
A collection of all registered IAppearanceCreator instances.
Methods
getAppearanceCreators
public java.util.List getAppearanceCreators()
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
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
Constructor Summary
public NullAppearanceCreator()
Method Summary
PDAppearance createAppearance(PDAnnotation annotation, PDAppearance appearance)
COSName getAnnotationType()
Constructors
NullAppearanceCreator
public NullAppearanceCreator()
Methods
createAppearance
public PDAppearance createAppearance(PDAnnotation annotation,
PDAppearance appearance)
getAnnotationType
public COSName getAnnotationType()
Page 69 of 1521
de.intarsys.pdf.app.appearance.StandardAppearanceCreatorRegistry
de.intarsys.pdf.app.appearance
Class StandardAppearanceCreatorRegistry
java.lang.Object
|
+-de.intarsys.pdf.app.appearance.StandardAppearanceCreatorRegistry
All Implemented Interfaces:
IAppearanceCreatorRegistry
A registry for the available IAppearanceCreator strategies. The IAppearanceCreator is looked up by the annotation sub-
type.
Method Summary
java.util.List getAppearanceCreators()
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
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
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
Field Summary
public static final DATE_FORMAT
Value: 'D':yyyyMMddHHmmss
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
String stringValue()
The java.lang.String representation of this.
java.util.Date toDate()
The java.util.Date represented by this.
Page 74 of 1521
de.intarsys.pdf.cds.CDSDate
String toFormattedString()
A formatted java.lang.String representation of this.
Fields
DATE_FORMAT
public static final java.lang.String DATE_FORMAT
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)
Parameters:
string - The base string.
Returns:
Create a CDSDate from a COSString
format
public static String format(CDSDate cdsDate)
Parameters:
cdsDate - The CDSDate to be formatted.
Page 75 of 1521
de.intarsys.pdf.cds.CDSDate
Returns:
A formatted java.lang.String representation.
format
public static String format(java.text.Format format,
CDSDate cdsDate)
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
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
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
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()
Returns:
The java.lang.String representation of this.
toDate
public java.util.Date toDate()
throws java.text.ParseException
Returns:
The java.util.Date represented by this.
Throws:
ParseException
toFormattedString
public String toFormattedString()
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
+ +
| a b 0 |
| c d 0 |
| e f 1 |
+ +
[ a b c d e f ]
[ 1 0 0 1 0 0 ]
so that
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)
Constructor Summary
public CDSMatrix()
CDSMatrix constructor.
Method Summary
CDSMatrix copy()
Create a copy of the receiver
float getA()
Return the matrix element "a".
float getB()
Return the matrix element "b".
float getC()
Return the matrix element "c".
float getD()
Return the matrix element "d".
float getE()
Return the matrix element "e".
float getF()
Return the matrix element "f".
void invalidateCaches()
void scale(float[] v)
Concatenate this transformation with a scaling transformation.
Page 79 of 1521
de.intarsys.pdf.cds.CDSMatrix
java.awt.geom.AffineT toTransform()
ransform
Create an java.awt.geom.AffineTransform that corresponds to this.
float[] transform(float[] v)
Transform a vector v using this.
void translate(float[] v)
Concatenate this transformation with a translation transformation.
Fields
MATRIX_0
public static float MATRIX_0
MATRIX_90
public static float MATRIX_90
MATRIX_180
public static float MATRIX_180
Page 80 of 1521
de.intarsys.pdf.cds.CDSMatrix
MATRIX_270
public static float MATRIX_270
Constructors
CDSMatrix
public CDSMatrix()
CDSMatrix constructor.
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)
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)
Parameters:
num - The new matrix element "a".
Page 81 of 1521
de.intarsys.pdf.cds.CDSMatrix
getA
public float getA()
Returns:
The matrix element "a".
setB
public void setB(float num)
Parameters:
num - The new matrix element "b".
getB
public float getB()
Returns:
The matrix element "b".
setC
public void setC(float num)
Parameters:
num - The new matrix element "c".
getC
public float getC()
Returns:
The matrix element "c".
setD
public void setD(float num)
Parameters:
num - The new matrix element "d".
getD
public float getD()
Page 82 of 1521
de.intarsys.pdf.cds.CDSMatrix
Returns:
The matrix element "d".
setE
public void setE(float num)
Parameters:
num - The new matrix element "e".
getE
public float getE()
Returns:
The matrix element "e".
setF
public void setF(float num)
Parameters:
num - The new matrix element "f".
getF
public float getF()
Returns:
The matrix element "f".
setTransformation
public void setTransformation(float a,
float b,
float c,
float d,
float e,
float 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)
Parameters:
data - The array defining the new parameters
setTransformation
public void setTransformation(java.awt.geom.AffineTransform transform)
Parameters:
transform - The matrix defining the new parameters
copy
public CDSMatrix copy()
Returns:
a new copy of the receiver
rotate
public void rotate(float angle)
Parameters:
angle - Rotation angle in radians
scale
public void scale(float[] v)
Parameters:
v - The scale factor.
transform
public float[] transform(float[] v)
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)
Parameters:
v - The transaltion definition
translate
public void translate(float x,
float y)
Parameters:
x - The translation in x direction
y - The translation in y direction
toTransform
public java.awt.geom.AffineTransform toTransform()
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
A helper class implementing an association object for the use in a PDF name tree.
Constructor Summary
public CDSNameTreeEntry(COSString name, COSObject value)
Create an an entry for a name tree
Method Summary
COSObject getKey()
COSString getName()
The name of the entry.
Constructors
CDSNameTreeEntry
public CDSNameTreeEntry(COSString name,
COSObject value)
Parameters:
name - The name of the entry
value - The value of the entry.
Methods
getName
public COSString getName()
Returns:
The name of the entry.
Page 86 of 1521
de.intarsys.pdf.cds.CDSNameTreeEntry
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
Field Summary
public static final DK_Names
Method Summary
void addAll(CDSNameTreeNode node)
Add all children from node.
static createLeaf()
CDSNameTreeNode
static createRootIntermediate()
CDSNameTreeNode
static createRootLeaf()
CDSNameTreeNode
java.util.List getEntries()
java.util.List getKids()
Page 88 of 1521
de.intarsys.pdf.cds.CDSNameTreeNode
COSArray getLimits()
Return the two element array containing the smallest and the largest key within the receiver
subtree.
COSString getMax()
The maximum key within the receiver subtree.
COSString getMin()
The minimum key within the receiver subtree.
boolean isLeaf()
java.util.Iterator iterator()
An java.util.Iterator on all leaf fields in the subtree.
Fields
DK_Names
public static final de.intarsys.pdf.cos.COSName DK_Names
Methods
createFromCos
public static CDSNameTreeNode createFromCos(COSDictionary 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
createIntermediate
public static CDSTreeNode createIntermediate()
createLeaf
public static CDSNameTreeNode createLeaf()
getKids
public java.util.List getKids()
addAll
public void addAll(CDSNameTreeNode 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
Returns:
Return the two element array containing the smallest and the largest key within the receiver subtree.
getMax
public COSString getMax()
Returns:
The maximum key within the receiver subtree.
getMin
public COSString getMin()
Returns:
The minimum key within the receiver subtree.
iterator
public java.util.Iterator iterator()
Returns:
An java.util.Iterator on all leaf fields in the subtree.
mayContain
public boolean mayContain(COSString 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)
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)
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
A helper class implementing an association object for the use in a PDF number tree.
Constructor Summary
public CDSNumberTreeEntry(COSInteger number, COSObject value)
Create an an entry for a number tree
Method Summary
COSObject getKey()
COSInteger getNumber()
Constructors
CDSNumberTreeEntry
public CDSNumberTreeEntry(COSInteger number,
COSObject value)
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
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
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.
Method Summary
boolean contains(double x, double y)
true if x/y lies within this.
CDSRectangle copy()
Create a copy of the receiver
float getHeight()
Return the height (an absolute value) of the rectangle.
float getLowerLeftX()
The lower left x coordinate.
float getLowerLeftY()
The lower left y coordinate.
float getUpperRightX()
The upper right x coordinate.
float getUpperRightY()
The upper rigth y coordinate.
float getWidth()
Get the width (an absolute value) of the rectangle.
void invalidateCaches()
CDSRectangle normalize()
Adjust the corner coordinates so that lower left is really in the lower left (this means returns
the smallest coordinate values).
Page 96 of 1521
de.intarsys.pdf.cds.CDSRectangle
java.awt.geom.Rectang toNormalizedRectangle()
le2D
Construct a java.awt.geom.Rectangle2D object from the receiver.
java.awt.geom.Rectang toRectangle()
le2D
Construct a java.awt.geom.Rectangle2D object from the receiver.
Fields
SIZE_A4
public static final float SIZE_A4
Constructors
CDSRectangle
public CDSRectangle()
CDSRectangle
public CDSRectangle(float llx,
float lly,
float urx,
float ury)
Parameters:
llx - the lower left x
Page 97 of 1521
de.intarsys.pdf.cds.CDSRectangle
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)
Parameters:
array - The base COSArray
Returns:
Create a CDSRectangle from array
contains
public boolean contains(double x,
double y)
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)
Parameters:
Page 98 of 1521
de.intarsys.pdf.cds.CDSRectangle
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()
Returns:
a new copy of the receiver
getHeight
public float getHeight()
Returns:
Return the height (an absolute value) of the rectangle.
getLowerLeftX
public float getLowerLeftX()
Returns:
The lower left x coordinate.
getLowerLeftY
public float getLowerLeftY()
Returns:
The lower left y coordinate.
getUpperRightX
public float getUpperRightX()
Returns:
The upper right x coordinate.
getUpperRightY
public float getUpperRightY()
Page 99 of 1521
de.intarsys.pdf.cds.CDSRectangle
Returns:
The upper right y coordinate.
getWidth
public float getWidth()
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).
Returns:
this
resize
public void resize(float dx,
float dy)
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)
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)
Parameters:
height - THe new height
setLowerLeftX
public void setLowerLeftX(float num)
Parameters:
num - The lower left x coordinate.
setLowerLeftY
public void setLowerLeftY(float num)
Parameters:
num - The lower left y coordinate.
setUpperRightX
public void setUpperRightX(float num)
Parameters:
num - The upper right x coordinate.
setUpperRightY
public void setUpperRightY(float num)
Parameters:
num - The upper right y coordinate.
setWidth
public void setWidth(float width)
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.
de.intarsys.pdf.cds
Class CDSTreeEntry
java.lang.Object
|
+-de.intarsys.pdf.cds.CDSTreeEntry
Direct Known Subclasses:
CDSNameTreeEntry, CDSNumberTreeEntry
Abstract superclass for implementing entry objects in PDF name and number trees.
Constructor Summary
public CDSTreeEntry(COSObject value)
Method Summary
abstract COSObject getKey()
COSObject getValue()
The value of the entry.
Constructors
CDSTreeEntry
public CDSTreeEntry(COSObject value)
Methods
setValue
public COSObject setValue(COSObject object)
Parameters:
object - The new value for the entry.
Returns:
The previous value
getValue
public COSObject getValue()
Returns:
The value of the entry.
getKey
public abstract COSObject getKey()
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
Field Summary
public static final DK_Kids
common names
Constructor Summary
public CDSTreeNode(COSObject object)
Method Summary
boolean isIntermediate()
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
Constructors
CDSTreeNode
public CDSTreeNode(COSObject object)
Methods
isIntermediate
public boolean isIntermediate()
isLeaf
public abstract boolean isLeaf()
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 framework for interpreting content streams is provided with ICSInterpreter and ICSDevice.
de.intarsys.pdf.content
Class CSContent
java.lang.Object
|
+-de.intarsys.pdf.content.CSContent
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.
COSStream createStream()
CSOperation getLastOperation()
remove last operation from the rendering program.
CSOperation[] getOperations()
void removeLastOperation()
remove last operation from the rendering program.
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)
Parameters:
data - The bytes defining the PDF content stream.
Returns:
The new CSContent
createFromCos
public static CSContent createFromCos(COSStream 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.
createNew
public static CSContent createNew()
Returns:
The new CSContent.
getLastOperation
public CSOperation getLastOperation()
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)
Parameters:
op - The new operation to append.
addOperation
public void addOperation(int index,
CSOperation op)
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()
size
public int size()
Returns:
The number of operations in the content stream.
toByteArray
public byte[] toByteArray()
Returns:
The byte representation from the list of operations.
toString
public String toString()
de.intarsys.pdf.content
Class CSDeviceAdapter
java.lang.Object
|
+-de.intarsys.pdf.content.CSDeviceAdapter
All Implemented Interfaces:
ICSDevice
An adapter implementation for ICSDevice. This can be used as a simple superclass for implementing PDF content stream aware
devices.
Field Summary
public static MAX_STACK_SIZE
the maximum number of nested states
Constructor Summary
public CSDeviceAdapter()
Create a new CSDeviceAdapter
Method Summary
void close()
void compatibilityBegin()
void compatibilityEnd()
ICSGraphicsState getGraphicsState()
ICSInterpreter getInterpreter()
void markedContentEnd()
void pathClipEvenOdd()
void pathClipNonZero()
void pathClose()
void pathCloseFillStrokeEvenOdd()
void pathCloseFillStrokeNonZero()
void pathCloseStroke()
void pathEnd()
void pathFillEvenOdd()
void pathFillNonZero()
void pathFillStrokeEvenOdd()
void pathFillStrokeNonZero()
void pathStroke()
void penCurveToC(float x1, float y1, float x2, float y2, float x3, float y3)
void restoreState()
void saveState()
void textBegin()
void textEnd()
void textLineNew()
Fields
MAX_STACK_SIZE
public static int MAX_STACK_SIZE
Constructors
CSDeviceAdapter
public 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)
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()
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)
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)
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)
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)
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)
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)
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()
de.intarsys.pdf.content
Class CSDeviceBasedInterpreter
java.lang.Object
|
+-de.intarsys.pdf.content.CSInterpreter
|
+-de.intarsys.pdf.content.CSDeviceBasedInterpreter
All Implemented Interfaces:
ICSInterpreter
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.
Constructors
CSDeviceBasedInterpreter
public CSDeviceBasedInterpreter(java.util.Map paramOptions,
ICSDevice device)
Methods
getDevice
public ICSDevice getDevice()
Returns:
The ICSDevice currently associated with the interpreter.
process
public void process(CSContent pContent,
PDResources resourceDict)
throws CSException
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
Constructor Summary
public CSError(String message)
public CSError()
Constructors
CSError
public CSError(String message)
CSError
public CSError(String message,
Throwable cause)
CSError
public CSError()
CSError
public CSError(Throwable cause)
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
Constructor Summary
public CSException(String message)
public CSException()
Constructors
CSException
public CSException(String message)
CSException
public CSException(String message,
Throwable cause)
CSException
public CSException()
CSException
public CSException(Throwable cause)
de.intarsys.pdf.content
Class CSInterpreter
java.lang.Object
|
+-de.intarsys.pdf.content.CSInterpreter
All Implemented Interfaces:
ICSInterpreter
Constructor Summary
public CSInterpreter(java.util.Map paramOptions)
Method Summary
ICSExceptionHandler getExceptionHandler()
java.util.Map getOptions()
Constructors
CSInterpreter
public CSInterpreter(java.util.Map paramOptions)
Methods
getExceptionHandler
public ICSExceptionHandler getExceptionHandler()
getOptions
public java.util.Map getOptions()
process
public void process(CSContent pContent,
PDResources pResources)
throws CSException
setExceptionHandler
public void setExceptionHandler(ICSExceptionHandler errorHandler)
de.intarsys.pdf.content
Class CSInterpreterFrame
java.lang.Object
|
+-de.intarsys.pdf.content.CSInterpreterFrame
The context frame of a CSInterpreter holding the "process" stack frame information.
Constructor Summary
public CSInterpreterFrame()
Constructors
CSInterpreterFrame
public CSInterpreterFrame()
de.intarsys.pdf.content
Class CSLiteral
java.lang.Object
|
+-de.intarsys.pdf.content.CSOperation
|
+-de.intarsys.pdf.content.CSLiteral
Constructor Summary
public CSLiteral(byte[] literal)
Constructors
CSLiteral
public CSLiteral(byte[] literal)
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
Constructor Summary
public CSNotSupported(String message, Throwable cause)
Constructors
CSNotSupported
public CSNotSupported(String message,
Throwable cause)
CSNotSupported
public CSNotSupported(String message)
de.intarsys.pdf.content
Class CSOperation
java.lang.Object
|
+-de.intarsys.pdf.content.CSOperation
Direct Known Subclasses:
CSLiteral
The content stream is a sequence of operations, with any operation beeing a list of operands followed by the operator.
Field Summary
public static final OPERAND_Tx
Constructor Summary
public CSOperation(CSOperator operator)
Method Summary
void addOperand(COSObject object)
Add an operand at the end of the current operand list.
COSObject getOperand(int i)
The operand at index i.
java.util.Iterator getOperands()
The iterator over all operands.
CSOperator getOperator()
The operator of the operation.
byte[] getOperatorToken()
boolean hasOperator()
Answer true if an operator is already defined.
boolean isOpEndMarkedContent()
true if this is a "end marked content" operation.
int operandSize()
Answer the number of operands.
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:
true if this is a "begin marked content" operation with the operand mark.
isOpEndMarkedContent
public boolean isOpEndMarkedContent()
Returns:
true if this is a "end marked content" operation
getOperand
public COSObject getOperand(int 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)
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()
Returns:
The iterator over all operands.
getOperator
public CSOperator getOperator()
Returns:
The operator of the operation.
getOperatorToken
public byte[] getOperatorToken()
addOperand
public void addOperand(COSObject object)
Parameters:
object - The new operand to add.
hasOperator
public boolean hasOperator()
Returns:
Answer true if an operator is already defined.
matchesOperator
public boolean matchesOperator(CSOperator 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()
Returns:
the number of operands.
toString
public String toString()
de.intarsys.pdf.content
Class CSOperator
java.lang.Object
|
+-de.intarsys.pdf.content.CSOperator
The content stream is a sequence of operations, with any operation beeing a list of operands followed by the operator.
Constructor Summary
public CSOperator(byte[] token)
Method Summary
static CSOperator create(String name)
boolean equals(Object o)
byte[] getToken()
int hashCode()
String toString()
Constructors
CSOperator
public CSOperator(byte[] token)
Methods
create
public static CSOperator create(String name)
getToken
public byte[] getToken()
equals
public boolean equals(Object o)
hashCode
public int hashCode()
toString
public String toString()
de.intarsys.pdf.content
Class CSOperators
java.lang.Object
|
+-de.intarsys.pdf.content.CSOperators
A class enumerating the operators valid in a content stream. PDF 1.4 complete operator summary (App A)
Field Summary
public static final CSO_All
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
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
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
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
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
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
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
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
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)
de.intarsys.pdf.content
Class CSShapeDevice
java.lang.Object
|
+-de.intarsys.pdf.content.CSDeviceAdapter
|
+-de.intarsys.pdf.content.CSShapeDevice
All Implemented Interfaces:
ICSDevice
A ICSDevice creating AWT java.awt.Shape instances from the path painting operators.
Constructor Summary
public CSShapeDevice()
Method Summary
void pathClipEvenOdd()
void pathClipNonZero()
void pathClose()
void pathCloseFillStrokeEvenOdd()
void pathCloseFillStrokeNonZero()
void pathCloseStroke()
void pathEnd()
void pathFillEvenOdd()
void pathFillNonZero()
void pathFillStrokeEvenOdd()
void pathFillStrokeNonZero()
void pathStroke()
void penCurveToC(float x1, float y1, float x2, float y2, float x3, float y3)
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()
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)
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)
de.intarsys.pdf.content
Class CSVirtualDevice
java.lang.Object
|
+-de.intarsys.pdf.content.CSDeviceAdapter
|
+-de.intarsys.pdf.content.CSVirtualDevice
All Implemented Interfaces:
ICSDevice
Constructor Summary
public CSVirtualDevice()
Method Summary
void open(ICSInterpreter pInterpreter)
Constructors
CSVirtualDevice
public CSVirtualDevice()
Methods
open
public void open(ICSInterpreter pInterpreter)
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
Constructor Summary
public CSWarning(String message)
public CSWarning()
Constructors
CSWarning
public CSWarning(String message)
CSWarning
public CSWarning(String message,
Throwable cause)
CSWarning
public CSWarning()
CSWarning
public CSWarning(Throwable cause)
de.intarsys.pdf.content
Class GraphicsState
java.lang.Object
|
+-de.intarsys.pdf.content.GraphicsState
Field Summary
public textState
The parameters used for rendering text operations.
Constructor Summary
public GraphicsState()
Create a new graphic state for the renderer
Method Summary
GraphicsState copy()
int getCapStyle()
java.awt.Shape getClip()
float[] getDashPattern()
float getDashPhase()
int getJoinStyle()
float getLineWidth()
float getMiterLimit()
float getNonStrokeAlphaValue()
PDColorSpace getNonStrokeColorSpace()
float[] getNonStrokeColorValues()
float getStrokeAlphaValue()
PDColorSpace getStrokeColorSpace()
float[] getStrokeColorValues()
java.awt.geom.AffineT getTransform()
ransform
float[] getTransformationValues()
Fields
textState
public de.intarsys.pdf.content.TextState textState
Constructors
GraphicsState
public GraphicsState()
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()
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)
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)
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)
de.intarsys.pdf.content
Interface IContentStreamProvider
All Superinterfaces:
IResourcesProvider
Method Summary
CSContent getContentStream()
The CSContent contained in this.
Methods
getContentStream
public CSContent getContentStream()
Returns:
The CSContent contained in this.
setContentStream
public void setContentStream(CSContent content)
Parameters:
content - The new content
de.intarsys.pdf.content
Interface ICSDevice
All Known Implementing Classes:
CSDeviceAdapter
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.
ICSGraphicsState getGraphicsState()
The current ICSGraphicsState active.
ICSInterpreter getInterpreter()
The ICSInterpreter associated with this ICSDevice.
void markedContentEnd()
End marked content sequence started with "BMC" or "BDC".
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.
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 restoreState()
Restore the graphics state from the stack.
void saveState()
Save the current graphics state on a stack for later use.
void textBegin()
Begin text mode.
void textEnd()
End text mode.
void textLineNew()
Move the current position to a new line.
Methods
close
public void close()
doShading
public void doShading(COSName resourceName,
PDShading shading)
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)
Stroke a PDXObject. A PDXObject is a self contained graphical description, either a form, an image or a postscript
program.
Parameters:
resourceName - The logical name of the resource in the PDResources
xObject - The PDXObject to be stroked.
inlineImage
public void inlineImage(PDImage img)
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)
Parameters:
tag - The tag indicating the role or significance.
compatibilityBegin
public void compatibilityBegin()
compatibilityEnd
public void compatibilityEnd()
markedContentBeginProperties
public void markedContentBeginProperties(COSName tag,
COSName resourceName,
COSDictionary properties)
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.
markedContentEnd
public void markedContentEnd()
markedContentPoint
public void markedContentPoint(COSName tag)
Parameters:
tag - The tag indicating the role or significance.
markedContentPointProperties
public void markedContentPointProperties(COSName tag,
COSName resourceName,
COSDictionary properties)
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)
Parameters:
interpreter
pathClipEvenOdd
public void pathClipEvenOdd()
Intersect the current clipping path with the current path using the even/odd rule.
pathClipNonZero
public void pathClipNonZero()
Intersect the current clipping path with the current path using the nonzero winding rule.
pathClose
public void pathClose()
Close the path and append a line segment from the current coordinate to the starting point of the path.
pathCloseFillStrokeEvenOdd
public void pathCloseFillStrokeEvenOdd()
Close, Fill and then stroke the path using the even/odd rule.
pathCloseFillStrokeNonZero
public void pathCloseFillStrokeNonZero()
Close, Fill and then stroke the path using the non zero winding rule.
pathCloseStroke
public void pathCloseStroke()
pathEnd
public void pathEnd()
This may for example be used to manipulate the clipping path without a painting operation.
pathFillEvenOdd
public void pathFillEvenOdd()
pathFillNonZero
public void pathFillNonZero()
pathFillStrokeEvenOdd
public void pathFillStrokeEvenOdd()
Fill and then stroke the path using the even/odd rule.
pathFillStrokeNonZero
public void pathFillStrokeNonZero()
Fill and then stroke the path using the non-zero winding rule.
pathStroke
public void pathStroke()
penCurveToC
public void penCurveToC(float x1,
float y1,
float x2,
float y2,
float x3,
float y3)
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
Parameters:
penCurveToY
public void penCurveToY(float x1,
float y1,
float x3,
float y3)
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
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.
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.
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)
The lower left corner is at x, y, the dimensions are width and height. The numbers are defined in user space.
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()
saveState
public void saveState()
setExtendedState
public void setExtendedState(COSName resourceName,
PDExtGState gstate)
Set the dictionary as the new graphic state, creating a new PDResources entry if needed.
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.
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.
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.
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.
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.
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.
Parameters:
miterLimit - The maximum ratio of MiterLength/LineWidth when connecting two lines with miter style.
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)
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
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.
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)
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:
setStrokeColorSpace
public void setStrokeColorSpace(COSName resourceName,
PDColorSpace colorSpace)
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.
Parameters:
values - The color values.
resourceName - An optional logical name of the resource in the PDResources
pattern - An optional PDPattern
textBegin
public void textBegin()
textEnd
public void textEnd()
textLineMove
public void textLineMove(float dx,
float dy)
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)
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)
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()
textSetCharSpacing
public void textSetCharSpacing(float charSpacing)
Parameters:
charSpacing - The character spacing
textSetFont
public void textSetFont(COSName resourceName,
PDFont font,
float size)
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)
Parameters:
scale - The new horizontal scaling factor.
textSetLeading
public void textSetLeading(float leading)
Parameters:
leading - The new leading
textSetRenderingMode
public void textSetRenderingMode(int renderingMode)
Parameters:
renderingMode - The new rendering mode.
textSetRise
public void textSetRise(float rise)
Parameters:
rise - The new text rise (super/subscript) amount
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.
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)
Parameters:
wordSpacing - The new word spacing.
textShow
public void textShow(byte[] text,
int offset,
int length)
Parameters:
text - The bytes to be shown.
offset
length
textShow
public void textShow(String text)
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.
Parameters:
text - The text value to be shown using the current fonts encoding.
textT3SetGlyphWidth
public void textT3SetGlyphWidth(float x,
float y)
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.
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)
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".
Returns:
The ICSInterpreter associated with this ICSDevice.
getGraphicsState
public ICSGraphicsState getGraphicsState()
This is a read only representation of the graphics state used when performing rendering operations in the device.
Returns:
The current ICSGraphicsState active.
de.intarsys.pdf.content
Interface ICSExceptionHandler
An object able to handle exceptional conditions while processing a content stream. This one is plugged into an ICSInterpreter.
Method Summary
void error(CSError error)
Methods
error
public void error(CSError error)
throws CSException
warning
public void warning(CSWarning warning)
throws CSException
de.intarsys.pdf.content
Interface ICSGraphicsState
A read only object containing the actual context for rendering operations of an ICSDevice.
Method Summary
ICSTextState getTextState()
The current ICSTextState active.
Methods
getTextState
public ICSTextState getTextState()
This is a read only representation of the text state used when performing text rendering operations in the device.
Returns:
The current ICSTextState active.
de.intarsys.pdf.content
Interface ICSInterpreter
All Known Implementing Classes:
CSInterpreter
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.
Methods
process
public void process(CSContent content,
PDResources resources)
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()
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)
Parameters:
errorHandler - The new ICSExceptionHandler.
de.intarsys.pdf.content
Interface ICSTextState
A read only object containing the actual context for text rendering operations of an ICSDevice.
de.intarsys.pdf.content
Class TextState
java.lang.Object
|
+-de.intarsys.pdf.content.TextState
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
Value: 0
Value: 4
Value: 2
Value: 6
Value: 3
Value: 1
Value: 5
Constructor Summary
public TextState()
Method Summary
void begin()
TextState copy()
void end()
float getCharSpacing()
PDFont getFont()
float getFontSize()
float getHorizontalScaling()
float getHorizontalScalingFactor()
float getLeading()
int getRenderingMode()
float getRise()
java.awt.geom.AffineT getTextLineMatrix()
ransform
java.awt.geom.AffineT getTextMatrix()
ransform
float getWordSpacing()
boolean isKnockout()
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
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()
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.
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)
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)
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.
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
Usage
CSBoundingBoxCollector bbCollector = new CSBoundingBoxCollector(); CSDeviceBasedInterpreter
interpreter = new CSDeviceBasedInterpreter(null, bbCollector); interpreter.process(content,
getResources()); if (bbCollector.getBoundingBox() != null) { ... }ATTENTION: The
CSBoundingBoxCollector does not take care of text yet !!
Constructor Summary
public CSBoundingBoxCollector()
Method Summary
java.awt.geom.Rectang getBoundingBox()
le2D
The bounding box containing all graphics artifacts stemming from operations in the content
stream processed.
void restoreState()
void saveState()
Constructors
CSBoundingBoxCollector
public CSBoundingBoxCollector()
Methods
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)
de.intarsys.pdf.content.common
Class CSContentTools
java.lang.Object
|
+-de.intarsys.pdf.content.common.CSContentTools
Constructor Summary
public CSContentTools()
Method Summary
static getBoundingBoxClipped(PDPage page, double border)
java.awt.geom.Rectang
le2D Get the rectangle containing all graphics artifacts on the page (stemming from the content
stream).
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).
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).
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
An implementation helping to create a PDF content stream using higher level abstractions than the PDF operators.
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
Value: 3
Value: 3
Value: 2
Value: 4
Value: 3
Value: 2
Value: 3
Value: 3
Method Summary
void close()
void compatibilityBegin()
void compatibilityEnd()
void flush()
Flush all pending operations on the stream.
CSContent getContent()
The CSContent we are working on.
IContentStreamProvide getContentStreamProvider()
r
IResourcesProvider getResourcesProvider()
The IResourcesProvider associated with this.
void markedContentEnd()
void pathClipEvenOdd()
void pathClipNonZero()
void pathClose()
void pathCloseFillStrokeEvenOdd()
void pathCloseFillStrokeNonZero()
void pathCloseStroke()
void pathEnd()
void pathFillEvenOdd()
void pathFillNonZero()
void pathFillStrokeEvenOdd()
void pathFillStrokeNonZero()
void pathStroke()
void penCurveToC(float x1, float y1, float x2, float y2, float x3, float y3)
void restoreState()
void saveState()
void setLineWidth(float w)
void textBegin()
void textEnd()
void textLineNew()
Fields
KAPPA
public static final float KAPPA
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
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
open
public void open(ICSInterpreter pInterpreter)
compatibilityBegin
public void compatibilityBegin()
compatibilityEnd
public void compatibilityEnd()
copy
public void copy(CSContent 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()
close
public void close()
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()
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)
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()
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)
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)
Parameters:
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)
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)
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()
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.
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)
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)
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)
transform
public void transform(float a,
float b,
float c,
float d,
float e,
float f)
getContentStreamProvider
public IContentStreamProvider getContentStreamProvider()
de.intarsys.pdf.content.common
Class CSDeviceTools
java.lang.Object
|
+-de.intarsys.pdf.content.common.CSDeviceTools
Constructor Summary
public CSDeviceTools()
Method Summary
static void setNonStrokeColor(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)
de.intarsys.pdf.content.common
Class CSPrettyPrinter
java.lang.Object
|
+-de.intarsys.pdf.content.common.CSPrettyPrinter
Constructor Summary
public CSPrettyPrinter()
Method Summary
String getValue()
boolean isCreateComment()
boolean isCreateIndent()
boolean isCreateLineSeparator()
Constructors
CSPrettyPrinter
public CSPrettyPrinter()
Methods
getValue
public String getValue()
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)
Every PDF document is finally composed using COS primitive and composite objects. These objects are aggregated to a
COSDocument. The available primitives are
• 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.
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
Using the standard access methods, always "dereferenced" COSObject instances are returned. Use the "basic" falvor of methods to
access the optional COSIndirectObject.
Method Summary
Object accept(ICOSObjectVisitor visitor)
COSArray asArray()
java.util.Iterator basicIterator()
An iterator that returns all contained COSDocumentElement instances without
dereferencing.
void clear()
Remove all elements from this.
COSObject copyShallow()
boolean equals(Object o)
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
boolean isEmpty()
true if this.size() == 0.
java.util.Iterator iterator()
Object saveState()
int size()
The number of elements in this.
Methods
create
public static COSArray create()
Returns:
Create an empty COSArray.
create
public static COSArray create(int size)
Returns:
Create an empty COSArray.
createWith
public static COSArray createWith(float a,
float b,
float c,
float d)
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)
Parameters:
a
b
c
d
e
f
Returns:
a new COSArray
getObjects
public java.util.List getObjects()
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)
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)
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)
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.
basicGet
public COSDocumentElement basicGet(int index)
Get the COSDocumentElement (an object or a reference) from this at the specified index.
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()
Returns:
An iterator that returns all contained COSDocumentElement instances without dereferencing.
clear
public void clear()
copyShallow
public COSObject copyShallow()
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.
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)
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.
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)
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.
remove
public COSObject remove(int index)
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)
Parameters:
i - The index
object - The object to put at the specified index
Returns:
The previuosly referenced object
size
public int size()
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).
Be careful when copying objects, as there are semantics that may NOT be recognized by this method.
restoreState
public void restoreState(Object object)
saveState
public Object saveState()
asArray
public COSArray asArray()
de.intarsys.pdf.cos
Class COSBasedObject
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
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.
Field Summary
public static final META
The meta class instance
Method Summary
void changed(COSObject pObject, Object slot, Object oldValue, Object
newValue)
COSArray cosGetArray()
Get the base object as a COSArray.
COSDictionary cosGetDict()
Get the base object as a COSDictionary.
COSDocument cosGetDoc()
The COSDocument for this.
COSObject cosGetObject()
The base COSObject for this.
COSStream cosGetStream()
Get the base object as a COSStream.
void invalidateCaches()
Invalidate all local caches as the base object may have changed.
String toString()
Fields
META
public static final de.intarsys.pdf.cos.COSBasedObject.MetaClass META
Methods
changed
public void changed(COSObject pObject,
Object slot,
Object oldValue,
Object newValue)
cosGetArray
public COSArray cosGetArray()
Returns:
Get the base object as a COSArray.
cosGetDict
public COSDictionary cosGetDict()
Returns:
Get the base object as a COSDictionary.
cosGetDoc
public COSDocument cosGetDoc()
Returns:
The COSDocument for this.
cosGetField
public COSObject cosGetField(COSName name)
Parameters:
name - The COSDictionary field to read
Returns:
The COSObject associated with name in the receiver or COSNull.
cosGetObject
public COSObject cosGetObject()
Returns:
The base COSObject for this.
cosGetStream
public COSStream cosGetStream()
Returns:
Get the base object as a COSStream.
cosHasField
public boolean cosHasField(COSName name)
Parameters:
Returns:
Answer true if this has a field named name.
cosRemoveField
public COSObject cosRemoveField(COSName name)
Parameters:
name - the field to remove from the receiver
Returns:
The previously associated object is returned.
cosSetField
public COSObject cosSetField(COSName name,
COSObject cosObj)
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.
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
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.
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.
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.
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.
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 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.
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.
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)
Parameters:
name - The name of the field.
value - The new value of the field.
setFieldFixed
public void setFieldFixed(COSName name,
float value)
Parameters:
name - The name of the field.
value - The new value of the field.
setFieldInt
public void setFieldInt(COSName name,
int value)
Parameters:
name - The name of the field.
value - The new value of the field.
setFieldMLString
public void setFieldMLString(COSName name,
String value)
Parameters:
name - The name of the field.
value - The new value of the field.
setFieldName
public void setFieldName(COSName name,
String value)
Parameters:
name - The name of the field.
value - The new value of the field.
setFieldString
public void setFieldString(COSName name,
String value)
Parameters:
name - The name of the field.
value - The new value of the field.
setFieldObject
public void setFieldObject(COSName name,
COSBasedObject value)
Parameters:
name - The name of the field.
value - The new value of the field.
toString
public String toString()
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
Method Summary
COSBasedObject createFromCos(COSObject object)
COSBasedObject createNew()
Methods
createFromCos
public COSBasedObject createFromCos(COSObject object)
createNew
public COSBasedObject createNew()
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
Field Summary
public static final FALSE
Method Summary
Object accept(ICOSObjectVisitor visitor)
COSBoolean asBoolean()
Fields
TRUE
public static final de.intarsys.pdf.cos.COSBoolean TRUE
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()
Returns:
The boolean value for this.
asBoolean
public COSBoolean asBoolean()
de.intarsys.pdf.cos
Class COSCatalog
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.cos.COSCatalog
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
Field Summary
public static final CN_Type_Catalog
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.
String getPageMode()
The /PageMode field in the document catalog.
String getVersion()
The /Version field in the document catalog.
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
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
META
public static final de.intarsys.pdf.cos.COSCatalog.MetaClass META
Methods
cosGetDests
public COSDictionary cosGetDests()
Returns:
The /Dests field in the document catalog.
cosGetFDF
public COSDictionary cosGetFDF()
Returns:
The /FDF field in the document catalog.
cosGetNames
public COSDictionary cosGetNames()
Returns:
The /Names field in the document catalog.
cosSetNames
public COSDictionary cosSetNames(COSDictionary pNames)
cosGetOpenAction
public COSObject cosGetOpenAction()
Returns:
COSDictionary or COSArray or COSNull if no entry defined.
cosGetOutline
public COSDictionary cosGetOutline()
Returns:
The /Outlines field in the document catalog.
cosGetSig
public COSDictionary cosGetSig()
Returns:
cosSetFDF
public COSDictionary cosSetFDF(COSDictionary fdfDict)
cosSetOutline
public COSDictionary cosSetOutline(COSDictionary dict)
cosSetSig
public COSDictionary cosSetSig(COSDictionary sigDict)
getPageMode
public String getPageMode()
Returns:
The /PageMode field in the document catalog.
getVersion
public String getVersion()
Returns:
The /Version field in the document catalog.
setPageMode
public void setPageMode(String value)
setVersion
public void setVersion(String value)
cosSetDests
public COSDictionary cosSetDests(COSDictionary pDests)
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
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
Method Summary
void addObjectListener(ICOSObjectListener listener)
COSObject copyDeep()
boolean isObjectListenerAvailable()
boolean isPrimitive()
int referenceCount()
ICOSContainer saveStateContainer()
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()
getAttribute
public Object getAttribute(Object key)
removeAttribute
public Object removeAttribute(Object key)
addObjectListener
public void addObjectListener(ICOSObjectListener listener)
isObjectListenerAvailable
public boolean isObjectListenerAvailable()
removeObjectListener
public void removeObjectListener(ICOSObjectListener listener)
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).
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).
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)
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
The keys of the association are COSName objects, the value may be any COSDocumentElement
Method Summary
Object accept(ICOSObjectVisitor visitor)
COSDictionary asDictionary()
java.util.Iterator basicEntryIterator()
An iterator over all entries.
java.util.Iterator basicIterator()
An iterator over all values.
void clear()
Remove all associations from the receiver.
COSObject copyShallow()
java.util.Iterator entryIterator()
An iterator over all entries, returning dereferenced entries ( COSObject).
java.util.Iterator iterator()
java.util.Set keySet()
The set of keys.
Object saveState()
int size()
The number of elements in this.
java.util.List values()
A list of COSObject instances within this.
Methods
create
public static COSDictionary create()
Returns:
Create an empty COSDictionary.
create
public static COSDictionary create(int size)
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)
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)
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()
containsKey
public boolean containsKey(COSName key)
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)
Parameters:
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).
Be careful when copying objects, as there are semantics that may NOT be recognized by this method.
copyShallow
public COSObject copyShallow()
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()
Returns:
An interator over all entries, returning dereferenced entries.
get
public COSObject get(COSName 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.
keyOf
public COSObject keyOf(COSObject obj)
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()
Returns:
The set of keys .
put
public COSObject put(COSName key,
COSObject object)
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)
Parameters:
key - The key of the object to remove
Returns:
restoreState
public void restoreState(Object object)
saveState
public Object saveState()
size
public int size()
Returns:
The number of elements in this.
values
public java.util.List values()
Returns:
A list of COSObject instances within this.
de.intarsys.pdf.cos
Class COSDictionary.Entry
java.lang.Object
|
+-de.intarsys.pdf.cos.COSDictionary.Entry
All Implemented Interfaces:
java.util.Map.Entry
Constructor Summary
public COSDictionary.Entry(COSName key, COSDocumentElement value)
Method Summary
Object getKey()
Object getValue()
Constructors
COSDictionary.Entry
public COSDictionary.Entry(COSName key,
COSDocumentElement value)
Methods
getKey
public Object getKey()
getValue
public Object getValue()
setValue
public Object setValue(Object newValue)
de.intarsys.pdf.cos
Class COSDocument
java.lang.Object
|
+-de.intarsys.pdf.cos.COSDocument
All Implemented Interfaces:
ILocatorSupport, IAttributeSupport, ICOSExceptionHandler, ICOSContainer
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.
Field Summary
public static final SLOT_DIRTY
Method Summary
void add(COSDocumentElement element)
This should not be used by the application programmer.
void close()
Close the document.
COSDocument copyDeep()
Make a deep copy of the receiver.
IAccessPermissions getAccessPermissions()
If a document contains a permissions dictionary, it is "pushed" to this by the parser.
COSCatalog getCatalog()
Get the root object (the catalog) for the document.
COSDocument getDoc()
This method should not be used by the application programmer.
int getIncrementalCount()
The number of versions created for this document so far.
COSInfoDict getInfoDict()
Get the info dictionary containing metadata.
ILocator getLocator()
The ILocator for this document.
String getName()
The document name.
EnumWriteMode getWriteModeHint()
The write mode to be used when the document is written the next time.
boolean isDirty()
Answer true if the document has changes to be commited.
boolean isEncrypted()
Answer true if the document is encrypted.
boolean isNew()
Answer true if the document is new, i.e. not yet written.
boolean isReadOnly()
Answer true if the document is read only.
java.util.Iterator objects()
An iterator on all COSObject instances of this that are managed as indirect objects in the
storage layer.
int referenceCount()
This method should not be used by the application programmer.
void save()
Save the document to its current ILocator.
ICOSContainer saveStateContainer()
This method should not be used by the application programmer.
STDocument stGetDoc()
The storage layer document.
void triggerChangedAll()
This method should not be used by the application programmer.
Fields
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
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
Parameters:
doc - The storage layer document.
Returns:
A new COSDocument.
Throws:
COSLoadException
createNew
public static COSDocument createNew()
Returns:
A new empty pdf COSDocument
createNew
public static COSDocument createNew(STDocType docType)
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)
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
Throws:
IOException
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()
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.
getIncrementalCount
public int getIncrementalCount()
Returns:
The number of versions created for this document so far.
getInfoDict
public COSInfoDict getInfoDict()
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()
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()
Returns:
Answer true if the document has changes to be commited.
isEncrypted
public boolean isEncrypted()
Returns:
Answer true if the document is encrypted.
isNew
public boolean isNew()
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.
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
Throws:
IOException
save
public void save(ILocator locator)
throws java.io.IOException
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)
Parameters:
infoDict - The info dictionary containing metadata.
setName
public void setName(String name)
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()
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.
de.intarsys.pdf.cos
Class COSDocumentElement
java.lang.Object
|
+-de.intarsys.pdf.cos.COSDocumentElement
All Implemented Interfaces:
ICOSExceptionHandler
This is a cos level representation of the elements that may be contained in a cos container. An element may be either a COSObject
or a COSIndirectObject to a COSObject. A COSIndirectObject is never seen by an application level programmer, this is an
internal construct only.
Method Summary
abstract Object accept(ICOSObjectVisitor visitor)
Accept a visitor object.
abstract containable()
COSDocumentElement
The COSDocumentElement suitable for use in an ICOSContainer.
boolean isReference()
Answer true if this element is a reference (a COSIndirectObject.
boolean isSwapped()
Answer true if this elements content is swapped to a persistent store.
Methods
isReference
public boolean isReference()
Returns:
Answer true if this element is a reference.
isSwapped
public boolean isSwapped()
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
de.intarsys.pdf.cos
Class COSDocumentFactory
java.lang.Object
|
+-de.intarsys.pdf.cos.COSDocumentFactory
Constructor Summary
public COSDocumentFactory()
Method Summary
static get()
ICOSDocumentFactory
Constructors
COSDocumentFactory
public COSDocumentFactory()
Methods
get
public static ICOSDocumentFactory get()
set
public static void set(ICOSDocumentFactory factory)
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
Method Summary
boolean booleanValue()
boolean equals(Object o)
int hashCode()
Returns an arbitrary number to avoid collisions
Object saveState()
Methods
create
public static COSFalse create()
booleanValue
public boolean booleanValue()
equals
public boolean equals(Object o)
hashCode
public int hashCode()
Returns:
17
See Also:
Object.hashCode()
saveState
public Object saveState()
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
Field Summary
public static final DEFAULT_PRECISION
Value: 5
Method Summary
Object accept(ICOSObjectVisitor visitor)
COSFixed asFixed()
boolean equals(Object o)
float floatValue()
int getPrecision()
The precision (digits after period) for this.
int hashCode()
int intValue()
Object saveState()
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)
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()
getPrecision
public int getPrecision()
Returns:
The precision (digits after period) for this.
hashCode
public int hashCode()
intValue
public int intValue()
restoreState
public void restoreState(Object object)
saveState
public Object saveState()
setPrecision
public void setPrecision(int precision)
Parameters:
precision - The new precision.
de.intarsys.pdf.cos
Class COSIndirectObject
java.lang.Object
|
+-de.intarsys.pdf.cos.COSDocumentElement
|
+-de.intarsys.pdf.cos.COSIndirectObject
All Implemented Interfaces:
ICOSContainer, ICOSExceptionHandler
Actually you should not override equals or hash without really knowing what you do. Portions of the implementation depend on
indirect objects being real unique.
Method Summary
Object accept(ICOSObjectVisitor visitor)
COSDocumentElement containable()
COSObject dereference()
COSDocument getDoc()
COSObjectKey getKey()
The key for this.
COSObject getObject()
The object represented by this.
boolean isDirty()
true if the object graph referenced by this is changed.
boolean isEncryptOnWrite()
boolean isReference()
boolean isSwapped()
int referenceCount()
ICOSContainer saveStateContainer()
STDocument stGetDoc()
The ST level document.
String toString()
Methods
create
public static COSIndirectObject create(STDocument stDoc,
COSObjectKey key)
create
public static COSIndirectObject create(COSObject object)
Parameters:
object - The object that should be indirect.
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()
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()
Returns:
The object represented by this.
isReference
public boolean isReference()
willChange
public void willChange(COSObject change)
setDirty
public void setDirty(boolean pDirty)
isDirty
public boolean isDirty()
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()
toString
public String toString()
register
public void register(COSDocumentElement pObject)
setKey
public void setKey(COSObjectKey key)
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;
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()
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.
containable
public COSDocumentElement containable(COSObject pObject)
referenceCount
public int referenceCount()
saveStateContainer
public ICOSContainer saveStateContainer()
restoreStateContainer
public ICOSContainer restoreStateContainer(ICOSContainer container)
de.intarsys.pdf.cos
Class COSInfoDict
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.cos.COSInfoDict
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
Field Summary
public static final DK_Author
Method Summary
String getAuthor()
The /Author field in the info dictionary.
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.
Fields
DK_CreationDate
public static final de.intarsys.pdf.cos.COSName DK_CreationDate
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
META
public static final de.intarsys.pdf.cos.COSInfoDict.MetaClass META
Methods
getAuthor
public String getAuthor()
getCreationDate
public CDSDate getCreationDate()
getCreationDateString
public String getCreationDateString()
getCreator
public String getCreator()
getKeywords
public String getKeywords()
getModDate
public CDSDate getModDate()
getModDateString
public String getModDateString()
getProducer
public String getProducer()
getSubject
public String getSubject()
getTitle
public String getTitle()
getTrapped
public String getTrapped()
setAuthor
public void setAuthor(String value)
setCreationDate
public void setCreationDate(String value)
setCreator
public void setCreator(String value)
setKeywords
public void setKeywords(String value)
setModDate
public void setModDate(String value)
setProducer
public void setProducer(String value)
setSubject
public void setSubject(String value)
setTitle
public void setTitle(String value)
setTrapped
public void setTrapped(String value)
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
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
Method Summary
Object accept(ICOSObjectVisitor visitor)
COSInteger asInteger()
boolean equals(Object o)
float floatValue()
int hashCode()
int intValue()
Object saveState()
Methods
create
public static COSInteger create(byte[] bytes,
int start,
int length)
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()
hashCode
public int hashCode()
intValue
public int intValue()
saveState
public Object saveState()
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
A name object.
Method Summary
Object accept(ICOSObjectVisitor visitor)
COSName asName()
byte[] byteValue()
The bytes that make up this name (without "/")
boolean equals(Object o)
int hashCode()
Object saveState()
String stringValue()
The string value that makes up this name (without "/")
Methods
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()
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)
saveState
public Object saveState()
stringValue
public String stringValue()
Returns:
The string value that makes up this name (without "/")
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
Field Summary
public static final NULL
Method Summary
Object accept(ICOSObjectVisitor visitor)
boolean equals(Object o)
int hashCode()
boolean isNull()
Object saveState()
Fields
NULL
public static final de.intarsys.pdf.cos.COSNull NULL
Methods
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()
saveState
public Object saveState()
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
Method Summary
COSNumber asNumber()
boolean isNumber()
Methods
asNumber
public COSNumber asNumber()
floatValue
public abstract float floatValue()
Returns:
Answer the value of the receiver as a float
intValue
public abstract int intValue()
Returns:
Answer the value of the receiver as a int
isNumber
public boolean isNumber()
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
Field Summary
public static final CONSTANT_CONTAINER
This is the container for template objects.
Method Summary
abstract void addObjectListener(ICOSObjectListener listener)
Add a listener for object changes.
COSArray asArray()
this as a COSArray or null
COSBoolean asBoolean()
COSDictionary asDictionary()
COSFixed asFixed()
COSInteger asInteger()
COSName asName()
COSNull asNull()
COSNumber asNumber()
COSStream asStream()
COSString asString()
abstract basicIterator()
java.util.Iterator
An iterator over contained objects and references.
COSObject beConstant()
Declare this to be a constant.
COSIndirectObject beIndirect()
Make an indirect object out of a direct one.
COSDocumentElement containable()
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
boolean isSwapped()
abstract iterator()
java.util.Iterator
An iterator over contained objects.
String stringValue()
A string representation for the receiver.
String toString()
Fields
CONSTANT_CONTAINER
public static final de.intarsys.pdf.cos.ICOSContainer CONSTANT_CONTAINER
This is the container for template objects. Template objects can be created static in the application and are copied behind
the scenes when integrated in a document.
NULL_CONTAINER
public static final de.intarsys.pdf.cos.ICOSContainer NULL_CONTAINER
SLOT_CONTAINER
public static final java.lang.Object SLOT_CONTAINER
Methods
addObjectListener
public abstract void addObjectListener(ICOSObjectListener listener)
Parameters:
listener - The listener to be informed about changes.
isObjectListenerAvailable
public abstract boolean isObjectListenerAvailable()
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.
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).
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)
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).
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()
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()
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.
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.
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()
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()
Returns:
true if this object is an indirect one.
isNull
public boolean isNull()
Returns:
true if receiver is the null object
isNumber
public boolean isNumber()
Returns:
answer true if receiver is a number
isPrimitive
public abstract boolean isPrimitive()
Returns:
Answer true if this object is of a primitive type
isSwapped
public boolean isSwapped()
iterator
public abstract java.util.Iterator iterator()
An iterator over contained objects. The iterator is an empty iterator if this is not a container.
Returns:
Iterator over contained objects.
removeObjectListener
public abstract void removeObjectListener(ICOSObjectListener listener)
Parameters:
listener - The listener to be removed.
restoreState
public void restoreState(Object saveState)
stringValue
public String stringValue()
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
asInteger
public COSInteger asInteger()
Returns:
a COSInteger or null
asNumber
public COSNumber asNumber()
Returns:
a COSNumber or null
asArray
public COSArray asArray()
Returns:
a COSArray or null
asDictionary
public COSDictionary asDictionary()
Returns:
a COSDictionary or null
asStream
public COSStream asStream()
Returns:
a COSStream or null
de.intarsys.pdf.cos
Class COSObjectKey
java.lang.Object
|
+-de.intarsys.pdf.cos.COSObjectKey
Constructor Summary
public COSObjectKey(int objectNumber, int generationNumber)
Method Summary
COSObjectKey createNextKey()
The next key after this.
int getGenerationNumber()
The keys generation number.
int getObjectNumber()
The keys object number.
int hashCode()
String toString()
Constructors
COSObjectKey
public COSObjectKey(int objectNumber,
int generationNumber)
Methods
createNextKey
public COSObjectKey createNextKey()
Returns:
equals
public boolean equals(Object obj)
getGenerationNumber
public int getGenerationNumber()
Returns:
The keys generation number.
getObjectNumber
public int getObjectNumber()
Returns:
The keys object number.
hashCode
public int hashCode()
toString
public String toString()
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
A "proxy object" used to intercept the visitor callback from the serializer.
Constructor Summary
public COSObjectProxy()
Create a COSObjectProxy
Method Summary
Object accept(ICOSObjectVisitor visitor)
java.util.Iterator basicIterator()
COSObject copyShallow()
COSObject dereference()
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()
Object saveState()
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.
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).
Be careful when copying objects, as there are semantics that may NOT be recognized by this method.
copyShallow
public COSObject copyShallow()
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()
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.
reserveData
public void reserveData(int pLength)
Parameters:
pLength - Number of bytes to be reserved.
saveState
public Object saveState()
setPosition
public void setPosition(long position)
Parameters:
position - The position within the data stream.
de.intarsys.pdf.cos
Class COSObjectWalkerDeep
java.lang.Object
|
+-de.intarsys.pdf.cos.COSObjectWalkerShallow
|
+-de.intarsys.pdf.cos.COSObjectWalkerDeep
All Implemented Interfaces:
ICOSObjectVisitor
Adapter implementation for visiting a COS object structure, including indirect references.
Every object in the potential cyclic data structure is visited exactly once.
Constructor Summary
public COSObjectWalkerDeep()
Method Summary
java.util.Set getVisited()
Constructors
COSObjectWalkerDeep
public COSObjectWalkerDeep()
COSObjectWalkerDeep
public COSObjectWalkerDeep(boolean swap)
Methods
getVisited
public java.util.Set getVisited()
visitFromIndirectObject
public Object visitFromIndirectObject(COSIndirectObject io)
throws COSVisitorException
de.intarsys.pdf.cos
Class COSObjectWalkerShallow
java.lang.Object
|
+-de.intarsys.pdf.cos.COSObjectWalkerShallow
All Implemented Interfaces:
ICOSObjectVisitor
Adapter implementation for visiting a COS object structure without navigating the indirect references.
More precise, this one will visit the directed acyclic data structure originating from a COS object.
Constructor Summary
public COSObjectWalkerShallow()
Method Summary
Object visitFromArray(COSArray array)
Constructors
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
visitFromStream
public Object visitFromStream(COSStream stream)
throws COSVisitorException
visitFromString
public Object visitFromString(COSString string)
throws COSVisitorException
visitFromIndirectObject
public Object visitFromIndirectObject(COSIndirectObject io)
throws COSVisitorException
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
Primitive COS datatypes. These objects are "immutable" in their PDF semantics. The container may change!
Method Summary
void addObjectListener(ICOSObjectListener listener)
java.util.Iterator basicIterator()
COSObject copyDeep()
boolean isDangling()
boolean isObjectListenerAvailable()
boolean isPrimitive()
java.util.Iterator iterator()
Methods
addObjectListener
public void addObjectListener(ICOSObjectListener listener)
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.
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).
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).
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()
iterator
public java.util.Iterator iterator()
An iterator over contained objects. The iterator is an empty iterator if this is not a container.
removeObjectListener
public void removeObjectListener(ICOSObjectListener listener)
isObjectListenerAvailable
public boolean isObjectListenerAvailable()
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
Constructor Summary
public COSRuntimeException()
Constructors
COSRuntimeException
public COSRuntimeException()
COSRuntimeException
public COSRuntimeException(String message,
Throwable cause)
COSRuntimeException
public COSRuntimeException(String message)
COSRuntimeException
public COSRuntimeException(Throwable cause)
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
An object representing stream data in a PDF document. Unlike a string, stream data is not restricted in length. Stream data may be
encoded with the filter implementation.
Field Summary
public static final DK_DecodeParms
Method Summary
Object accept(ICOSObjectVisitor visitor)
COSStream asStream()
java.util.Iterator basicIterator()
COSStream copyDecodeFirst()
A copy of this, bytes decoded.
COSObject copyShallow()
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.
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.
COSDictionary getFirstDecodeParam()
A dictionary with filter options or the first element of an array of such dictionaries for each
filter.
COSName getFirstFilter()
The filter or the first element of the collection of filters for the stream.
int getLength()
The length of the filtered content
boolean isExternal()
true if the stream dictionary contains the F key.
java.util.Iterator iterator()
void removeFilters()
Remove all filters from this.
Object saveState()
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
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)
Parameters:
dict - An optional dictionary to be used as the streams dictionary.
Returns:
Create a new COSStream.
getDecodeParams
public static COSObject getDecodeParams(COSDictionary dict)
Returns:
getDecodeParams
public static COSDictionary getDecodeParams(COSDictionary dict,
COSName name)
Returns:
The options corresponding to the first occurence of the filter name.
getFilters
public static COSObject getFilters(COSDictionary dict)
Returns:
The filter or the collection of filters for the stream.
hasFilter
public static boolean hasFilter(COSDictionary dict,
COSName 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)
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)
Parameters:
name - The logical naem of the filter.
addObjectListener
public void addObjectListener(ICOSObjectListener listener)
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.
basicSetDecodedBytes
public void basicSetDecodedBytes(byte[] newBytes)
Parameters:
newBytes - the logical content for the stream
basicSetEncodedBytes
public void basicSetEncodedBytes(byte[] newBytes)
Parameters:
newBytes - the physical content for the stream
copyDecodeFirst
public COSStream copyDecodeFirst()
throws java.io.IOException
Returns:
A copy of this, bytes decoded.
Throws:
IOException
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).
Be careful when copying objects, as there are semantics that may NOT be recognized by this method.
copyShallow
public COSObject copyShallow()
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()
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()
Returns:
getDecodeParams
public COSObject getDecodeParams(COSName name)
Returns:
The options corresponding to the first occurence of the filter name.
getDict
public COSDictionary getDict()
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()
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.
getLength
public int getLength()
Returns:
The length of the filtered content
hasFilter
public boolean hasFilter(COSName name)
Parameters:
name - The name of the filter.
Returns:
true if the stream hs declared a filter name.
isExternal
public boolean isExternal()
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.
removeFilters
public void removeFilters()
removeObjectListener
public void removeObjectListener(ICOSObjectListener listener)
restoreState
public void restoreState(Object object)
saveState
public Object saveState()
setDecodedBytes
public void setDecodedBytes(byte[] newBytes)
Parameters:
newBytes - The logical content for the stream
setEncodedBytes
public void setEncodedBytes(byte[] newBytes)
Parameters:
newBytes - the physical content for the stream
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
Method Summary
Object accept(ICOSObjectVisitor visitor)
COSString asString()
byte[] byteValue()
The bytes that make up this string.
int compareTo(Object o)
boolean equals(Object o)
int hashCode()
String hexStringValue()
Show a hex encoded representation of the strings content.
boolean isHexMode()
true if this string has to be saved as hex representation
String multiLineStringValue()
A Java java.lang.String with correctly expanded newlines.
Object saveState()
String stringValue()
The Java java.lang.String representation of the receiver
Methods
create
public static COSString create(byte[] bytes)
Parameters:
bytes
Returns:
The new COSString
create
public static COSString create(String string)
Parameters:
string
Returns:
The new COSString
createHex
public static COSString createHex(byte[] bytes)
Parameters:
bytes
Returns:
The new COSString
createHex
public static COSString createHex(String string)
Parameters:
string
Returns:
The new COSString
createMultiLine
public static COSString createMultiLine(String string)
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()
Returns:
Show a hex encoded representation of the strings content.
byteValue
public byte[] byteValue()
Returns:
The bytes that make up this string.
compareTo
public int compareTo(Object o)
equals
public boolean equals(Object o)
hashCode
public int hashCode()
isHexMode
public boolean isHexMode()
Returns:
true if this string has to be saved as hex representation
multiLineStringValue
public String multiLineStringValue()
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)
Parameters:
newHexMode - true if this is written in hex representation
stringValue
public String stringValue()
Returns:
The Java java.lang.String representation of the receiver
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
Constructor Summary
public COSSwapException()
Constructors
COSSwapException
public COSSwapException()
COSSwapException
public COSSwapException(String message)
COSSwapException
public COSSwapException(Throwable cause)
COSSwapException
public COSSwapException(String message,
Throwable cause)
de.intarsys.pdf.cos
Class COSTools
java.lang.Object
|
+-de.intarsys.pdf.cos.COSTools
Method Summary
static COSObject createObject(Object javaObject)
Try the best in marshalling java objects directly to COSObject.
Methods
toDictionary
public static COSDictionary toDictionary(COSObject object)
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
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
de.intarsys.pdf.cos
Class COSTrailer
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.cos.COSTrailer
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
Field Summary
public static final DK_Encrypt
Method Summary
COSDictionary cosGetEncryption()
The /Encrypt field of the trailer.
COSArray cosGetID()
The /ID field of the trailer.
COSInfoDict getInfoDict()
The COSInfoDict containing metadata.
int getPrev()
COSCatalog getRoot()
Get the root object (the catalog) for the document.
int getSize()
void invalidateCaches()
void updateFileID()
Generates a unique file ID array (10.3).
Fields
DK_Info
public static final de.intarsys.pdf.cos.COSName DK_Info
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
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
Methods
setInfoDict
public void setInfoDict(COSInfoDict infoDict)
Parameters:
infoDict - The info dictionary containing metadata.
getInfoDict
public COSInfoDict getInfoDict()
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
setRoot
public void setRoot(COSCatalog root)
Parameters:
root - The document catalog
getRoot
public COSCatalog getRoot()
Returns:
The root object (the catalog) for the document.
cosGetID
public COSArray cosGetID()
Returns:
The /ID field of the trailer.
updateFileID
public void updateFileID()
cosSetEncryption
public void cosSetEncryption(COSDictionary encryption)
Parameters:
encryption - The new encryption dictionary
cosGetEncryption
public COSDictionary cosGetEncryption()
Returns:
The /Encrypt field of the trailer.
invalidateCaches
public void invalidateCaches()
Invalidate all local caches as the base object may have changed.
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
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
Method Summary
boolean booleanValue()
boolean equals(Object o)
int hashCode()
Returns an arbitrary number to avoid collisions
Object saveState()
Methods
create
public static COSTrue create()
booleanValue
public boolean booleanValue()
equals
public boolean equals(Object o)
hashCode
public int hashCode()
Returns:
19
See Also:
Object.hashCode()
saveState
public Object saveState()
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
Constructor Summary
public COSVisitorException()
Constructors
COSVisitorException
public COSVisitorException()
COSVisitorException
public COSVisitorException(String message,
Throwable cause)
COSVisitorException
public COSVisitorException(String message)
COSVisitorException
public COSVisitorException(Throwable cause)
de.intarsys.pdf.cos
Interface ICOSContainer
All Known Implementing Classes:
COSCompositeObject, COSDocument, COSIndirectObject
Method Summary
ICOSContainer associate(ICOSContainer newContainer, COSObject object)
It is the responsibility of the current container to create the association with the new one.
COSDocument getDoc()
The COSDocument instance where the ICOSContainer is contained.
int referenceCount()
The number of references to the contained object.
ICOSContainer saveStateContainer()
Create a save state for the container when saving the COSObject state.
Methods
associate
public ICOSContainer associate(ICOSContainer newContainer,
COSObject object)
It is the responsibility of the current container to create the association with the new one. The table shows the available
transitions | composite | indirect | | constant | n.a. | n.a. | (always copied before by
"containable") null | ok | ok | composite | error | ok | indirect | ok | ok |
Parameters:
newContainer
object
Returns:
The resulting ICOSContainer for object
disassociate
public ICOSContainer disassociate(ICOSContainer oldContainer,
COSObject object)
It is the responsibility of the current container to remove the association from the old one. The table shows the available
transitions.
| composite | indirect |
|
constant | n.a. | n.a. |
null | n.a. | n.a. |
composite | ok | n.a. |
indirect | ok | n.a. |
Parameters:
oldContainer
object
Returns:
The resulting ICOSContainer for object
containable
public COSDocumentElement containable(COSObject object)
The stand-in to be used when object should be contained in a container. This is either the object itself or the
COSIndirectObject to it.
Parameters:
object - THe object whose containable is requested.
Returns:
The stand-in to be used when object should be contained in a container.
getDoc
public COSDocument getDoc()
Returns:
The COSDocument instance where the ICOSContainer is contained.
willChange
public void willChange(COSObject object)
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)
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)
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.
de.intarsys.pdf.cos
Interface ICOSDocumentFactory
All Known Implementing Classes:
StandardDocumentFactory
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
de.intarsys.pdf.cos
Interface ICOSDocumentListener
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)
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.
de.intarsys.pdf.cos
Interface ICOSExceptionHandler
All Known Implementing Classes:
COSDocument, COSDocumentElement
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
Parameters:
ex - The exceptioin to be handeled.
Throws:
COSRuntimeException
de.intarsys.pdf.cos
Interface ICOSMonitor
Method Summary
void willChange(Object object)
Methods
willChange
public void willChange(Object object)
de.intarsys.pdf.cos
Interface ICOSObjectListener
All Known Implementing Classes:
COSBasedObject
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.
de.intarsys.pdf.cos
Interface ICOSObjectVisitor
All Known Implementing Classes:
COSWriter, COSObjectWalkerShallow
Method Summary
Object visitFromArray(COSArray array)
Notification of visit to COSArray object.
Methods
visitFromArray
public Object visitFromArray(COSArray array)
throws COSVisitorException
Parameters:
array - 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.
visitFromBoolean
public Object visitFromBoolean(COSBoolean bool)
throws COSVisitorException
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
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
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
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
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
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
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.
visitFromString
public Object visitFromString(COSString string)
throws COSVisitorException
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
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.
de.intarsys.pdf.cos
Interface ICOSProxyVisitor
All Known Implementing Classes:
COSWriter
Method Summary
Object visitFromProxy(COSObjectProxy obj)
Notification of visit to COSObjectProxy object.
Methods
visitFromProxy
public Object visitFromProxy(COSObjectProxy obj)
throws COSVisitorException
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.
de.intarsys.pdf.cos
Class MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
Direct Known Subclasses:
MetaClass
Constructor Summary
public MetaClass(Class instanceClass)
Method Summary
Class getInstanceClass()
Class getRootClass()
Constructors
MetaClass
public MetaClass(Class instanceClass)
Methods
getInstanceClass
public final Class getInstanceClass()
getRootClass
public Class getRootClass()
lookup
public static MetaClass lookup(Class clazz)
de.intarsys.pdf.cos
Class StandardDocumentFactory
java.lang.Object
|
+-de.intarsys.pdf.cos.StandardDocumentFactory
All Implemented Interfaces:
ICOSDocumentFactory
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
de.intarsys.pdf.crypt
Class AbstractAccessPermissions
java.lang.Object
|
+-de.intarsys.pdf.pd.AbstractBitFlags
|
+-de.intarsys.pdf.crypt.AbstractAccessPermissions
All Implemented Interfaces:
IAccessPermissions
These flags are defined for the standard security handlers, you can not rely on other handlers implementing the same logic.
Field Summary
public static Bit_Assemble
Constructor Summary
public AbstractAccessPermissions(StandardSecurityHandler handler)
Method Summary
StandardSecurityHandl getHandler()
er
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)
Methods
getHandler
public StandardSecurityHandler getHandler()
Returns:
handler for the encryption dictionary.
de.intarsys.pdf.crypt
Class AbstractCryptHandler
java.lang.Object
|
+-de.intarsys.pdf.crypt.AbstractCryptHandler
All Implemented Interfaces:
ICryptHandler
Constructor Summary
public AbstractCryptHandler()
Constructors
AbstractCryptHandler
public AbstractCryptHandler()
de.intarsys.pdf.crypt
Class AbstractSecurityHandler
java.lang.Object
|
+-de.intarsys.pdf.crypt.AbstractSecurityHandler
All Implemented Interfaces:
ISecurityHandler
Constructor Summary
public AbstractSecurityHandler()
Method Summary
COSEncryption getEncryption()
Constructors
AbstractSecurityHandler
public AbstractSecurityHandler()
Methods
getEncryption
public COSEncryption getEncryption()
init
public void init(STDocument document,
COSEncryption pEncryption)
throws COSSecurityException
de.intarsys.pdf.crypt
Class AccessPermissionsFull
java.lang.Object
|
+-de.intarsys.pdf.crypt.AccessPermissionsFull
All Implemented Interfaces:
IAccessPermissions
Method Summary
static getActive()
AccessPermissionsFull
boolean mayAssemble()
boolean mayCopy()
boolean mayExtract()
boolean mayFillForm()
boolean mayModify()
boolean mayModifyAnnotation()
boolean mayPrint()
boolean mayPrintHighQuality()
Methods
getActive
public static AccessPermissionsFull getActive()
mayAssemble
public final boolean mayAssemble()
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()
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
Constructor Summary
public AccessPermissionsR2(StandardSecurityHandler handler)
Method Summary
boolean mayAssemble()
boolean mayCopy()
boolean mayExtract()
boolean mayFillForm()
boolean mayModify()
boolean mayModifyAnnotation()
boolean mayPrint()
boolean mayPrintHighQuality()
Constructors
AccessPermissionsR2
public AccessPermissionsR2(StandardSecurityHandler handler)
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()
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
Constructor Summary
public AccessPermissionsR3(StandardSecurityHandler handler)
Method Summary
boolean mayAssemble()
boolean mayCopy()
boolean mayExtract()
boolean mayFillForm()
boolean mayModify()
boolean mayModifyAnnotation()
boolean mayPrint()
boolean mayPrintHighQuality()
Constructors
AccessPermissionsR3
public AccessPermissionsR3(StandardSecurityHandler handler)
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()
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
Field Summary
public static final CIPHER_ALGORITHM
Value: AES/CBC/PKCS5Padding
Value: MD5
Value: AES
Constructor Summary
public AESCryptHandler()
Method Summary
void init(byte[] pCryptKey)
Fields
KEY_ALGORITHM
public static final java.lang.String KEY_ALGORITHM
CIPHER_ALGORITHM
public static final java.lang.String CIPHER_ALGORITHM
DIGEST_ALGORITHM
public static final java.lang.String DIGEST_ALGORITHM
Constructors
AESCryptHandler
public AESCryptHandler()
Methods
init
public void init(byte[] pCryptKey)
throws COSSecurityException
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
Field Summary
public static final CIPHER_ALGORITHM
Value: RC4
Value: MD5
Value: RC4
Constructor Summary
public ArcFourCryptHandler()
Method Summary
void init(byte[] pCryptKey)
Fields
CIPHER_ALGORITHM
public static final java.lang.String CIPHER_ALGORITHM
KEY_ALGORITHM
public static final java.lang.String KEY_ALGORITHM
DIGEST_ALGORITHM
public static final java.lang.String DIGEST_ALGORITHM
Constructors
ArcFourCryptHandler
public ArcFourCryptHandler()
Methods
init
public void init(byte[] pCryptKey)
throws COSSecurityException
de.intarsys.pdf.crypt
Class COSEncryption
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.crypt.COSEncryption
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
This object contains the state information defining the context for the document encryption.
Field Summary
public static final CN_IDENTITY
Method Summary
COSDictionary getCryptFilterDict(COSName name)
COSName getCryptFilterNameFile()
COSName getCryptFilterNameStream()
COSName getCryptFilterNameString()
COSName getFilter()
int getLength()
The length of the encryption key, in bits.
int getVersion()
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
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
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()
getCryptFilterNameStream
public COSName getCryptFilterNameStream()
getCryptFilterNameFile
public COSName getCryptFilterNameFile()
getCryptFilterDict
public COSDictionary getCryptFilterDict(COSName name)
getVersion
public int getVersion()
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
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
Constructor Summary
public COSSecurityException()
Constructors
COSSecurityException
public COSSecurityException()
COSSecurityException
public COSSecurityException(String message)
COSSecurityException
public COSSecurityException(String message,
Throwable cause)
COSSecurityException
public COSSecurityException(Throwable cause)
de.intarsys.pdf.crypt
Interface IAccessPermissions
All Known Implementing Classes:
AbstractAccessPermissions, AccessPermissionsFull
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
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()
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()
Returns:
if the document may be printed
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
de.intarsys.pdf.crypt
Interface ICryptHandler
All Subinterfaces:
ISecurityHandler
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.
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.
Parameters:
key - of the object which provides the context
bytes - to decrypt
Returns:
the encrypted bytes
Throws:
COSSecurityException
de.intarsys.pdf.crypt
Class IdentityCryptHandler
java.lang.Object
|
+-de.intarsys.pdf.crypt.AbstractCryptHandler
|
+-de.intarsys.pdf.crypt.IdentityCryptHandler
All Implemented Interfaces:
ICryptHandler
Constructor Summary
public IdentityCryptHandler()
Method Summary
byte[] decrypt(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
de.intarsys.pdf.crypt
Interface ISecurityHandler
All Superinterfaces:
ICryptHandler
The security handler as defined in the PDF spec. This is the exchangeable behavior in the PDF security spec.
The ISystemSecurityHandler is asked for de/encryption, which is done by himself for the defined standard encryptions, using
ICryptHandler instances for RC4 and AES. These ICryptHandler instances are initialized using the encryption key provided
by this ISecurityHandler.
With /V 4 encryption, thhe application may ask for "transparent" de/encryption, in which case it is forwared to the installed
ISecurityHandler itself.
Method Summary
void authenticate(IPasswordProvider passwordProvider)
Perform an authentication of the current "user" on behalf of the information in the
encryption dictionary.
IAccessPermissions getAccessPermissions()
The access permissions encoded in the encryption object for the current document or null if
not applicable.
byte[] getCryptKey()
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()
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.
de.intarsys.pdf.crypt
Interface ISecurityHandlerFactory
All Known Implementing Classes:
StandardSecurityHandlerFactory
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
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
de.intarsys.pdf.crypt
Interface ISystemSecurityHandler
All Known Implementing Classes:
SystemSecurityHandler
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.
ISecurityHandler getSecurityHandler()
Methods
decryptString
public byte[] decryptString(COSObjectKey key,
byte[] bytes)
throws COSSecurityException
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
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
de.intarsys.pdf.crypt
Class PasswordProvider
java.lang.Object
|
+-de.intarsys.pdf.crypt.PasswordProvider
Method Summary
static get()
IPasswordProvider
Return the unique factory.
Methods
set
public static void set(IPasswordProvider unique)
Parameters:
unique - The new unique factory.
get
public static IPasswordProvider get()
Returns:
Return the unique factory.
de.intarsys.pdf.crypt
Class SecurityHandlerFactory
java.lang.Object
|
+-de.intarsys.pdf.crypt.SecurityHandlerFactory
Constructor Summary
public SecurityHandlerFactory()
Method Summary
static get()
ISecurityHandlerFacto
ry
Constructors
SecurityHandlerFactory
public SecurityHandlerFactory()
Methods
set
public static void set(ISecurityHandlerFactory active)
get
public static ISecurityHandlerFactory get()
de.intarsys.pdf.crypt
Class StandardCryptHandler
java.lang.Object
|
+-de.intarsys.pdf.crypt.AbstractCryptHandler
|
+-de.intarsys.pdf.crypt.StandardCryptHandler
All Implemented Interfaces:
ICryptHandler
An abstract superclass for the default implementation of ICryptHandler. The concrete implementations provide the standard
RC4 and AES algorithms.
Constructor Summary
public StandardCryptHandler()
Method Summary
byte[] decrypt(COSObjectKey objectKey, byte[] bytes)
Constructors
StandardCryptHandler
public StandardCryptHandler()
Methods
decrypt
public byte[] decrypt(COSObjectKey objectKey,
byte[] bytes)
throws COSSecurityException
init
public void init(byte[] pCryptKey)
throws COSSecurityException
encrypt
public byte[] encrypt(COSObjectKey objectKey,
byte[] bytes)
throws COSSecurityException
de.intarsys.pdf.crypt
Class StandardSecurityHandler
java.lang.Object
|
+-de.intarsys.pdf.crypt.AbstractSecurityHandler
|
+-de.intarsys.pdf.crypt.StandardSecurityHandler
All Implemented Interfaces:
ISecurityHandler
Field Summary
public static final DEFAULT_ACCESS_PERMISSIONS
The default value for the access permission flags.
Value: -4
Constructor Summary
public StandardSecurityHandler()
Method Summary
void authenticate(IPasswordProvider passwordProvider)
IAccessPermissions getAccessPermissions()
byte[] getCryptKey()
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
Constructors
StandardSecurityHandler
public StandardSecurityHandler()
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
de.intarsys.pdf.crypt
Class StandardSecurityHandlerFactory
java.lang.Object
|
+-de.intarsys.pdf.crypt.StandardSecurityHandlerFactory
All Implemented Interfaces:
ISecurityHandlerFactory
Field Summary
public static final CN_Standard
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
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
Field Summary
public static final CIPHER_ALGORITHM
Value: RC4
Value: MD5
Value: RC4
Constructor Summary
public StandardSecurityHandlerR2()
Fields
DIGEST_ALGORITHM
public static final java.lang.String DIGEST_ALGORITHM
KEY_ALGORITHM
public static final java.lang.String KEY_ALGORITHM
CIPHER_ALGORITHM
public static final java.lang.String CIPHER_ALGORITHM
Constructors
StandardSecurityHandlerR2
public StandardSecurityHandlerR2()
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
Field Summary
public static final CIPHER_ALGORITHM
Value: RC4
Value: MD5
Value: RC4
Constructor Summary
public StandardSecurityHandlerR3()
Fields
KEY_ALGORITHM
public static final java.lang.String KEY_ALGORITHM
CIPHER_ALGORITHM
public static final java.lang.String CIPHER_ALGORITHM
DIGEST_ALGORITHM
public static final java.lang.String DIGEST_ALGORITHM
Constructors
StandardSecurityHandlerR3
public StandardSecurityHandlerR3()
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
Field Summary
public static final CIPHER_ALGORITHM
Value: RC4
Value: MD5
Value: RC4
Constructor Summary
public StandardSecurityHandlerR4()
Fields
KEY_ALGORITHM
public static final java.lang.String KEY_ALGORITHM
CIPHER_ALGORITHM
public static final java.lang.String CIPHER_ALGORITHM
DIGEST_ALGORITHM
public static final java.lang.String DIGEST_ALGORITHM
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()
de.intarsys.pdf.crypt
Class SystemSecurityHandler
java.lang.Object
|
+-de.intarsys.pdf.crypt.SystemSecurityHandler
All Implemented Interfaces:
ISystemSecurityHandler
Method Summary
void authenticate(IPasswordProvider passwordProvider)
COSEncryption getEncryption()
ISecurityHandler getSecurityHandler()
Methods
create
public static ISystemSecurityHandler create(COSEncryption pEncryption)
getEncryption
public COSEncryption getEncryption()
getSecurityHandler
public ISecurityHandler getSecurityHandler()
init
public void init(STDocument document,
COSEncryption encryption)
throws COSSecurityException
authenticate
public void authenticate(IPasswordProvider passwordProvider)
throws COSSecurityException
de.intarsys.pdf.crypt
Class SystemSecurityHandlerV0
java.lang.Object
|
+-de.intarsys.pdf.crypt.SystemSecurityHandler
|
+-de.intarsys.pdf.crypt.SystemSecurityHandlerV0
All Implemented Interfaces:
ISystemSecurityHandler
Method Summary
byte[] decryptFile(COSObjectKey key, COSDictionary dict, 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
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
de.intarsys.pdf.crypt
Class SystemSecurityHandlerV1
java.lang.Object
|
+-de.intarsys.pdf.crypt.SystemSecurityHandler
|
+-de.intarsys.pdf.crypt.SystemSecurityHandlerV1
All Implemented Interfaces:
ISystemSecurityHandler
Method Summary
void authenticate(IPasswordProvider passwordProvider)
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
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
de.intarsys.pdf.crypt
Class SystemSecurityHandlerV2
java.lang.Object
|
+-de.intarsys.pdf.crypt.SystemSecurityHandler
|
+-de.intarsys.pdf.crypt.SystemSecurityHandlerV2
All Implemented Interfaces:
ISystemSecurityHandler
Method Summary
void authenticate(IPasswordProvider passwordProvider)
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
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
de.intarsys.pdf.crypt
Class SystemSecurityHandlerV3
java.lang.Object
|
+-de.intarsys.pdf.crypt.SystemSecurityHandler
|
+-de.intarsys.pdf.crypt.SystemSecurityHandlerV3
All Implemented Interfaces:
ISystemSecurityHandler
Method Summary
byte[] decryptFile(COSObjectKey key, COSDictionary dict, 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
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
de.intarsys.pdf.crypt
Class SystemSecurityHandlerV4
java.lang.Object
|
+-de.intarsys.pdf.crypt.SystemSecurityHandler
|
+-de.intarsys.pdf.crypt.SystemSecurityHandlerV4
All Implemented Interfaces:
ISystemSecurityHandler
Field Summary
public static final CN_AESV2
Method Summary
byte[] decryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes)
Fields
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
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
de.intarsys.pdf.encoding
Class CMapEncoding
java.lang.Object
|
+-de.intarsys.pdf.encoding.Encoding
|
+-de.intarsys.pdf.encoding.CMapEncoding
This is a "dummy" implementation for the CMap style encoding in a Type o font. You will not use this one to decode byte codes,
instead the CMap for the Type 0 font is used.
Constructor Summary
public CMapEncoding(COSName name)
Method Summary
int getByteCode(int unicode)
COSObject getCosObject()
String getName()
Constructors
CMapEncoding
public CMapEncoding(COSName name)
Methods
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)
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).
de.intarsys.pdf.encoding
Class Encoding
java.lang.Object
|
+-de.intarsys.pdf.encoding.Encoding
Direct Known Subclasses:
AFMEncoding, DifferenceEncoding, CMapEncoding, FontSpecificEncoding, MappedEncoding, SymbolEncoding
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".
If no encoding is found in the font implementation or the font dictionary, "StandardEncoding" is used.
Field Summary
public static final CN_MacRomanEncoding
Value: a
Value: A
Value: aacute
Value: Aacute
Value: acircumflex
Value: Acircumflex
Value: acute
Value: adieresis
Value: Adieresis
Value: ae
Value: AE
Value: agrave
Value: Agrave
Value: ampersand
Value: aring
Value: Aring
Value: asciicircum
Value: asciitilde
Value: asterisk
Value: at
Value: atilde
Value: Atilde
Value: b
Value: B
Value: backslash
Value: bar
Value: braceleft
Value: braceright
Value: bracketleft
Value: bracketright
Value: breve
Value: brokenbar
Value: bullet
Value: c
Value: C
Value: caron
Value: ccedilla
Value: Ccedilla
Value: cedilla
Value: cent
Value: circumflex
Value: colon
Value: comma
Value: copyright
Value: currency
Value: d
Value: D
Value: dagger
Value: daggerdbl
Value: degree
Value: dieresis
Value: divide
Value: dollar
Value: dotaccent
Value: dotlessi
Value: e
Value: E
Value: eacute
Value: Eacute
Value: ecircumflex
Value: Ecircumflex
Value: edieresis
Value: Edieresis
Value: egrave
Value: Egrave
Value: eight
Value: ellipsis
Value: emdash
Value: endash
Value: equal
Value: eth
Value: Eth
Value: Euro
Value: exclam
Value: exclamdown
Value: f
Value: F
Value: fi
Value: five
Value: fl
Value: florin
Value: four
Value: fraction
Value: g
Value: G
Value: germandbls
Value: grave
Value: greater
Value: guillemotleft
Value: guillemotright
Value: guilsinglleft
Value: guilsinglright
Value: h
Value: H
Value: hungarumlaut
Value: hyphen
Value: i
Value: I
Value: iacute
Value: Iacute
Value: icircumflex
Value: Icircumflex
Value: idieresis
Value: Idieresis
Value: igrave
Value: Igrave
Value: j
Value: J
Value: k
Value: K
Value: l
Value: L
Value: less
Value: logicalnot
Value: lslash
Value: Lslash
Value: m
Value: M
Value: macron
Value: minus
Value: mu
Value: multiply
Value: n
Value: N
Value: nine
Value: ntilde
Value: Ntilde
Value: numbersign
Value: o
Value: O
Value: oacute
Value: Oacute
Value: ocircumflex
Value: Ocircumflex
Value: odieresis
Value: Odieresis
Value: oe
Value: OE
Value: ogonek
Value: ograve
Value: Ograve
Value: one
Value: onehalf
Value: onequarter
Value: onesuperior
Value: ordfeminine
Value: ordmasculine
Value: oslash
Value: Oslash
Value: otilde
Value: Otilde
Value: p
Value: P
Value: paragraph
Value: parenleft
Value: parenright
Value: percent
Value: period
Value: periodcentered
Value: perthousand
Value: plus
Value: plusminus
Value: q
Value: Q
Value: question
Value: questiondown
Value: quotedbl
Value: quotedblbase
Value: quotedblleft
Value: quotedblright
Value: quoteleft
Value: quoteright
Value: quotesinglbase
Value: quotesingle
Value: r
Value: R
Value: registered
Value: ring
Value: s
Value: S
Value: scaron
Value: Scaron
Value: section
Value: semicolon
Value: seven
Value: six
Value: slash
Value: space
Value: sterling
Value: t
Value: T
Value: thorn
Value: Thorn
Value: three
Value: threequarters
Value: threesuperior
Value: tilde
Value: trademark
Value: two
Value: twosuperior
Value: u
Value: U
Value: uacute
Value: Uacute
Value: ucircumflex
Value: Ucircumflex
Value: udieresis
Value: Udieresis
Value: ugrave
Value: Ugrave
Value: underscore
Value: v
Value: V
Value: w
Value: W
Value: x
Value: X
Value: y
Value: Y
Value: yacute
Value: Yacute
Value: ydieresis
Value: Ydieresis
Value: yen
Value: z
Value: Z
Value: zcaron
Value: Zcaron
Value: zero
Constructor Summary
public Encoding()
Create a new Encoding
Method Summary
static Encoding create(COSName name)
"Create" one of the well known encodings.
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()
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
NAME_Aacute
public static final java.lang.String NAME_Aacute
NAME_acircumflex
public static final java.lang.String NAME_acircumflex
NAME_Acircumflex
public static final java.lang.String NAME_Acircumflex
NAME_acute
public static final java.lang.String NAME_acute
NAME_adieresis
public static final java.lang.String NAME_adieresis
NAME_Adieresis
public static final java.lang.String NAME_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
NAME_Agrave
public static final java.lang.String NAME_Agrave
NAME_ampersand
public static final java.lang.String NAME_ampersand
NAME_aring
public static final java.lang.String NAME_aring
NAME_Aring
public static final java.lang.String NAME_Aring
NAME_asciicircum
public static final java.lang.String NAME_asciicircum
NAME_asciitilde
public static final java.lang.String NAME_asciitilde
NAME_asterisk
public static final java.lang.String NAME_asterisk
NAME_at
public static final java.lang.String NAME_at
Constant value: at
NAME_atilde
public static final java.lang.String NAME_atilde
NAME_Atilde
public static final java.lang.String NAME_Atilde
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
NAME_bar
public static final java.lang.String NAME_bar
NAME_braceleft
public static final java.lang.String NAME_braceleft
NAME_braceright
public static final java.lang.String NAME_braceright
NAME_bracketleft
public static final java.lang.String NAME_bracketleft
NAME_bracketright
public static final java.lang.String NAME_bracketright
NAME_breve
public static final java.lang.String NAME_breve
NAME_brokenbar
public static final java.lang.String NAME_brokenbar
NAME_bullet
public static final java.lang.String NAME_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
NAME_ccedilla
public static final java.lang.String NAME_ccedilla
NAME_Ccedilla
public static final java.lang.String NAME_Ccedilla
NAME_cedilla
public static final java.lang.String NAME_cedilla
NAME_cent
public static final java.lang.String NAME_cent
NAME_circumflex
public static final java.lang.String NAME_circumflex
NAME_colon
public static final java.lang.String NAME_colon
NAME_comma
public static final java.lang.String NAME_comma
NAME_copyright
public static final java.lang.String NAME_copyright
NAME_currency
public static final java.lang.String NAME_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
NAME_dagger
public static final java.lang.String NAME_dagger
NAME_daggerdbl
public static final java.lang.String NAME_daggerdbl
NAME_degree
public static final java.lang.String NAME_degree
NAME_dieresis
public static final java.lang.String NAME_dieresis
NAME_divide
public static final java.lang.String NAME_divide
NAME_dollar
public static final java.lang.String NAME_dollar
NAME_dotaccent
public static final java.lang.String NAME_dotaccent
NAME_dotlessi
public static final java.lang.String NAME_dotlessi
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
NAME_Eacute
public static final java.lang.String NAME_Eacute
NAME_ecircumflex
public static final java.lang.String NAME_ecircumflex
NAME_Ecircumflex
public static final java.lang.String NAME_Ecircumflex
NAME_edieresis
public static final java.lang.String NAME_edieresis
NAME_Edieresis
public static final java.lang.String NAME_Edieresis
NAME_egrave
public static final java.lang.String NAME_egrave
NAME_Egrave
public static final java.lang.String NAME_Egrave
NAME_eight
public static final java.lang.String NAME_eight
NAME_ellipsis
public static final java.lang.String NAME_ellipsis
NAME_emdash
public static final java.lang.String NAME_emdash
NAME_endash
public static final java.lang.String NAME_endash
NAME_equal
public static final java.lang.String NAME_equal
NAME_eth
public static final java.lang.String NAME_eth
NAME_Eth
public static final java.lang.String NAME_Eth
NAME_Euro
public static final java.lang.String NAME_Euro
NAME_exclam
public static final java.lang.String NAME_exclam
NAME_exclamdown
public static final java.lang.String NAME_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
NAME_fl
public static final java.lang.String NAME_fl
Constant value: fl
NAME_florin
public static final java.lang.String NAME_florin
NAME_four
public static final java.lang.String NAME_four
NAME_fraction
public static final java.lang.String NAME_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
NAME_grave
public static final java.lang.String NAME_grave
NAME_greater
public static final java.lang.String NAME_greater
NAME_guillemotleft
public static final java.lang.String NAME_guillemotleft
NAME_guillemotright
public static final java.lang.String NAME_guillemotright
NAME_guilsinglleft
public static final java.lang.String NAME_guilsinglleft
NAME_guilsinglright
public static final java.lang.String NAME_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
NAME_hyphen
public static final java.lang.String NAME_hyphen
NAME_i
public static final java.lang.String NAME_i
Constant value: i
NAME_I
public static final java.lang.String NAME_I
Constant value: I
NAME_iacute
public static final java.lang.String NAME_iacute
NAME_Iacute
public static final java.lang.String NAME_Iacute
NAME_icircumflex
public static final java.lang.String NAME_icircumflex
NAME_Icircumflex
public static final java.lang.String NAME_Icircumflex
NAME_idieresis
public static final java.lang.String NAME_idieresis
NAME_Idieresis
public static final java.lang.String NAME_Idieresis
NAME_igrave
public static final java.lang.String NAME_igrave
NAME_Igrave
public static final java.lang.String NAME_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
NAME_logicalnot
public static final java.lang.String NAME_logicalnot
NAME_lslash
public static final java.lang.String NAME_lslash
NAME_Lslash
public static final java.lang.String NAME_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
NAME_minus
public static final java.lang.String NAME_minus
NAME_mu
public static final java.lang.String NAME_mu
Constant value: mu
NAME_multiply
public static final java.lang.String NAME_multiply
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
NAME_ntilde
public static final java.lang.String NAME_ntilde
NAME_Ntilde
public static final java.lang.String NAME_Ntilde
NAME_numbersign
public static final java.lang.String NAME_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
NAME_oacute
public static final java.lang.String NAME_oacute
NAME_Oacute
public static final java.lang.String NAME_Oacute
NAME_ocircumflex
public static final java.lang.String NAME_ocircumflex
NAME_Ocircumflex
public static final java.lang.String NAME_Ocircumflex
NAME_odieresis
public static final java.lang.String NAME_odieresis
NAME_Odieresis
public static final java.lang.String NAME_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
NAME_ograve
public static final java.lang.String NAME_ograve
NAME_Ograve
public static final java.lang.String NAME_Ograve
NAME_one
public static final java.lang.String NAME_one
NAME_onehalf
public static final java.lang.String NAME_onehalf
NAME_onequarter
public static final java.lang.String NAME_onequarter
NAME_onesuperior
public static final java.lang.String NAME_onesuperior
NAME_ordfeminine
public static final java.lang.String NAME_ordfeminine
NAME_ordmasculine
public static final java.lang.String NAME_ordmasculine
NAME_oslash
public static final java.lang.String NAME_oslash
NAME_Oslash
public static final java.lang.String NAME_Oslash
NAME_otilde
public static final java.lang.String NAME_otilde
NAME_Otilde
public static final java.lang.String NAME_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
NAME_parenleft
public static final java.lang.String NAME_parenleft
NAME_parenright
public static final java.lang.String NAME_parenright
NAME_percent
public static final java.lang.String NAME_percent
NAME_period
public static final java.lang.String NAME_period
NAME_periodcentered
public static final java.lang.String NAME_periodcentered
NAME_perthousand
public static final java.lang.String NAME_perthousand
NAME_plus
public static final java.lang.String NAME_plus
NAME_plusminus
public static final java.lang.String NAME_plusminus
NAME_q
public static final java.lang.String NAME_q
Constant value: q
NAME_Q
public static final java.lang.String NAME_Q
Constant value: Q
NAME_question
public static final java.lang.String NAME_question
NAME_questiondown
public static final java.lang.String NAME_questiondown
NAME_quotedbl
public static final java.lang.String NAME_quotedbl
NAME_quotedblbase
public static final java.lang.String NAME_quotedblbase
NAME_quotedblleft
public static final java.lang.String NAME_quotedblleft
NAME_quotedblright
public static final java.lang.String NAME_quotedblright
NAME_quoteleft
public static final java.lang.String NAME_quoteleft
NAME_quoteright
public static final java.lang.String NAME_quoteright
NAME_quotesinglbase
public static final java.lang.String NAME_quotesinglbase
NAME_quotesingle
public static final java.lang.String NAME_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
NAME_ring
public static final java.lang.String NAME_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
NAME_scaron
public static final java.lang.String NAME_scaron
NAME_Scaron
public static final java.lang.String NAME_Scaron
NAME_section
public static final java.lang.String NAME_section
NAME_semicolon
public static final java.lang.String NAME_semicolon
NAME_seven
public static final java.lang.String NAME_seven
NAME_six
public static final java.lang.String NAME_six
NAME_slash
public static final java.lang.String NAME_slash
NAME_space
public static final java.lang.String NAME_space
NAME_sterling
public static final java.lang.String NAME_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
NAME_Thorn
public static final java.lang.String NAME_Thorn
NAME_three
public static final java.lang.String NAME_three
NAME_threequarters
public static final java.lang.String NAME_threequarters
NAME_threesuperior
public static final java.lang.String NAME_threesuperior
NAME_tilde
public static final java.lang.String NAME_tilde
NAME_trademark
public static final java.lang.String NAME_trademark
NAME_two
public static final java.lang.String NAME_two
NAME_twosuperior
public static final java.lang.String NAME_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
NAME_Uacute
public static final java.lang.String NAME_Uacute
NAME_ucircumflex
public static final java.lang.String NAME_ucircumflex
NAME_Ucircumflex
public static final java.lang.String NAME_Ucircumflex
NAME_udieresis
public static final java.lang.String NAME_udieresis
NAME_Udieresis
public static final java.lang.String NAME_Udieresis
NAME_ugrave
public static final java.lang.String NAME_ugrave
NAME_Ugrave
public static final java.lang.String NAME_Ugrave
NAME_underscore
public static final java.lang.String NAME_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
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
NAME_Yacute
public static final java.lang.String NAME_Yacute
NAME_ydieresis
public static final java.lang.String NAME_ydieresis
NAME_Ydieresis
public static final java.lang.String NAME_Ydieresis
NAME_yen
public static final java.lang.String NAME_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
NAME_Zcaron
public static final java.lang.String NAME_Zcaron
NAME_zero
public static final java.lang.String NAME_zero
Constructors
Encoding
public Encoding()
Methods
create
public static Encoding create(COSName name)
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()
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)
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".
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
toString
public String toString()
getDifferenceUnicode
public int getDifferenceUnicode(int codePoint)
getDifferenceGlyphName
public String getDifferenceGlyphName(int codePoint)
de.intarsys.pdf.encoding
Class FontSpecificEncoding
java.lang.Object
|
+-de.intarsys.pdf.encoding.Encoding
|
+-de.intarsys.pdf.encoding.FontSpecificEncoding
There is no further information about how the mapping will be done and we will rely on some heuristics...
Field Summary
public static UNIQUE
Constructor Summary
public FontSpecificEncoding()
Method Summary
int getByteCode(int unicode)
COSObject getCosObject()
String getName()
boolean isFontSpecificEncoding()
Fields
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()
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).
de.intarsys.pdf.encoding
Class GlyphNameMap
java.lang.Object
|
+-de.intarsys.pdf.encoding.GlyphNameMap
Currently only "Latin" encoding is included.todo 2 cmap read externalized representation from adobe
Field Summary
public static final GLYPH_NOTDEF
Value: .notdef
Method Summary
String getGlyphName(int unicode)
Get the adobe glyph name for a unicode code point or ".notdef" if not available.
Fields
Standard
public static final de.intarsys.pdf.encoding.GlyphNameMap Standard
GLYPH_NOTDEF
public static final java.lang.String GLYPH_NOTDEF
Methods
getGlyphName
public String getGlyphName(int unicode)
Get the adobe glyph name for a unicode code point or ".notdef" if not available.
Parameters:
unicode - The unicode code point to look up.
Returns:
The adobe glyph name or ".notdef".
getUnicode
public int getUnicode(String glyphName)
Parameters:
glyphName - An adobe glyph name.
Returns:
The unicode code point for an Adobe glyph name or -1.
de.intarsys.pdf.encoding
Class MacOSRomanEncoding
java.lang.Object
|
+-de.intarsys.pdf.encoding.Encoding
|
+-de.intarsys.pdf.encoding.MappedEncoding
|
+-de.intarsys.pdf.encoding.MacOSRomanEncoding
This is not a "native" PDF endocing! It is simply used for mapping char codes in certain contexts (TrueType with 1,0 charmaps).
Field Summary
public static UNIQUE
Constructor Summary
public MacOSRomanEncoding()
Method Summary
COSObject getCosObject()
String getName()
Fields
UNIQUE
public static de.intarsys.pdf.encoding.MacOSRomanEncoding UNIQUE
Constructors
MacOSRomanEncoding
public MacOSRomanEncoding()
Methods
getCosObject
public COSObject getCosObject()
Get an object that can be used as a representation of the receiver encoding within doc.
getName
public String getName()
de.intarsys.pdf.encoding
Class MacRomanEncoding
java.lang.Object
|
+-de.intarsys.pdf.encoding.Encoding
|
+-de.intarsys.pdf.encoding.MappedEncoding
|
+-de.intarsys.pdf.encoding.MacRomanEncoding
Implementation of MacRomanEncoding
Field Summary
public static UNIQUE
Constructor Summary
public MacRomanEncoding()
Method Summary
COSObject getCosObject()
String getName()
Fields
UNIQUE
public static de.intarsys.pdf.encoding.MacRomanEncoding UNIQUE
Constructors
MacRomanEncoding
public MacRomanEncoding()
Methods
getCosObject
public COSObject getCosObject()
Get an object that can be used as a representation of the receiver encoding within doc.
getName
public String getName()
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
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.
COSObject getCosObject()
String getName()
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)
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
de.intarsys.pdf.encoding
Class MappedReader
java.lang.Object
|
+-java.io.Reader
|
+-de.intarsys.pdf.encoding.MappedReader
All Implemented Interfaces:
java.io.Closeable, Readable
A reader that uses a PDF style encoding to map byte code to unicode.
Constructor Summary
public MappedReader(java.io.InputStream is, Encoding encoding)
Create a MappedReader
Method Summary
void close()
Encoding getEncoding()
The encoding used by this reader.
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()
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
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
A writer that uses a PDF style encoding to map unicode to byte code.
Constructor Summary
public MappedWriter(java.io.OutputStream out, Encoding encoding)
Create a MappedWriter
Method Summary
void close()
void flush()
Encoding getEncoding()
The encoding used by this writer.
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()
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
de.intarsys.pdf.encoding
Class PDFDocEncoding
java.lang.Object
|
+-de.intarsys.pdf.encoding.Encoding
|
+-de.intarsys.pdf.encoding.MappedEncoding
|
+-de.intarsys.pdf.encoding.PDFDocEncoding
Field Summary
public static UNIQUE
Constructor Summary
public PDFDocEncoding()
Method Summary
COSObject getCosObject()
String getName()
Fields
UNIQUE
public static de.intarsys.pdf.encoding.PDFDocEncoding UNIQUE
Constructors
PDFDocEncoding
public PDFDocEncoding()
Methods
getCosObject
public COSObject getCosObject()
Get an object that can be used as a representation of the receiver encoding within doc.
getName
public String getName()
de.intarsys.pdf.encoding
Class StandardEncoding
java.lang.Object
|
+-de.intarsys.pdf.encoding.Encoding
|
+-de.intarsys.pdf.encoding.MappedEncoding
|
+-de.intarsys.pdf.encoding.StandardEncoding
Implementation of StandardEncoding
Field Summary
public static UNIQUE
Constructor Summary
public StandardEncoding()
Method Summary
COSObject getCosObject()
String getName()
Fields
UNIQUE
public static de.intarsys.pdf.encoding.StandardEncoding UNIQUE
Constructors
StandardEncoding
public StandardEncoding()
Methods
getCosObject
public COSObject getCosObject()
Get an object that can be used as a representation of the receiver encoding within doc.
getName
public String getName()
de.intarsys.pdf.encoding
Class SymbolEncoding
java.lang.Object
|
+-de.intarsys.pdf.encoding.Encoding
|
+-de.intarsys.pdf.encoding.SymbolEncoding
Field Summary
public static UNIQUE
Constructor Summary
public SymbolEncoding()
Method Summary
int getByteCode(int unicode)
COSObject getCosObject()
String getName()
Fields
UNIQUE
public static de.intarsys.pdf.encoding.SymbolEncoding UNIQUE
Constructors
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)
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).
de.intarsys.pdf.encoding
Class WinAnsiEncoding
java.lang.Object
|
+-de.intarsys.pdf.encoding.Encoding
|
+-de.intarsys.pdf.encoding.MappedEncoding
|
+-de.intarsys.pdf.encoding.WinAnsiEncoding
Implementation of WinAnsiEncoding
Field Summary
public static final UNIQUE
Constructor Summary
public WinAnsiEncoding()
Method Summary
COSObject getCosObject()
String getName()
Fields
UNIQUE
public static final de.intarsys.pdf.encoding.WinAnsiEncoding UNIQUE
Constructors
WinAnsiEncoding
public WinAnsiEncoding()
Methods
getCosObject
public COSObject getCosObject()
Get an object that can be used as a representation of the receiver encoding within doc.
getName
public String getName()
de.intarsys.pdf.fd
Class FDDocument
java.lang.Object
|
+-de.intarsys.pdf.fd.FDDocument
Method Summary
COSDocument cosGetDoc()
get the COS level implementation of the document
COSCatalog getCatalog()
lookup the catalog dictionary in a document
FDFDF getFdf()
ILocator getLocator()
void save()
Methods
createFromCOS
public static FDDocument createFromCOS(COSDocument doc)
Parameters:
doc - COSDocument to base this FDDoc on
Returns:
A new FDDoc object.
createNew
public static FDDocument createNew()
Returns:
A new FDDoc.
getCatalog
public COSCatalog getCatalog()
Returns:
the document catalog object
cosGetDoc
public COSDocument cosGetDoc()
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
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
Field Summary
public static final DK_Annots
Method Summary
void addField(FDField field)
java.util.List getFields()
String getFile()
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
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
Methods
getFields
public java.util.List getFields()
setFields
public void setFields(java.util.List fields)
addField
public void addField(FDField field)
cosAddField
public void cosAddField(COSDictionary field)
getFile
public String getFile()
setFile
public void setFile(String file)
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
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
Field Summary
public static final DK_A
Method Summary
void addField(FDField field)
COSObject cosGetValue()
java.util.List getKids()
String getLocalName()
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
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
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
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()
cosSetValue
public void cosSetValue(COSObject value)
getLocalName
public String getLocalName()
setLocalName
public void setLocalName(String name)
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
de.intarsys.pdf.fd
Class FDObject
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.fd.FDObject
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
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
Methods
toString
public String toString()
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
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
Constructor Summary
public ASCII85Filter(COSDictionary options)
Constructors
ASCII85Filter
public ASCII85Filter(COSDictionary options)
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
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).
Constructor Summary
public ASCII85InputStream(java.io.InputStream is)
Constructor
Method Summary
int available()
void close()
boolean markSupported()
int read()
void reset()
Constructors
ASCII85InputStream
public ASCII85InputStream(java.io.InputStream is)
Constructor
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
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
Output stream to encode binary data with ASCII representable byte codes. The algorithm produces five ASCII printing characters
from four bytes of binary data.
Constructor Summary
public ASCII85OutputStream(java.io.OutputStream out)
Constructor.
Method Summary
void close()
void flush()
int getLineLength()
This will get the length of the line.
void setLineLength(int l)
Set the line length.
void write(int b)
Constructors
ASCII85OutputStream
public ASCII85OutputStream(java.io.OutputStream out)
Constructor.
Parameters:
Methods
setLineLength
public void setLineLength(int l)
Parameters:
l - The line length.
getLineLength
public int getLineLength()
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
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
Constructor Summary
public ASCIIHexFilter(COSDictionary options)
Constructors
ASCIIHexFilter
public ASCIIHexFilter(COSDictionary options)
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
Input stream to decode binary data encoded in ascii representable byte codes. The algorithm produces one byte of data from two
ascii hex characters
Constructor Summary
public ASCIIHexInputStream(java.io.InputStream in)
Method Summary
int available()
boolean markSupported()
int read()
void reset()
long skip(long n)
Constructors
ASCIIHexInputStream
public ASCIIHexInputStream(java.io.InputStream in)
Methods
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
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
Output stream to encode binary data with ascii representable byte codes. The algorithm produces the hex representation of the data.
Constructor Summary
public ASCIIHexOutputStream(java.io.OutputStream out)
Constructor for ASCIIHexOutputStream.
Method Summary
void close()
void write(int b)
Constructors
ASCIIHexOutputStream
public ASCIIHexOutputStream(java.io.OutputStream out)
Parameters:
out
Methods
close
public void close()
throws java.io.IOException
See Also:
OutputStream.close()
write
public void write(int b)
throws java.io.IOException
See Also:
OutputStream.write(int)
de.intarsys.pdf.filter
Class CCITTFaxFilter
java.lang.Object
|
+-de.intarsys.pdf.filter.Filter
|
+-de.intarsys.pdf.filter.CCITTFaxFilter
All Implemented Interfaces:
IFilter
Field Summary
public static final DK_BlackIs1
Constructor Summary
public CCITTFaxFilter(COSDictionary options)
Fields
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
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)
de.intarsys.pdf.filter
Class CryptFilter
java.lang.Object
|
+-de.intarsys.pdf.filter.Filter
|
+-de.intarsys.pdf.filter.CryptFilter
All Implemented Interfaces:
IFilter
Constructor Summary
public CryptFilter(COSDictionary options)
Constructors
CryptFilter
public CryptFilter(COSDictionary options)
de.intarsys.pdf.filter
Class DCTFilter
java.lang.Object
|
+-de.intarsys.pdf.filter.Filter
|
+-de.intarsys.pdf.filter.DCTFilter
All Implemented Interfaces:
IFilter
Constructor Summary
public DCTFilter(COSDictionary options)
Constructors
DCTFilter
public DCTFilter(COSDictionary options)
de.intarsys.pdf.filter
Class Filter
java.lang.Object
|
+-de.intarsys.pdf.filter.Filter
All Implemented Interfaces:
IFilter
Field Summary
public static final CN_Filter_A85
Constructor Summary
public Filter(COSDictionary paramOptions)
Method Summary
byte[] decode(byte[] source, int offset, int length)
COSDictionary getOptions()
COSStream getStream()
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
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
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)
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)
de.intarsys.pdf.filter
Class FilterFactory
java.lang.Object
|
+-de.intarsys.pdf.filter.FilterFactory
Constructor Summary
public FilterFactory()
Method Summary
static IFilterFactory get()
Constructors
FilterFactory
public FilterFactory()
Methods
get
public static IFilterFactory get()
set
public static void set(IFilterFactory factory)
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
Constructor Summary
public FlateFilter(COSDictionary options)
Constructors
FlateFilter
public FlateFilter(COSDictionary options)
de.intarsys.pdf.filter
Interface IFilter
All Known Implementing Classes:
Filter
Method Summary
byte[] decode(byte[] source, int offset, int length)
COSStream getStream()
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()
de.intarsys.pdf.filter
Interface IFilterFactory
All Known Implementing Classes:
StandardFilterFactory
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
de.intarsys.pdf.filter
Interface IPrediction
All Known Implementing Classes:
Prediction
Method Summary
byte[] decode(byte[] source)
Methods
decode
public byte[] decode(byte[] source)
throws java.io.IOException
de.intarsys.pdf.filter
Interface IPredictionFactory
All Known Implementing Classes:
StandardPredictionFactory
Method Summary
IPrediction createPrediction(COSDictionary options)
Methods
createPrediction
public IPrediction createPrediction(COSDictionary options)
throws java.io.IOException
de.intarsys.pdf.filter
Class JBIG2Filter
java.lang.Object
|
+-de.intarsys.pdf.filter.Filter
|
+-de.intarsys.pdf.filter.JBIG2Filter
All Implemented Interfaces:
IFilter
Constructor Summary
public JBIG2Filter(COSDictionary options)
Constructors
JBIG2Filter
public JBIG2Filter(COSDictionary options)
de.intarsys.pdf.filter
Class JPXFilter
java.lang.Object
|
+-de.intarsys.pdf.filter.Filter
|
+-de.intarsys.pdf.filter.JPXFilter
All Implemented Interfaces:
IFilter
Constructor Summary
public JPXFilter(COSDictionary options)
Constructors
JPXFilter
public JPXFilter(COSDictionary options)
de.intarsys.pdf.filter
Class LZWDecoder
java.lang.Object
|
+-de.intarsys.pdf.filter.LZWDecoder
Constructor Summary
public LZWDecoder()
Method Summary
void addStringToTable(byte[] string)
Add a new string to the string table.
void initializeStringTable()
Initialize the string table.
Constructors
LZWDecoder
public LZWDecoder()
Methods
getNextCode
public int getNextCode(byte[] data)
addStringToTable
public void addStringToTable(byte[] oldString,
byte newString)
Parameters:
oldString
newString
addStringToTable
public void addStringToTable(byte[] string)
Parameters:
string
composeString
public byte[] composeString(byte[] oldString,
byte newString)
Parameters:
oldString
newString
decode
public byte[] decode(byte[] data)
throws java.io.IOException
Parameters:
data - The compressed data.
Throws:
IOException
initializeStringTable
public void initializeStringTable()
de.intarsys.pdf.filter
Class LZWFilter
java.lang.Object
|
+-de.intarsys.pdf.filter.Filter
|
+-de.intarsys.pdf.filter.LZWFilter
All Implemented Interfaces:
IFilter
Constructor Summary
public LZWFilter(COSDictionary options)
Constructors
LZWFilter
public LZWFilter(COSDictionary options)
de.intarsys.pdf.filter
Class NoPrediction
java.lang.Object
|
+-de.intarsys.pdf.filter.Prediction
|
+-de.intarsys.pdf.filter.NoPrediction
All Implemented Interfaces:
IPrediction
Constructor Summary
public NoPrediction(COSDictionary options)
Method Summary
byte[] decode(byte[] source)
int getRowSize()
Constructors
NoPrediction
public NoPrediction(COSDictionary options)
Methods
decode
public byte[] decode(byte[] source)
getRowSize
public int getRowSize()
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
Constructor Summary
public PDFDeflaterOutputStream(java.io.OutputStream out,
java.util.zip.Deflater def)
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:
Methods
close
public void close()
throws java.io.IOException
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
Constructor Summary
public PNGAveragePrediction(COSDictionary options)
Constructors
PNGAveragePrediction
public PNGAveragePrediction(COSDictionary options)
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
Constructor Summary
public PNGNonePrediction(COSDictionary options)
Constructors
PNGNonePrediction
public PNGNonePrediction(COSDictionary options)
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
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
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
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)
de.intarsys.pdf.filter
Class PNGPrediction
java.lang.Object
|
+-de.intarsys.pdf.filter.Prediction
|
+-de.intarsys.pdf.filter.PNGPrediction
All Implemented Interfaces:
IPrediction
Constructor Summary
public PNGPrediction(COSDictionary options)
Method Summary
int computeSourceRowSize()
Constructors
PNGPrediction
public PNGPrediction(COSDictionary options)
Methods
computeSourceRowSize
public int computeSourceRowSize()
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
Constructor Summary
public PNGSubPrediction(COSDictionary options)
Constructors
PNGSubPrediction
public PNGSubPrediction(COSDictionary options)
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
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)
de.intarsys.pdf.filter
Class Prediction
java.lang.Object
|
+-de.intarsys.pdf.filter.Prediction
All Implemented Interfaces:
IPrediction
Field Summary
public static final DK_BitsPerComponent
Value: 1
Value: 13
Value: 10
Value: 15
Value: 14
Value: 11
Value: 12
Value: 2
Constructor Summary
public Prediction(COSDictionary options)
Method Summary
int computeResultRowSize()
int computeSourceRowSize()
int getBitsPerComponent()
int getColors()
int getColumns()
int getResultRowSize()
int getSourceRowSize()
Fields
DK_BitsPerComponent
public static final de.intarsys.pdf.cos.COSName DK_BitsPerComponent
DK_Colors
public static final de.intarsys.pdf.cos.COSName DK_Colors
DK_Columns
public static final de.intarsys.pdf.cos.COSName DK_Columns
DK_Predictor
public static final de.intarsys.pdf.cos.COSName DK_Predictor
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
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()
de.intarsys.pdf.filter
Class PredictionFactory
java.lang.Object
|
+-de.intarsys.pdf.filter.PredictionFactory
Constructor Summary
public PredictionFactory()
Method Summary
static get()
IPredictionFactory
Constructors
PredictionFactory
public PredictionFactory()
Methods
get
public static IPredictionFactory get()
set
public static void set(IPredictionFactory factory)
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
Constructor Summary
public RunLengthFilter(COSDictionary options)
Constructors
RunLengthFilter
public RunLengthFilter(COSDictionary options)
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
Constructor Summary
public RunLengthInputStream(java.io.InputStream in)
Constructors
RunLengthInputStream
public RunLengthInputStream(java.io.InputStream in)
Parameters:
in
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
Constructor Summary
public RunLengthOutputStream(java.io.OutputStream out)
Constructors
RunLengthOutputStream
public RunLengthOutputStream(java.io.OutputStream out)
Parameters:
out
de.intarsys.pdf.filter
Class StandardFilterFactory
java.lang.Object
|
+-de.intarsys.pdf.filter.StandardFilterFactory
All Implemented Interfaces:
IFilterFactory
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
Parameters:
filterName - Filter name to lookup
options - The options to use for the filter.
Returns:
An IFilter
Throws:
IOException
de.intarsys.pdf.filter
Class StandardPredictionFactory
java.lang.Object
|
+-de.intarsys.pdf.filter.StandardPredictionFactory
All Implemented Interfaces:
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
de.intarsys.pdf.filter
Class StreamBasedFilter
java.lang.Object
|
+-de.intarsys.pdf.filter.Filter
|
+-de.intarsys.pdf.filter.StreamBasedFilter
All Implemented Interfaces:
IFilter
Constructor Summary
public StreamBasedFilter(COSDictionary options)
Constructors
StreamBasedFilter
public StreamBasedFilter(COSDictionary options)
de.intarsys.pdf.filter
Class TIFFFaxDecoder
java.lang.Object
|
+-de.intarsys.pdf.filter.TIFFFaxDecoder
Constructor Summary
public TIFFFaxDecoder(int fillOrder, int w, int h)
Method Summary
void decode1D(byte[] buffer, byte[] compData, int startX, int height)
void decode2D(byte[] buffer, byte[] compData, int startX, int height, long
tiffT4Options)
void decodeT6(byte[] buffer, byte[] compData, int startX, int height, long
tiffT6Options)
Constructors
TIFFFaxDecoder
public TIFFFaxDecoder(int fillOrder,
int w,
int h)
Parameters:
fillOrder - The fill order of the compressed data bytes.
compData - Array containing compressed data.
w
h
Methods
decode1D
public void decode1D(byte[] buffer,
byte[] compData,
int startX,
int height)
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)
de.intarsys.pdf.filter
Class TIFFPrediction
java.lang.Object
|
+-de.intarsys.pdf.filter.Prediction
|
+-de.intarsys.pdf.filter.TIFFPrediction
All Implemented Interfaces:
IPrediction
Constructor Summary
public TIFFPrediction(COSDictionary options)
Method Summary
int getRowSize()
Constructors
TIFFPrediction
public TIFFPrediction(COSDictionary options)
Methods
getRowSize
public int getRowSize()
de.intarsys.pdf.font
Class AFMEncoding
java.lang.Object
|
+-de.intarsys.pdf.encoding.Encoding
|
+-de.intarsys.pdf.font.AFMEncoding
Direct Known Subclasses:
AFMSymbolicEncoding
Constructor Summary
public AFMEncoding(AFM afm)
AFMEncoding constructor comment.
Method Summary
AFM getAfm()
Return the underlying Adobe font metrics.
COSObject getCosObject()
String getName()
Constructors
AFMEncoding
public AFMEncoding(AFM afm)
Parameters:
afm - The de.intarsys.font.afm.AFM object defining the encoding.
Methods
getAfm
public AFM getAfm()
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.
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).
de.intarsys.pdf.font
Class AFMSymbolicEncoding
java.lang.Object
|
+-de.intarsys.pdf.encoding.Encoding
|
+-de.intarsys.pdf.font.AFMEncoding
|
+-de.intarsys.pdf.font.AFMSymbolicEncoding
Constructor Summary
public AFMSymbolicEncoding(AFM afm)
Method Summary
int getByteCode(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)
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.
de.intarsys.pdf.font
Class CID
java.lang.Object
|
+-de.intarsys.pdf.font.CID
Direct Known Subclasses:
CIDSelectorCID, CIDSelectorCode, CIDSelectorName
Field Summary
public static final Notdef
The special CID for undefined glyphs.
Method Summary
int getFontNumber()
The font number referenced by this cid.
Fields
Notdef
public static final de.intarsys.pdf.font.CID Notdef
Methods
getValue
public abstract int getValue()
Returns:
The integer equivalent of the cid.
getFontNumber
public int getFontNumber()
Returns:
The font number referenced by this cid.
getLength
public abstract int getLength()
Returns:
The number of bytes this CID occupies.
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
This is a wrapper around a Type 1 or TrueType Font that is indexed using CID's.
Field Summary
public static final DK_CIDSystemInfo
Method Summary
CIDSystemInfo getCIDSystemInfo()
CIDWidthMap getCIDWidthMap()
String getFontFamilyName()
String getFontName()
FontStyle getFontStyle()
float getUnderlinePosition()
int getUnderlineThickness()
Fields
DK_CIDSystemInfo
public static final de.intarsys.pdf.cos.COSName DK_CIDSystemInfo
DK_DW
public static final de.intarsys.pdf.cos.COSName DK_DW
DK_W
public static final de.intarsys.pdf.cos.COSName DK_W
DK_DW2
public static final de.intarsys.pdf.cos.COSName DK_DW2
DK_W2
public static final de.intarsys.pdf.cos.COSName DK_W2
META
public static final de.intarsys.pdf.font.CIDFont.MetaClass META
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)
getGlyphIndex
public abstract int getGlyphIndex(CID cid)
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
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
Field Summary
public static final META
The meta class instance
Constructor Summary
public CIDFontType0(COSObject object)
Method Summary
int getGlyphIndex(CID cid)
Fields
META
public static final de.intarsys.pdf.font.CIDFontType0.MetaClass META
Constructors
CIDFontType0
public CIDFontType0(COSObject object)
Parameters:
object
Methods
getNextCID
public CID getNextCID(byte[] bytes,
int offset)
getGlyphIndex
public int getGlyphIndex(CID cid)
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
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
Field Summary
public static final DK_CIDToGIDMap
Constructor Summary
public CIDFontType2(COSObject object)
Method Summary
COSObject cosGetCIDToGIDMap()
Fields
META
public static final de.intarsys.pdf.font.CIDFontType2.MetaClass META
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)
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
de.intarsys.pdf.font
Class CIDSelectorCID
java.lang.Object
|
+-de.intarsys.pdf.font.CID
|
+-de.intarsys.pdf.font.CIDSelectorCID
Constructor Summary
public CIDSelectorCID(int value)
Method Summary
int getLength()
int getValue()
Constructors
CIDSelectorCID
public CIDSelectorCID(int value)
CIDSelectorCID
public CIDSelectorCID(byte[] bytes,
int offset,
int length)
Methods
getLength
public int getLength()
getValue
public int getValue()
de.intarsys.pdf.font
Class CIDSelectorCode
java.lang.Object
|
+-de.intarsys.pdf.font.CID
|
+-de.intarsys.pdf.font.CIDSelectorCode
Constructor Summary
public CIDSelectorCode(int value)
Method Summary
int getLength()
int getValue()
Constructors
CIDSelectorCode
public CIDSelectorCode(int value)
Parameters:
value
Methods
getValue
public int getValue()
getLength
public int getLength()
de.intarsys.pdf.font
Class CIDSelectorName
java.lang.Object
|
+-de.intarsys.pdf.font.CID
|
+-de.intarsys.pdf.font.CIDSelectorName
Constructor Summary
public CIDSelectorName(COSName name)
Method Summary
int getLength()
COSName getName()
int getValue()
Constructors
CIDSelectorName
public CIDSelectorName(COSName name)
Methods
getName
public COSName getName()
getValue
public int getValue()
getLength
public int getLength()
de.intarsys.pdf.font
Class CIDSystemInfo
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.font.CIDSystemInfo
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
Field Summary
public static final DK_Ordering
Fields
META
public static final de.intarsys.pdf.font.CIDSystemInfo.MetaClass META
DK_Registry
public static final de.intarsys.pdf.cos.COSName DK_Registry
DK_Ordering
public static final de.intarsys.pdf.cos.COSName DK_Ordering
DK_Supplement
public static final de.intarsys.pdf.cos.COSName DK_Supplement
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
de.intarsys.pdf.font
Class CIDToGIDMap
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.font.CIDToGIDMap
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
For Type 2 CID Fonts only a specification of the mapping from CID's to glyph indices.
Field Summary
public static final CN_Identity
Method Summary
abstract int getGlyphIndex(CID cid)
Fields
CN_Identity
public static final de.intarsys.pdf.cos.COSName CN_Identity
META
public static final de.intarsys.pdf.font.CIDToGIDMap.MetaClass META
Methods
getSingleton
public static CIDToGIDMap getSingleton(COSName name)
getGlyphIndex
public abstract int getGlyphIndex(CID cid)
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
de.intarsys.pdf.font
Class CIDWidthMap
java.lang.Object
|
+-de.intarsys.pdf.font.CIDWidthMap
Constructor Summary
public CIDWidthMap(java.util.List entries)
Method Summary
static CIDWidthMap createMap(COSArray array)
Constructors
CIDWidthMap
public CIDWidthMap(java.util.List entries)
Methods
createMap
public static CIDWidthMap createMap(COSArray array)
getWidth
public int getWidth(int cidValue)
de.intarsys.pdf.font
Class CIDWidthMapEntry
java.lang.Object
|
+-de.intarsys.pdf.font.CIDWidthMapEntry
Constructor Summary
public CIDWidthMapEntry(int start, int stop, int width)
Method Summary
int getStart()
int getStop()
int getWidth()
Constructors
CIDWidthMapEntry
public CIDWidthMapEntry(int start,
int stop,
int width)
Methods
getStart
public int getStart()
getStop
public int getStop()
getWidth
public int getWidth()
de.intarsys.pdf.font
Class CMap
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.font.CMap
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
A character map. This object can map from character codes to CID's which can be used to index in a font object.
Field Summary
public static final META
The meta class instance
Method Summary
abstract CID getNextCID(byte[] bytes, int offset)
Fields
META
public static final de.intarsys.pdf.font.CMap.MetaClass META
Methods
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)
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
de.intarsys.pdf.font
Class CMapBFCharCodeMap
java.lang.Object
|
+-de.intarsys.pdf.font.CMapMap
|
+-de.intarsys.pdf.font.CMapCharMap
|
+-de.intarsys.pdf.font.CMapBFCharCodeMap
Constructor Summary
public CMapBFCharCodeMap(byte[] source, byte[] destination)
Method Summary
byte[] getDestination()
Constructors
CMapBFCharCodeMap
public CMapBFCharCodeMap(byte[] source,
byte[] destination)
Methods
getDestination
public byte[] getDestination()
map
public CID map(byte[] bytes)
de.intarsys.pdf.font
Class CMapBFCharNameMap
java.lang.Object
|
+-de.intarsys.pdf.font.CMapMap
|
+-de.intarsys.pdf.font.CMapCharMap
|
+-de.intarsys.pdf.font.CMapBFCharNameMap
Constructor Summary
public CMapBFCharNameMap(byte[] source, COSName destination)
Method Summary
COSName getDestination()
Constructors
CMapBFCharNameMap
public CMapBFCharNameMap(byte[] source,
COSName destination)
Methods
getDestination
public COSName getDestination()
map
public CID map(byte[] bytes)
de.intarsys.pdf.font
Class CMapBFRangeCodeMap
java.lang.Object
|
+-de.intarsys.pdf.font.CMapMap
|
+-de.intarsys.pdf.font.CMapRangeMap
|
+-de.intarsys.pdf.font.CMapBFRangeCodeMap
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)
de.intarsys.pdf.font
Class CMapBFRangeNameMap
java.lang.Object
|
+-de.intarsys.pdf.font.CMapMap
|
+-de.intarsys.pdf.font.CMapRangeMap
|
+-de.intarsys.pdf.font.CMapBFRangeNameMap
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)
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
Constructor Summary
public CMapCharMap(byte[] source)
Method Summary
byte[] getSource()
Constructors
CMapCharMap
public CMapCharMap(byte[] source)
Methods
getSource
public byte[] getSource()
de.intarsys.pdf.font
Class CMapCIDCharCodeMap
java.lang.Object
|
+-de.intarsys.pdf.font.CMapMap
|
+-de.intarsys.pdf.font.CMapCharMap
|
+-de.intarsys.pdf.font.CMapCIDCharCodeMap
Constructor Summary
public CMapCIDCharCodeMap(byte[] source, int destination)
Method Summary
int getDestination()
Constructors
CMapCIDCharCodeMap
public CMapCIDCharCodeMap(byte[] source,
int destination)
Methods
getDestination
public int getDestination()
map
public CID map(byte[] bytes)
de.intarsys.pdf.font
Class CMapCIDRangeCodeMap
java.lang.Object
|
+-de.intarsys.pdf.font.CMapMap
|
+-de.intarsys.pdf.font.CMapRangeMap
|
+-de.intarsys.pdf.font.CMapCIDRangeCodeMap
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)
de.intarsys.pdf.font
Class CMapCIDRangeNotdefMap
java.lang.Object
|
+-de.intarsys.pdf.font.CMapMap
|
+-de.intarsys.pdf.font.CMapRangeMap
|
+-de.intarsys.pdf.font.CMapCIDRangeNotdefMap
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)
de.intarsys.pdf.font
Class CMapMap
java.lang.Object
|
+-de.intarsys.pdf.font.CMapMap
Direct Known Subclasses:
CMapCharMap, CMapRangeMap
Constructor Summary
public CMapMap()
Method Summary
abstract CID map(byte[] value)
Constructors
CMapMap
public CMapMap()
Methods
map
public abstract CID map(byte[] value)
de.intarsys.pdf.font
Class CMapOperator
java.lang.Object
|
+-de.intarsys.pdf.font.CMapOperator
Field Summary
public static final CMO_beginbfchar
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
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
de.intarsys.pdf.font
Class CMapRange
java.lang.Object
|
+-de.intarsys.pdf.font.CMapRange
Constructor Summary
public CMapRange(byte[] start, byte[] end)
Method Summary
boolean contains(byte[] value)
byte[] getEnd()
byte[] getStart()
Constructors
CMapRange
public CMapRange(byte[] start,
byte[] end)
Methods
getEnd
public byte[] getEnd()
getStart
public byte[] getStart()
contains
public boolean contains(byte[] value)
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
Constructor Summary
public CMapRangeMap(byte[] start, byte[] end)
Method Summary
int getEnd()
int getStart()
Constructors
CMapRangeMap
public CMapRangeMap(byte[] start,
byte[] end)
Methods
getEnd
public int getEnd()
getStart
public int getStart()
de.intarsys.pdf.font
Class DifferenceEncoding
java.lang.Object
|
+-de.intarsys.pdf.encoding.Encoding
|
+-de.intarsys.pdf.font.DifferenceEncoding
where num is the codepoint for the first glyph name in the list. The following names are mapped to the codepoint of the
predecessor + 1. Multiple redefinition offsets can be defined.
Field Summary
public static final DK_BaseEncoding
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.
COSObject getCosObject()
String getName()
boolean isFontSpecificEncoding()
Fields
DK_Differences
public static final de.intarsys.pdf.cos.COSName DK_Differences
DK_BaseEncoding
public static final de.intarsys.pdf.cos.COSName DK_BaseEncoding
Constructors
DifferenceEncoding
public DifferenceEncoding()
Methods
create
public static Encoding create(COSDictionary dict,
PDFont font)
Create the difference encoding from the values defined in the dict.
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.
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)
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.
de.intarsys.pdf.font
Class FontDescriptorFlags
java.lang.Object
|
+-de.intarsys.pdf.pd.AbstractBitFlags
|
+-de.intarsys.pdf.font.FontDescriptorFlags
• 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
Value: 1
Value: 262144
Value: 64
Value: 32
Value: 8
Value: 2
Value: 131072
Value: 4
Constructor Summary
public FontDescriptorFlags(PDFontDescriptor fontDescriptor)
Method Summary
boolean isAllCap()
boolean isFixedPitch()
boolean isForceBold()
boolean isItalic()
boolean isNonsymbolic()
boolean isScript()
boolean isSerif()
boolean isSmallCap()
boolean isSymbolic()
Fields
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
Bit_SmallCap
public static final int Bit_SmallCap
Bit_ForceBold
public static final int Bit_ForceBold
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)
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)
isSymbolic
public boolean isSymbolic()
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
Field Summary
public static SINGLETON
Method Summary
CID getNextCID(byte[] bytes, int offset)
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)
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
Field Summary
public static final CN_Identity_H
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
META
public static final de.intarsys.pdf.font.NamedCMap.MetaClass META
Methods
getSingleton
public static CMap getSingleton(COSName name)
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
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
Field Summary
public static final META
The meta class instance
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
Methods
getGlyphIndex
public int getGlyphIndex(CID cid)
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
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
Field Summary
public static final CN_Subtype_CIDFontType0
Method Summary
void compress()
COSName getBaseFont()
Encoding getEncoding()
The encoding of the glyphs in the font
int getFirstChar()
The first codepoint defined in the font.
PDFontDescriptor getFontDescriptor()
int[] getGlyphWidths()
int getLastChar()
int getMissingWidth()
CMap getToUnicode()
boolean isCharUsed(int c)
boolean isEmbedded()
Answer true if this font's program is embedded within the document.
boolean isStandardFont()
Answer true if this is one of the 14 standard fonts.
boolean isSubset()
Answer true if this font is partially embedded in the document.
void setCharUsed(int c)
String toString()
Fields
CN_Subtype_CIDFontType0
public static final de.intarsys.pdf.cos.COSName CN_Subtype_CIDFontType0
CN_Subtype_CIDFontType2
public static final de.intarsys.pdf.cos.COSName CN_Subtype_CIDFontType2
CN_Subtype_MMType1
public static final de.intarsys.pdf.cos.COSName CN_Subtype_MMType1
CN_Subtype_TrueType
public static final de.intarsys.pdf.cos.COSName CN_Subtype_TrueType
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
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
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)
Parameters:
name - a font name
Returns:
font name's "style" portion
compress
public void compress()
getBaseFont
public COSName getBaseFont()
Returns:
the base font for this font dictionary
getEncoding
public Encoding getEncoding()
Returns:
The encoding of the glyphs in the font
getFirstChar
public int getFirstChar()
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)
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
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.
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()
getUnicode
public int getUnicode(int byteCode)
isCharUsed
public boolean isCharUsed(int c)
isEmbedded
public boolean isEmbedded()
Returns:
Answer true if this font's program is embedded within the document.
isStandardFont
public boolean isStandardFont()
Returns:
Answer true if this is one of the 14 standard fonts.
isSubset
public boolean isSubset()
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)
Parameters:
newFontEncoding - the new encoding to use
setFontDescriptor
public void setFontDescriptor(PDFontDescriptor descriptor)
toString
public String toString()
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
Method Summary
Class getRootClass()
Methods
getRootClass
public Class getRootClass()
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
Field Summary
public static final META
The meta class instance
Method Summary
String getFontFamilyName()
String getFontName()
FontStyle getFontStyle()
float getUnderlinePosition()
int getUnderlineThickness()
Fields
META
public static final de.intarsys.pdf.font.PDFontAny.MetaClass META
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)
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
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
Field Summary
public static final CN_Type_FontDescriptor
Method Summary
abstract float getAscent()
The font ascent.
FontDescriptorFlags getFlags()
byte[] getFontFile()
byte[] getFontFile2()
byte[] getFontFile3()
boolean isAllCap()
boolean isFixedPitch()
boolean isForceBold()
boolean isItalic()
boolean isNonsymbolic()
boolean isScript()
boolean isSerif()
boolean isSmallCap()
boolean isSymbolic()
Fields
META
public static final de.intarsys.pdf.font.PDFontDescriptor.MetaClass META
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()
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)
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()
Returns:
The font ascent.
getAvgWidth
public abstract float getAvgWidth()
Returns:
The font average width.
getCapHeight
public abstract float getCapHeight()
Returns:
The capital height.
getDescent
public abstract float getDescent()
Returns:
The font descent.
getFlagsValue
public abstract int getFlagsValue()
Returns:
The font flags.
setFlagsValue
public abstract void setFlagsValue(int value)
getFontBB
public abstract CDSRectangle getFontBB()
Returns:
The character enclosing rectangle.
getFontFamily
public abstract String getFontFamily()
Returns:
The font name.
getFontName
public abstract String getFontName()
Returns:
The font name.
getItalicAngle
public abstract float getItalicAngle()
Returns:
The font italic angle.
getLeading
public abstract int getLeading()
Returns:
The font leading.
getMaxWidth
public abstract int getMaxWidth()
Returns:
The font character maximal width.
getMissingWidth
public abstract int getMissingWidth()
Returns:
The width to use when definition is missing.
getStemH
public abstract int getStemH()
Returns:
The font horizontal stem.
getStemV
public abstract int getStemV()
Returns:
The font vertical stem.
getXHeight
public abstract float getXHeight()
Returns:
The height of "X".
getFontFile
public byte[] getFontFile()
getFontFile2
public byte[] getFontFile2()
getFontFile3
public byte[] getFontFile3()
getFlags
public FontDescriptorFlags getFlags()
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
Method Summary
Class getRootClass()
Methods
getRootClass
public Class getRootClass()
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
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.
Field Summary
public static final DK_Ascent
Method Summary
float getAscent()
float getAvgWidth()
float getCapHeight()
float getDescent()
int getFlagsValue()
CDSRectangle getFontBB()
String getFontFamily()
byte[] getFontFile()
byte[] getFontFile2()
byte[] getFontFile3()
String getFontName()
float getItalicAngle()
int getLeading()
int getMaxWidth()
int getMissingWidth()
int getStemH()
int getStemV()
float getXHeight()
void removeFontFile2()
Fields
META
public static final de.intarsys.pdf.font.PDFontDescriptorEmbedded.MetaClass META
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
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
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()
setAvgWidth
public void setAvgWidth(int value)
getAvgWidth
public float getAvgWidth()
setCapHeight
public void setCapHeight(int value)
getCapHeight
public float getCapHeight()
setDescent
public void setDescent(int value)
getDescent
public float getDescent()
setFlags
public void setFlags(int value)
getFlagsValue
public int getFlagsValue()
setFlagsValue
public void setFlagsValue(int value)
setFontBB
public void setFontBB(CDSRectangle rect)
getFontBB
public CDSRectangle getFontBB()
setFontFamily
public void setFontFamily(String value)
getFontFamily
public String getFontFamily()
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()
setItalicAngle
public void setItalicAngle(float value)
getItalicAngle
public float getItalicAngle()
setLeading
public void setLeading(int value)
getLeading
public int getLeading()
setMaxWidth
public void setMaxWidth(int value)
getMaxWidth
public int getMaxWidth()
setMissingWidth
public void setMissingWidth(int value)
getMissingWidth
public int getMissingWidth()
setStemH
public void setStemH(int value)
getStemH
public int getStemH()
setStemV
public void setStemV(int value)
getStemV
public int getStemV()
setXHeight
public void setXHeight(int value)
getXHeight
public float getXHeight()
removeFontFile2
public void removeFontFile2()
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
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
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
Field Summary
public static final META
The meta class instance
Method Summary
float getAscent()
float getAvgWidth()
float getCapHeight()
float getDescent()
int getFlagsValue()
PDFontType1 getFont()
CDSRectangle getFontBB()
String getFontFamily()
String getFontName()
float getItalicAngle()
int getLeading()
int getMaxWidth()
int getMissingWidth()
int getStemH()
int getStemV()
float getXHeight()
boolean isNonsymbolic()
boolean isSymbolic()
Fields
META
public static final de.intarsys.pdf.font.PDFontDescriptorType1.MetaClass META
Methods
getAscent
public float getAscent()
getAvgWidth
public float getAvgWidth()
getCapHeight
public float getCapHeight()
getDescent
public float getDescent()
getFlagsValue
public int getFlagsValue()
setFlagsValue
public void setFlagsValue(int value)
getFont
public PDFontType1 getFont()
getFontBB
public CDSRectangle getFontBB()
getFontFamily
public String getFontFamily()
getFontName
public String getFontName()
getItalicAngle
public float getItalicAngle()
getLeading
public int getLeading()
getMaxWidth
public int getMaxWidth()
getMissingWidth
public int getMissingWidth()
getStemH
public int getStemH()
getStemV
public int getStemV()
getXHeight
public float getXHeight()
isSymbolic
public boolean isSymbolic()
isNonsymbolic
public boolean isNonsymbolic()
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
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
Field Summary
public static final META
The meta class instance
Fields
META
public static final de.intarsys.pdf.font.PDFontMMType1.MetaClass META
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
de.intarsys.pdf.font
Class PDFontTools
java.lang.Object
|
+-de.intarsys.pdf.font.PDFontTools
Constructor Summary
public PDFontTools()
Method Summary
static PDFont getFont(PDDocument document, PDResources resources, COSName name)
The font name, looked up in resources.
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.
Constructors
PDFontTools
public PDFontTools()
Methods
getFont
public static PDFont getFont(PDDocument document,
PDResources resources,
COSName name)
Parameters:
document
resources
name
Returns:
The font name, looked up in resources.
getFont
public static PDFont getFont(PDResources resources,
COSName name)
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.
Parameters:
doc - The PDDocument to parse
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)
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)
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.
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)
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)
Parameters:
doc - The PDDocument to parse
Returns:
Collection of all PDFont objects in the document.
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
Field Summary
public static final META
The meta class instance
Method Summary
void compress()
void embedFontProgramm()
String getFontFamilyName()
String getFontName()
FontStyle getFontStyle()
TTFont getTTFont()
float getUnderlinePosition()
int getUnderlineThickness()
void initializeFromScratchFontDescriptor()
void removeFontProgramm()
Fields
META
public static final de.intarsys.pdf.font.PDFontTrueType.MetaClass META
Methods
getFontFamilyName
public static String getFontFamilyName(String name)
getFontStyle
public static FontStyle getFontStyle(String name)
createNew
public static PDFontTrueType createNew(TTFont ttFont)
Parameters:
ttFont - the baseFontName of the font to use
Returns:
the new font created
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()
setTTFont
public void setTTFont(TTFont font)
getTTFont
public TTFont getTTFont()
initializeFromScratchFontDescriptor
public void initializeFromScratchFontDescriptor()
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
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
Field Summary
public static final DK_DescendantFonts
Constructor Summary
public PDFontType0(COSObject object)
Method Summary
CMap getCMap()
CIDFont getDescendantFont()
PDFontDescriptor getFontDescriptor()
String getFontFamilyName()
String getFontName()
FontStyle getFontStyle()
float getUnderlinePosition()
int getUnderlineThickness()
Fields
DK_DescendantFonts
public static final de.intarsys.pdf.cos.COSName DK_DescendantFonts
META
public static final de.intarsys.pdf.font.PDFontType0.MetaClass META
Constructors
PDFontType0
public PDFontType0(COSObject object)
Methods
getCMap
public CMap getCMap()
getDescendantFont
public CIDFont getDescendantFont()
getFontDescriptor
public PDFontDescriptor getFontDescriptor()
getFontFamilyName
public String getFontFamilyName()
getFontName
public String getFontName()
getFontStyle
public FontStyle getFontStyle()
getGlyphWidth
public int getGlyphWidth(int codePoint)
getNextCID
public CID getNextCID(byte[] bytes,
int offset)
getUnderlinePosition
public float getUnderlinePosition()
getUnderlineThickness
public int getUnderlineThickness()
getGlyphIndex
public int getGlyphIndex(CID cid)
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
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
Field Summary
public static FONT_Courier
Method Summary
static PDFontType1 createNew(AFM afm)
Create a Type1 font from an existing AFM definition.
AFM getAfm()
String getFontFamilyName()
String getFontName()
FontStyle getFontStyle()
float getUnderlinePosition()
int getUnderlineThickness()
void initializeFromScratchFontDescriptor()
boolean isStandardFont()
Fields
FontAlternatives
public static final java.util.Map FontAlternatives
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
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
Methods
createNew
public static PDFontType1 createNew(AFM afm)
Parameters:
afm - the AFM font definition structure.
Returns:
the new font created
createNew
public static PDFontType1 createNew(String name)
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()
getUnderlineThickness
public int getUnderlineThickness()
initializeFromScratchFontDescriptor
public void initializeFromScratchFontDescriptor()
isStandardFont
public boolean isStandardFont()
setAfm
public void setAfm(AFM afm)
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
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
Field Summary
public static final DK_CharProcs
Constructor Summary
public PDFontType3(COSObject object)
Method Summary
COSDictionary cosGetCharProcs()
String getFontFamilyName()
CDSMatrix getFontMatrix()
String getFontName()
FontStyle getFontStyle()
float getUnderlinePosition()
int getUnderlineThickness()
boolean isEmbedded()
boolean isSubset()
String toString()
Fields
DK_FontBBox
public static final de.intarsys.pdf.cos.COSName DK_FontBBox
DK_FontMatrix
public static final de.intarsys.pdf.cos.COSName DK_FontMatrix
DK_CharProcs
public static final de.intarsys.pdf.cos.COSName DK_CharProcs
DK_Resources
public static final de.intarsys.pdf.cos.COSName DK_Resources
DK_ToUnicode
public static final de.intarsys.pdf.cos.COSName DK_ToUnicode
META
public static final de.intarsys.pdf.font.PDFontType3.MetaClass META
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()
isSubset
public boolean isSubset()
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)
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
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
Field Summary
public static final DK_CIDSystemInfo
Method Summary
CID getNextCID(byte[] bytes, int offset)
Fields
META
public static final de.intarsys.pdf.font.StreamBasedCMap.MetaClass META
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)
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
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
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
Methods
getGlyphIndex
public int getGlyphIndex(CID cid)
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
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
Method Summary
PDDocument getDoc()
The document whose fonts are managed.
Methods
getDoc
public PDDocument getDoc()
Returns:
The document whose fonts are managed.
de.intarsys.pdf.font.outlet
Class FontFactory
java.lang.Object
|
+-de.intarsys.pdf.font.outlet.FontFactory
Constructor Summary
public FontFactory()
Method Summary
static IFontFactory get()
The IFontFactory singleton.
Constructors
FontFactory
public FontFactory()
Methods
get
public static IFontFactory get()
Returns:
The IFontFactory singleton.
set
public static void set(IFontFactory factory)
Parameters:
factory - The IFontFactory singleton.
de.intarsys.pdf.font.outlet
Class FontOutlet
java.lang.Object
|
+-de.intarsys.pdf.font.outlet.FontOutlet
Constructor Summary
public FontOutlet()
Method Summary
static IFontOutlet get()
The IFontOutlet singleton.
Constructors
FontOutlet
public FontOutlet()
Methods
get
public static IFontOutlet get()
Returns:
The IFontOutlet singleton.
set
public static void set(IFontOutlet outlet)
Parameters:
outlet - The IFontOutlet singleton.
de.intarsys.pdf.font.outlet
Class FontQuery
java.lang.Object
|
+-de.intarsys.pdf.font.outlet.FontQuery
All Implemented Interfaces:
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.
Method Summary
Encoding getEncoding()
String getFontFamilyName()
FontStyle getFontStyle()
Encoding getOverrideEncoding()
The required encoding for the result font.
String getOverrideFontFamilyName()
The required font family for the result font.
FontStyle getOverrideFontStyle()
The required font style for the result font.
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)
Parameters:
overrideEncoding - The required encoding for the result font.
getOverrideEncoding
public Encoding getOverrideEncoding()
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()
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()
Returns:
The required font style for the result font.
de.intarsys.pdf.font.outlet
Interface IFontFactory
All Known Implementing Classes:
StandardFontFactory
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.
Methods
getItalicFlavor
public PDFont getItalicFlavor(PDFont font)
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)
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)
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)
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.
de.intarsys.pdf.font.outlet
Interface IFontOutlet
All Known Implementing Classes:
StandardFontOutlet
Method Summary
IFontFactory lookupFontFactory(PDDocument doc)
A IFontFactory suitable for doc.
Methods
lookupFontFactory
public IFontFactory lookupFontFactory(PDDocument 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.
de.intarsys.pdf.font.outlet
Interface IFontQuery
All Known Implementing Classes:
FontQuery
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()
Returns:
The desired encoding for the PDFont.
getFontFamilyName
public String getFontFamilyName()
Returns:
The desired font family for the PDFont.
getFontStyle
public FontStyle getFontStyle()
Returns:
The desired font style for the PDFont.
de.intarsys.pdf.font.outlet
Class StandardFontFactory
java.lang.Object
|
+-de.intarsys.pdf.font.outlet.StandardFontFactory
All Implemented Interfaces:
IFontFactory
This one relies on the building blocks for fonts defined in "de.intarsys.afm" and "de.intarsys.truetype".
The factory tries first to resolve the request within the cache of already loaded fonts. If not found, first Type1 (AFM), then
TrueType fonts are looked up.
Remember to properly set up the according registries if you want to access non standard fonts.
Method Summary
PDFont getBoldFlavor(PDFont font)
Methods
getBoldFlavor
public PDFont getBoldFlavor(PDFont font)
setEmbedNew
public void setEmbedNew(boolean embedNew)
getFont
public PDFont getFont(IFontQuery query)
getItalicFlavor
public PDFont getItalicFlavor(PDFont font)
getRegularFlavor
public PDFont getRegularFlavor(PDFont font)
de.intarsys.pdf.font.outlet
Class StandardFontOutlet
java.lang.Object
|
+-de.intarsys.pdf.font.outlet.StandardFontOutlet
All Implemented Interfaces:
IFontOutlet
Constructor Summary
public StandardFontOutlet()
Method Summary
IFontFactory lookupFontFactory(PDDocument doc)
Constructors
StandardFontOutlet
public StandardFontOutlet()
Methods
lookupFontFactory
public IFontFactory lookupFontFactory(PDDocument doc)
de.intarsys.pdf.parser
Class COSDocumentParser
java.lang.Object
|
+-de.intarsys.pdf.parser.PDFParser
|
+-de.intarsys.pdf.parser.COSDocumentParser
The parser will create a object representation of the pdf document using COS level objects.
Constructor Summary
public COSDocumentParser(STDocument doc)
Method Summary
STDocument getDoc()
Constructors
COSDocumentParser
public COSDocumentParser(STDocument doc)
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
Returns:
the startxref value
Throws:
IOException
COSLoadException
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()
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
Constructor Summary
public COSLoadError(String message)
public COSLoadError()
Constructors
COSLoadError
public COSLoadError(String message)
COSLoadError
public COSLoadError(String message,
Throwable cause)
COSLoadError
public COSLoadError()
COSLoadError
public COSLoadError(Throwable cause)
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
Constructor Summary
public COSLoadException(String message)
public COSLoadException()
Method Summary
Object getHint()
Constructors
COSLoadException
public COSLoadException(String message)
COSLoadException
public COSLoadException(String message,
Throwable cause)
COSLoadException
public COSLoadException()
COSLoadException
public COSLoadException(Throwable cause)
Methods
getHint
public Object getHint()
setHint
public void setHint(Object hint)
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
Constructor Summary
public COSLoadWarning(String message)
public COSLoadWarning()
Constructors
COSLoadWarning
public COSLoadWarning(String message)
COSLoadWarning
public COSLoadWarning(String message,
Throwable cause)
COSLoadWarning
public COSLoadWarning()
COSLoadWarning
public COSLoadWarning(Throwable cause)
de.intarsys.pdf.parser
Class CSContentParser
java.lang.Object
|
+-de.intarsys.pdf.parser.PDFParser
|
+-de.intarsys.pdf.parser.CSContentParser
Constructor Summary
public CSContentParser()
create a COSDocumentParser
Method Summary
CSContent parseStream(byte[] data)
parse a content stream.
Constructors
CSContentParser
public CSContentParser()
create a COSDocumentParser
Methods
parseStream
public CSContent parseStream(byte[] data)
throws java.io.IOException,
COSLoadException
Parameters:
data - A byte array containing the encoded content stream
Returns:
the parsed content
Throws:
parseStream
public CSContent parseStream(IRandomAccess input)
throws java.io.IOException,
COSLoadException
Parameters:
input - a open IRandomAccessData positioned at the beginning of the content stream
Returns:
the parsed content
Throws:
IOException
COSLoadException
de.intarsys.pdf.parser
Interface IPDFParserExceptionHandler
Method Summary
void error(COSLoadError error)
Methods
error
public void error(COSLoadError error)
throws COSLoadException
warning
public void warning(COSLoadWarning warning)
throws COSLoadException
de.intarsys.pdf.parser
Class PDFParser
java.lang.Object
|
+-de.intarsys.pdf.parser.PDFParser
Direct Known Subclasses:
COSDocumentParser, CSContentParser
Field Summary
public static final C_WARN_ARRAYSIZE
Value: ImplLimitArray
Value: 618c
Value: 617c
Value: 617b
Value: 616b
Value: ImplLimitName
Value: 614b
Value: 618b
Value: 614a
Value: 618a
Value: 617a
Value: 617d
Value: 617e
Value: ImplLimitString
Value: 616a
Constructor Summary
public PDFParser()
Method Summary
IPDFParserExceptionHa getExceptionHandler()
ndler
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
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
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
C_WARN_ILLEGALHEX
public static final java.lang.String C_WARN_ILLEGALHEX
C_WARN_STRINGTOLONG
public static final java.lang.String C_WARN_STRINGTOLONG
C_WARN_NAMETOLONG
public static final java.lang.String C_WARN_NAMETOLONG
C_WARN_ARRAYSIZE
public static final java.lang.String C_WARN_ARRAYSIZE
C_WARN_SINGLESPACE
public static final java.lang.String C_WARN_SINGLESPACE
C_WARN_SINGLEEOL
public static final java.lang.String C_WARN_SINGLEEOL
C_WARN_STREAMEOL
public static final java.lang.String C_WARN_STREAMEOL
C_WARN_ENDSTREAMEOL
public static final java.lang.String C_WARN_ENDSTREAMEOL
C_WARN_ENDSTREAMCORRUPT
public static final java.lang.String C_WARN_ENDSTREAMCORRUPT
C_WARN_STREAMEXTERNAL
public static final java.lang.String C_WARN_STREAMEXTERNAL
C_WARN_STREAMLENGTH
public static final java.lang.String C_WARN_STREAMLENGTH
C_WARN_SINGLESPACE_OBJ
public static final java.lang.String C_WARN_SINGLESPACE_OBJ
C_WARN_SINGLEEOL_OBJ
public static final java.lang.String C_WARN_SINGLEEOL_OBJ
C_WARN_ENDOBJ_MISSING
public static final java.lang.String C_WARN_ENDOBJ_MISSING
Constructors
PDFParser
public PDFParser()
Methods
isDelimiter
public final static boolean isDelimiter(int i)
Parameters:
i - i a byte representation
Returns:
true if i is a PDF delimiter char
isDigit
public final static boolean isDigit(int i)
Parameters:
i - i a byte representation
Returns:
true if i is a valid digit
isEOL
public final static boolean isEOL(int i)
Parameters:
i - i a byte representation
Returns:
true if i is a valid line terminator
isNumberStart
public final static boolean isNumberStart(int i)
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)
Parameters:
i - i a byte representation
Returns:
true if i is a valid octal digit
isTokenStart
public final static boolean isTokenStart(int i)
Parameters:
i - i a byte representation
Returns:
true if i is a valid string token start
isWhitespace
public final static boolean isWhitespace(int i)
Parameters:
i - i a byte representation
Returns:
true if i is a valid whitespace
toCOSObject
public static COSObject toCOSObject(byte[] data)
throws java.io.IOException,
COSLoadException
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
Parameters:
error
Throws:
COSLoadException
handleWarning
public void handleWarning(COSLoadWarning warning)
throws COSLoadException
Parameters:
warning
Throws:
COSLoadException
parseElement
public Object parseElement(IRandomAccess input)
throws java.io.IOException,
COSLoadException
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
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)
de.intarsys.pdf.pd
Class AbstractBitFlags
java.lang.Object
|
+-de.intarsys.pdf.pd.AbstractBitFlags
Direct Known Subclasses:
AcroFormFieldFlags, AcroFormSigFlags, AnnotationFlags, OutlineItemFlags, SubmitFormFlags,
FontDescriptorFlags, AbstractAccessPermissions
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.
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
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
de.intarsys.pdf.pd
Class AcroFormFieldFlags
java.lang.Object
|
+-de.intarsys.pdf.pd.AbstractBitFlags
|
+-de.intarsys.pdf.pd.AcroFormFieldFlags
• 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
Value: 131072
Value: 67108864
Value: 8388608
Value: 4194304
Value: 262144
Value: 1048576
Value: 4096
Value: 2097152
Value: 4
Value: 16384
Value: 8192
Value: 65536
Value: 32768
Value: 33554432
Value: 1
Value: 2
Value: 134217728
Value: 524288
Constructor Summary
public AcroFormFieldFlags(PDAcroFormField field)
Method Summary
int getValue()
boolean isComb()
boolean isCombo()
boolean isCommitOnSelChange()
boolean isDoNotScroll()
boolean isEdit()
boolean isFileSelect()
boolean isMultiline()
boolean isMultiSelect()
boolean isNoExport()
boolean isNoToggleOff()
boolean isPassword()
boolean isPushbutton()
boolean isRadio()
boolean isRadiosInUnison()
boolean isReadOnly()
boolean isRequired()
void setComb(boolean f)
void setCombo(boolean f)
void setCommitOnSelChange(boolean f)
void setDoNotScroll(boolean f)
void setFileSelect(boolean f)
void setMultiline(boolean f)
void setNoExport(boolean f)
void setPassword(boolean f)
void setPushbutton(boolean f)
void setRadio(boolean f)
void setReadOnly(boolean f)
void setRequired(boolean f)
Fields
Bit_ReadOnly
public static final int Bit_ReadOnly
Constant value: 1
Bit_Required
public static final int Bit_Required
Constant value: 2
Bit_NoExport
public static final int Bit_NoExport
Constant value: 4
Bit_Multiline
public static final int Bit_Multiline
Bit_Password
public static final int Bit_Password
Bit_NoToggleToOff
public static final int Bit_NoToggleToOff
Bit_Radio
public static final int Bit_Radio
Bit_Pushbutton
public static final int Bit_Pushbutton
Bit_Combo
public static final int Bit_Combo
Bit_Edit
public static final int Bit_Edit
Bit_Sort
public static final int Bit_Sort
Bit_FileSelect
public static final int Bit_FileSelect
Bit_MultiSelect
public static final int Bit_MultiSelect
Bit_DoNotSpellCheck
public static final int Bit_DoNotSpellCheck
Bit_DoNotScroll
public static final int Bit_DoNotScroll
Bit_Comb
public static final int Bit_Comb
Bit_RadiosInUnison
public static final int Bit_RadiosInUnison
Bit_CommitOnSelChange
public static final int Bit_CommitOnSelChange
Bit_RichText
public static final int Bit_RichText
Constructors
AcroFormFieldFlags
public AcroFormFieldFlags(PDAcroFormField field)
Methods
setCombo
public void setCombo(boolean f)
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()
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)
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()
isRequired
public boolean isRequired()
getValue
public int getValue()
By implementing this method the subclass provides the integer which contains the bit flags.
de.intarsys.pdf.pd
Class AcroFormSigFlags
java.lang.Object
|
+-de.intarsys.pdf.pd.AbstractBitFlags
|
+-de.intarsys.pdf.pd.AcroFormSigFlags
• 0: default
• 1: SignatureExists
• 2: AppendOnly
Field Summary
public static Bit_AppendOnly
Constructor Summary
public AcroFormSigFlags(PDAcroForm form)
Method Summary
boolean isAppendOnly()
boolean isSignatureExists()
Fields
Bit_SignatureExists
public static int Bit_SignatureExists
Bit_AppendOnly
public static int Bit_AppendOnly
Constructors
AcroFormSigFlags
public AcroFormSigFlags(PDAcroForm form)
Methods
setAppendOnly
public void setAppendOnly(boolean appendOnly)
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)
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
isSignatureExists
public boolean isSignatureExists()
Returns:
signatureExists flag
See Also:
setSignatureExists(boolean)
de.intarsys.pdf.pd
Class AnnotationFlags
java.lang.Object
|
+-de.intarsys.pdf.pd.AbstractBitFlags
|
+-de.intarsys.pdf.pd.AnnotationFlags
• 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
Value: 1
Value: 128
Value: 512
Value: 16
Value: 32
Value: 8
Value: 4
Value: 64
Value: 256
Constructor Summary
public AnnotationFlags(PDAnnotation annotation)
Method Summary
boolean isHidden()
boolean isInvisible()
boolean isLocked()
boolean isLockedContents()
boolean isNoRotate()
boolean isNoView()
boolean isNoZoom()
boolean isPrint()
boolean isReadOnly()
boolean isToggleNoView()
void setHidden(boolean f)
void setInvisible(boolean f)
void setLocked(boolean f)
void setLockedContents(boolean f)
void setNoRotate(boolean f)
void setNoView(boolean f)
void setNoZoom(boolean f)
void setPrint(boolean f)
void setReadOnly(boolean f)
void setToggleNoView(boolean f)
Fields
Bit_Invisible
public static final int Bit_Invisible
Constant value: 1
Bit_Hidden
public static final int Bit_Hidden
Constant value: 2
Bit_Print
public static final int Bit_Print
Constant value: 4
Bit_NoZoom
public static final int Bit_NoZoom
Constant value: 8
Bit_NoRotate
public static final int Bit_NoRotate
Constant value: 16
Bit_NoView
public static final int Bit_NoView
Constant value: 32
Bit_ReadOnly
public static final int Bit_ReadOnly
Constant value: 64
Bit_Locked
public static final int Bit_Locked
Bit_ToggleNoView
public static final int Bit_ToggleNoView
Bit_LockedContents
public static final int Bit_LockedContents
Constructors
AnnotationFlags
public AnnotationFlags(PDAnnotation annotation)
Methods
setHidden
public void setHidden(boolean f)
isHidden
public boolean isHidden()
setInvisible
public void setInvisible(boolean f)
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)
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()
de.intarsys.pdf.pd
Class DefaultAppearance
java.lang.Object
|
+-de.intarsys.pdf.pd.DefaultAppearance
A internal representation of the parsed CSContent for the default appearance content stream fragment in a PDAcroFormField.
Constructor Summary
public DefaultAppearance(PDAcroFormNode node)
Method Summary
PDFont getFont()
float[] getFontColorValues()
parse the requested font color from the default appearance string
COSName getFontName()
float getFontSize()
PDAcroFormNode getNode()
Constructors
DefaultAppearance
public DefaultAppearance(PDAcroFormNode node)
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)
setFontSize
public void setFontSize(float pFontSize)
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
Constructor Summary
public DefaultAppearance.DefaultAppearanceDevice()
Method Summary
void setNonStrokeColorSpace(COSName name, PDColorSpace colorSpace)
Constructors
DefaultAppearance.DefaultAppearanceDevice
public DefaultAppearance.DefaultAppearanceDevice()
Methods
textSetFont
public void textSetFont(COSName name,
PDFont paramFont,
float size)
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)
de.intarsys.pdf.pd
Interface IAdditionalActionSupport
All Known Implementing Classes:
PDAcroFormField, PDAnnotation, PDDocument, PDPage
A PD object that supports additional actions. Additional actions are actions associated with a variety of trigger events.
Field Summary
public static final DK_AA
Method Summary
PDAdditionalActions getAdditionalActions()
java.util.Set getSupportedTriggerEvents()
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()
de.intarsys.pdf.pd
Interface IResourcesProvider
All Subinterfaces:
IContentStreamProvider
Method Summary
PDResources getResources()
Methods
getResources
public PDResources getResources()
setResources
public void setResources(PDResources resources)
de.intarsys.pdf.pd
Class OutlineItemFlags
java.lang.Object
|
+-de.intarsys.pdf.pd.AbstractBitFlags
|
+-de.intarsys.pdf.pd.OutlineItemFlags
• 0: show in italic
• 1: show in bold
Field Summary
public static final Bit_Bold
Value: 2
Value: 1
Constructor Summary
public OutlineItemFlags(PDOutlineItem outlineItem)
Method Summary
boolean isBold()
boolean isItalic()
Fields
Bit_Italic
public static final int Bit_Italic
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()
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
Field Summary
public static final DK_CO
The name of the CalculationOrder entry.
Method Summary
void addField(PDAcroFormField field)
COSObject cosGetXfa()
The /XFA entry of this.
PDAcroForm getAcroForm()
java.util.List getCalculationOrder()
A collection containing the PDAcroFormField objects in their calculation order or null if no
/C events are defined.
PDResources getDefaultResources()
The default resource dictionary.
java.util.List getFields()
A list of all direct PDAcroFormField instances associated with this object.
java.util.List getGenericChildren()
boolean getNeedAppearances()
true if /NeedAppearances is set for this form.
AcroFormSigFlags getSigFlags()
The flags associated with an AcroForm.
void invalidateCaches()
boolean isSignatureExists()
true if this form has a signature field.
boolean isSigned()
true if this form has a signed signature field.
String toString()
Fields
DK_Fields
public static final de.intarsys.pdf.cos.COSName DK_Fields
DK_NeedAppearances
public static final de.intarsys.pdf.cos.COSName DK_NeedAppearances
DK_SigFlags
public static final de.intarsys.pdf.cos.COSName DK_SigFlags
See Also:
AcroFormSigFlags
DK_CO
public static final de.intarsys.pdf.cos.COSName DK_CO
DK_XFA
public static final de.intarsys.pdf.cos.COSName DK_XFA
META
public static final de.intarsys.pdf.pd.PDAcroForm.MetaClass META
Methods
getAcroForm
public PDAcroForm getAcroForm()
setDefaultResources
public void setDefaultResources(PDResources newResources)
Parameters:
newResources - The new default resource dictionary.
getDefaultResources
public PDResources getDefaultResources()
With 1.5 this is no longer supported as an entry in field dictionaries, only in the form itself.
Returns:
The default resource dictionary.
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()
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.
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).
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()
Returns:
true if /NeedAppearances is set for this form.
getSigFlags
public AcroFormSigFlags getSigFlags()
Returns:
The flags associated with an AcroForm.
addField
public void addField(PDAcroFormField field)
removeField
public boolean removeField(PDAcroFormField field)
toString
public String toString()
invalidateCaches
public void invalidateCaches()
Invalidate all local caches as the base object may have changed.
cosGetXfa
public COSObject cosGetXfa()
Returns:
The /XFA entry of this.
isSigned
public boolean isSigned()
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.
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
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
Field Summary
public static final ACROFORMFIELD_ACTION_TRIGGERS
supported additional action triggers
Method Summary
void addAnnotation(PDWidgetAnnotation annot)
Insert a new PDAnnotation object for the form field.
int basicGetFieldFlags()
Get the integer representing the field flags.
PDAcroFormField copy()
Copy the receiver.
COSObject cosGetDefaultValue()
Tries to return a valid /DV entry:
COSName cosGetFieldType()
The real AcroForm field type of this.
COSObject cosGetValue()
Tries to return a valid /V entry:
PDAcroForm getAcroForm()
PDAdditionalActions getAdditionalActions()
String getAlternateFieldName()
The fields alternate name.
PDAnnotation getAnyAnnotation()
Deprecated.
String getDefaultValueString()
The value from cosGetDefaultValue() converted to a String
AcroFormFieldFlags getFieldFlags()
The flags associated with the form field.
java.util.List getGenericChildren()
PDObject getGenericParent()
java.util.List getKids()
The child nodes of this (named after the /Kids key in the defining COSDictionary);
String getLocalName()
The local name for this node.
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.
String getQualifiedName()
A fully qualified name for this.
java.util.Set getSupportedTriggerEvents()
String getValueString()
The value from cosGetValue() converted to a String
void invalidateCaches()
boolean isAlignmentCenter()
true if variable text in this is centered.
boolean isAlignmentLeft()
true if variable text in this is left aligned.
boolean isAlignmentRight()
true if variable text in this is right aligned.
boolean isAnnotation()
Returns true when the field is an annotation
boolean isComb()
Convenience to access "comb" flag.
boolean isDoNotScroll()
Convenience to access "DoNotScroll" flag.
boolean isMultiline()
Convenience to access "Multiline" flag.
boolean isNoExport()
Convenience to access "NoExport" flag.
boolean isReadOnly()
Convenience to access "ReadOnly" flag.
boolean isTypeBtn()
Return true if this is a field of type "Btn".
boolean isTypeCh()
Return true if this is a field of type "Ch".
boolean isTypeSig()
Return true if this is a field of type "Sig".
boolean isTypeTx()
Return true if this is a text field.
void reset()
Reset this to its default value.
void setAlignmentCenter()
Make variable text centered.
void setAlignmentLeft()
Make variable text left aligned.
void setAlignmentRight()
Make variable text right aligned.
void setComb(boolean f)
Convenience method to access "Comb" flag.
void setDoNotScroll(boolean f)
Convenience method to access "DoNotScroll" flag.
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.
String toString()
Fields
DK_FT
public static final de.intarsys.pdf.cos.COSName DK_FT
CN_FT_Btn
public static final de.intarsys.pdf.cos.COSName CN_FT_Btn
CN_FT_Tx
public static final de.intarsys.pdf.cos.COSName CN_FT_Tx
CN_FT_Ch
public static final de.intarsys.pdf.cos.COSName CN_FT_Ch
CN_FT_Sig
public static final de.intarsys.pdf.cos.COSName CN_FT_Sig
DK_Parent
public static final de.intarsys.pdf.cos.COSName DK_Parent
DK_Kids
public static final de.intarsys.pdf.cos.COSName DK_Kids
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
DK_TM
public static final de.intarsys.pdf.cos.COSName DK_TM
DK_Ff
public static final de.intarsys.pdf.cos.COSName DK_Ff
See Also:
DK_V
public static final de.intarsys.pdf.cos.COSName DK_V
DK_DV
public static final de.intarsys.pdf.cos.COSName DK_DV
ALIGNMENT_LEFT
public static final int ALIGNMENT_LEFT
ALIGNMENT_CENTER
public static final int ALIGNMENT_CENTER
ALIGNMENT_RIGHT
public static final int ALIGNMENT_RIGHT
DK_DS
public static final de.intarsys.pdf.cos.COSName DK_DS
DK_RV
public static final de.intarsys.pdf.cos.COSName DK_RV
ACROFORMFIELD_ACTION_TRIGGERS
public static final java.util.Set ACROFORMFIELD_ACTION_TRIGGERS
META
public static final de.intarsys.pdf.pd.PDAcroFormField.MetaClass META
DK_MaxLen
public static final de.intarsys.pdf.cos.COSName DK_MaxLen
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)
basicGetFieldFlags
public int basicGetFieldFlags()
Returns:
Get the integer representing the field flags.
basicSetFieldFlags
public void basicSetFieldFlags(int newFlags)
Parameters:
newFlags - The new flags
copy
public PDAcroFormField copy()
Returns:
A copy of the receiver.
cosGetDefaultValue
public COSObject cosGetDefaultValue()
Returns:
see description
cosGetExpectedFieldType
public abstract COSName cosGetExpectedFieldType()
Returns:
The AcroForm field type expected for this.
cosGetFieldType
public COSName cosGetFieldType()
Returns:
The real AcroForm field type of this.
cosGetValue
public COSObject cosGetValue()
Tries to return a valid /V entry:
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.
dispose
public void dispose(boolean disposeEmptyAncestors)
Deprecated.
Parameters:
disposeEmptyAncestors
getAcroForm
public PDAcroForm getAcroForm()
getAdditionalActions
public PDAdditionalActions getAdditionalActions()
getAlternateFieldName
public String getAlternateFieldName()
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()
Returns:
The flags associated with the form field.
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.
getGenericParent
public PDObject getGenericParent()
The parent of the receiver if it is a node in a hierarchical structure (like page nodes or form fields).
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 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.
getLogicalRoot
public PDAcroFormField getLogicalRoot()
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()
Returns:
The maximum length for this field or null if not defined.
getParent
public PDAcroFormField getParent()
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()
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.
getSupportedTriggerEvents
public java.util.Set getSupportedTriggerEvents()
getValueString
public String getValueString()
Returns:
The value from cosGetValue() converted to a String
getDefaultValueString
public String getDefaultValueString()
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()
Returns:
true if variable text in this is centered.
isAlignmentLeft
public boolean isAlignmentLeft()
Returns:
true if variable text in this is left aligned.
isAlignmentRight
public boolean isAlignmentRight()
Returns:
true if variable text in this is right aligned.
isAnnotation
public boolean isAnnotation()
Returns:
true when the field is an annotation
isComb
public boolean isComb()
isDoNotScroll
public boolean isDoNotScroll()
isMultiline
public boolean isMultiline()
isNoExport
public boolean isNoExport()
isReadOnly
public boolean isReadOnly()
isTypeBtn
public boolean isTypeBtn()
Returns:
Return true if this is a field of type "Btn".
isTypeCh
public boolean isTypeCh()
Returns:
isTypeSig
public boolean isTypeSig()
Returns:
Return true if this is a field of type "Sig".
isTypeTx
public boolean isTypeTx()
Returns:
Return true if this is a field of type "Tx".
removeField
public boolean removeField(PDAcroFormField field)
reset
public void reset()
setAdditionalActions
public void setAdditionalActions(PDAdditionalActions actions)
setAlignmentCenter
public void setAlignmentCenter()
setAlignmentLeft
public void setAlignmentLeft()
setAlignmentRight
public void setAlignmentRight()
setAlternateFieldName
public void setAlternateFieldName(String newAlternateFieldName)
Parameters:
newAlternateFieldName - The new alternate field name
setComb
public void setComb(boolean f)
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)
setLocalName
public void setLocalName(String newLocalName)
Parameters:
newLocalName - The new local name
setMaxLength
public void setMaxLength(Integer newMaxLength)
Parameters:
newMaxLength - The new maximum length
setMultiline
public void setMultiline(boolean f)
setNoExport
public void setNoExport(boolean f)
setReadOnly
public void setReadOnly(boolean f)
setValueString
public void setValueString(String value)
Parameters:
value - The new value of this, represented by a java.lang.String.
setValueStrings
public void setValueStrings(java.util.List values)
Parameters:
values - The new value.
toString
public String toString()
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
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
Abstract superclass to factor out commons between AcroForm and AcroForm field.
Field Summary
public static final DK_DA
The name for the DefaultAppereance entry.
Method Summary
abstract void addField(PDAcroFormField field)
Insert a PDAcroFormField in the receiver node.
java.util.List collectLeafFields()
The list of all final nodes (fields) within this node.
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,
int getQuadding()
The justification of variable text within the field.
void invalidateCaches()
Fields
DK_Encoding
public static final de.intarsys.pdf.cos.COSName DK_Encoding
DK_DR
public static final de.intarsys.pdf.cos.COSName DK_DR
DK_Font
public static final de.intarsys.pdf.cos.COSName DK_Font
DK_DA
public static final de.intarsys.pdf.cos.COSName DK_DA
DK_Q
public static final de.intarsys.pdf.cos.COSName DK_Q
META
public static final de.intarsys.pdf.pd.PDAcroFormNode.MetaClass META
Methods
canonicalize
public static String canonicalize(String name)
Parameters:
name - The field name to be converted.
Returns:
The canonical for of the field name.
addField
public abstract void addField(PDAcroFormField field)
Parameters:
field - The field to be inserted.
removeField
public abstract boolean removeField(PDAcroFormField field)
Parameters:
field - The field to remove.
Returns:
true if field was removed.
getAcroForm
public abstract PDAcroForm getAcroForm()
Returns:
The PDAcroForm for this node.
getAnnotation
public PDAnnotation getAnnotation(int index)
Returns:
An annotation from the tree beyond this identified by index.
getAnnotations
public java.util.List getAnnotations()
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()
Returns:
The font object defined by the default appearance.
getDefaultAppearanceFontColor
public float[] getDefaultAppearanceFontColor()
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()
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.
Returns:
The sub-node identified by path
collectLeafFields
public java.util.List collectLeafFields()
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.
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)
Parameters:
quadding - THe new quadding value
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
Method Summary
Class getRootClass()
Methods
getRootClass
public Class getRootClass()
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
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.
Field Summary
public static final CN_Type_Action
Method Summary
void addNext(PDAction action)
Add a new PDAction to be executed after this.
COSName cosGetActionType()
The real action type.
java.util.List getNext()
The java.util.List of PDAction instances that must be executed after this.
Fields
META
public static final de.intarsys.pdf.pd.PDAction.MetaClass META
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()
Returns:
The action type expected for a PDAction of the instantiated class.
cosGetActionType
public COSName cosGetActionType()
Returns:
The real action type.
getNext
public java.util.List getNext()
Returns:
The java.util.List of PDAction instances that must be executed after this.
addNext
public void addNext(PDAction action)
Parameters:
action - The new PDAction
removeNext
public void removeNext(PDAction action)
Parameters:
action - The PDAction to be removed
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
Method Summary
Class getRootClass()
Methods
getRootClass
public Class getRootClass()
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
Field Summary
public static final CN_ActionType_GoTo3DView
Method Summary
COSName cosGetExpectedActionType()
Fields
CN_ActionType_GoToE
public static final de.intarsys.pdf.cos.COSName CN_ActionType_GoToE
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
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
Methods
cosGetExpectedActionType
public COSName cosGetExpectedActionType()
createNew
public static PDActionAny createNew(COSName actionType)
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
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
Field Summary
public static final CN_ActionType_GoTo
Method Summary
COSName cosGetExpectedActionType()
PDDestination getDestination()
void invalidateCaches()
Fields
META
public static final de.intarsys.pdf.pd.PDActionGoTo.MetaClass META
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()
getDestination
public PDDestination getDestination()
invalidateCaches
public void invalidateCaches()
Invalidate all local caches as the base object may have changed.
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
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
Field Summary
public static final CN_ActionType_GoToR
Method Summary
COSName cosGetExpectedActionType()
PDDestination getDestination()
java.io.File getFile()
void invalidateCaches()
boolean isNewWindow()
Fields
META
public static final de.intarsys.pdf.pd.PDActionGoToR.MetaClass META
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()
getDestination
public PDDestination getDestination()
getFile
public java.io.File getFile()
isNewWindow
public boolean isNewWindow()
invalidateCaches
public void invalidateCaches()
Invalidate all local caches as the base object may have changed.
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
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
Field Summary
public static final CN_ActionType_JavaScript
Method Summary
COSName cosGetExpectedActionType()
String getJavaScript()
Fields
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
Methods
createNew
public static PDActionJavaScript createNew(String script)
decodeSource
public static String decodeSource(COSObject cosSource)
cosGetExpectedActionType
public COSName cosGetExpectedActionType()
getJavaScript
public String getJavaScript()
setJavaScript
public void setJavaScript(String newJavaScript)
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
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
Field Summary
public static final CN_ActionType_Launch
Method Summary
COSName cosGetExpectedActionType()
java.io.File getFile()
boolean isNewWindow()
Fields
META
public static final de.intarsys.pdf.pd.PDActionLaunch.MetaClass META
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()
getFile
public java.io.File getFile()
isNewWindow
public boolean isNewWindow()
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
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
A named action.
When executed the action performs one of the defined named actions within the document.
Field Summary
public static final CN_ActionType_Named
Method Summary
COSName cosGetExpectedActionType()
COSName cosGetName()
Fields
META
public static final de.intarsys.pdf.pd.PDActionNamed.MetaClass META
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()
createNew
public static PDActionNamed createNew(String name)
cosGetName
public COSName cosGetName()
cosSetName
public COSName cosSetName(COSName name)
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
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
Field Summary
public static final CN_ActionType_ResetForm
Method Summary
COSName cosGetExpectedActionType()
static createNew()
PDActionResetForm
java.util.List getFields()
A list of field names (plain Java String) to be resetted or null.
boolean isExclude()
Fields
META
public static final de.intarsys.pdf.pd.PDActionResetForm.MetaClass META
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()
isExclude
public boolean isExclude()
getFields
public java.util.List getFields()
Returns:
A list of field names (plain Java String) to be resetted or null.
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
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
When executed the action submit the documents AcroForm acording to the defined flags.
Field Summary
public static final CN_ActionType_SubmitForm
Method Summary
COSName cosGetExpectedActionType()
java.util.List getFields()
A list of field names (plain Java String) to be resetted or null.
java.net.URL getUrl()
boolean isCanonicalFormat()
boolean isEmbedForm()
boolean isExclFKey()
boolean isExclNonUserAnnots()
boolean isExportFormat()
boolean isGetMethod()
boolean isInclude()
boolean isIncludeAnnotations()
boolean isIncludeAppendSaves()
boolean isIncludeNoValueFields()
boolean isNotDEFINED()
boolean isSubmitCoordinates()
boolean isSubmitPDF()
boolean isXFDF()
Fields
META
public static final de.intarsys.pdf.pd.PDActionSubmitForm.MetaClass META
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()
setCanonicalFormat
public void setCanonicalFormat(boolean flag)
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()
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()
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)
isXFDF
public boolean isXFDF()
createNew
public static PDActionSubmitForm createNew(java.net.URL url)
getFields
public java.util.List getFields()
Returns:
A list of field names (plain Java String) to be resetted or null.
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
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
Field Summary
public static final CN_ActionType_URI
Method Summary
COSName cosGetExpectedActionType()
String getURI()
boolean isMap()
Fields
META
public static final de.intarsys.pdf.pd.PDActionURI.MetaClass META
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()
createNew
public static PDActionURI createNew(String uri)
getURI
public String getURI()
setURI
public void setURI(String uri)
isMap
public boolean isMap()
setMap
public void setMap(boolean map)
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
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
An object defining the association of an event to an action for a PDF document object, for example a PDPage.
Field Summary
public static final CN_T_Mouse_Down
Method Summary
void addAction(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
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
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
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
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
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)
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
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
Field Summary
public static final DK_Opt
Method Summary
COSName cosGetExpectedFieldType()
java.util.Set getAvailableButtonAppearanceStates()
The java.util.Set of possible states the button can enter.
java.util.Set getAvailableButtonAppearanceStatesNoOff()
The java.util.Set of possible non - off states the button can enter.
boolean isCheckbox()
Return true when this is an object with checkbox behavior.
boolean isChecked()
true if this is checked.
boolean isPushbutton()
true if this is a pushbutton.
boolean isRadio()
true if this is a radio button.
boolean isTypeBtn()
void reset()
void setPushbutton(boolean f)
Make this a push button.
Fields
META
public static final de.intarsys.pdf.pd.PDAFButtonField.MetaClass META
DK_Opt
public static final de.intarsys.pdf.cos.COSName DK_Opt
Methods
isCheckbox
public boolean isCheckbox()
Returns:
true when this is an object with checkbox behavior.
cosGetExpectedFieldType
public COSName cosGetExpectedFieldType()
setPushbutton
public void setPushbutton(boolean f)
Parameters:
f
isPushbutton
public boolean isPushbutton()
Returns:
true if this is a pushbutton.
isRadio
public boolean isRadio()
Returns:
true if this is a radio button.
isTypeBtn
public boolean isTypeBtn()
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)
getAvailableButtonAppearanceStates
public java.util.Set getAvailableButtonAppearanceStates()
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.
reset
public void reset()
isChecked
public boolean isChecked()
Returns:
true if this is checked.
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
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
Field Summary
public static final DK_I
Method Summary
COSName cosGetExpectedFieldType()
java.util.List getExportValues()
A List containing the option export values as Strings.
java.util.List getOptionNames()
A List containing the option names as Strings.
java.util.List getValueList()
The value stored in this field as a java.util.List of java.lang.String objects
void invalidateCaches()
boolean isCombo()
Convenience method to access "Combo" flag.
boolean isCommitOnSelChange()
Convenience method to access "CommitOnSelChange" flag.
boolean isEdit()
Convenience method to access "Edit" flag.
boolean isMultiSelect()
Convenience method to access "MultiSelect" flag.
boolean isTypeCh()
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
Methods
cosGetExpectedFieldType
public COSName cosGetExpectedFieldType()
getExportValues
public java.util.List getExportValues()
Returns:
a List containing the option export values as Strings. The result will never be null.
getOptionNames
public java.util.List getOptionNames()
Returns:
a List containing the option names as Strings. The result will never be null.
getValueList
public java.util.List getValueList()
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()
isCommitOnSelChange
public boolean isCommitOnSelChange()
isEdit
public boolean isEdit()
isMultiSelect
public boolean isMultiSelect()
isTypeCh
public boolean isTypeCh()
setOptions
public void setOptions(java.util.Map options)
Parameters:
options - A java.util.Map containing the new options.
setOptions
public void setOptions(String[] names,
String[] values)
Parameters:
names
values
setValueString
public void setValueString(String value)
setValueStrings
public void setValueStrings(java.util.List values)
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
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
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
Constructors
PDAFIntermediateNode
public PDAFIntermediateNode(COSObject object)
Methods
cosGetExpectedFieldType
public COSName cosGetExpectedFieldType()
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
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
Field Summary
public static final DK_Lock
Method Summary
void clearSignature()
COSName cosGetExpectedFieldType()
PDSignature getSignature()
The associated PDSignature if available.
void invalidateCaches()
boolean isSigned()
true if this field is already signed.
boolean isTypeSig()
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
Methods
cosGetExpectedFieldType
public COSName cosGetExpectedFieldType()
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()
Returns:
The associated PDSignature if available.
isSigned
public boolean isSigned()
Returns:
isTypeSig
public boolean isTypeSig()
setSignature
public void setSignature(PDSignature newSignature)
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()
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
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
Field Summary
public static final META
The meta class instance
Method Summary
COSName cosGetExpectedFieldType()
String getDefaultValueString()
String getValueString()
boolean isTypeTx()
void reset()
Fields
META
public static final de.intarsys.pdf.pd.PDAFTextField.MetaClass META
Methods
cosGetExpectedFieldType
public COSName cosGetExpectedFieldType()
setValueString
public void setValueString(String value)
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()
getDefaultValueString
public String getDefaultValueString()
isTypeTx
public boolean isTypeTx()
reset
public void reset()
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
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
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.
Field Summary
public static final ANNOTATION_ACTION_TRIGGERS
supported additional action triggers
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.
boolean canReceiveFocus()
true if this can receive the focus in an interactive viewer.
PDAnnotation copy()
Create a copy of the receiver.
void dispose()
Deprecated.
PDAction getAction()
The PDAction to be executed when this is "activated".
PDAdditionalActions getAdditionalActions()
PDAppearance getAppearance()
The visual appearance of this.
COSName getAppearanceState()
The visual appearance state of this.
java.util.Set getAppearanceStates()
All defined appearance states in this.
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.
java.util.Set getSupportedTriggerEvents()
void invalidateCaches()
boolean isHidden()
Convenience method to access "Hidden" flag.
boolean isInvisible()
Convenience method to access "Invisible" flag.
boolean isLocked()
Convenience method to access "Locked" flag.
boolean isMarkupAnnotation()
true if this is a PDMarkupAnnotation.
boolean isNoRotate()
Convenience method to access "NoRotate" flag.
boolean isNoView()
Convenience method to access "NoView" flag.
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 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 setNoRotate(boolean f)
Convenience method to access "NoRotate" flag.
void setNoView(boolean f)
Convenience method to access "NoView" flag.
void setNoZoom(boolean f)
Convenience method to access "NoZoom" flag.
void setPrint(boolean f)
Convenience method to access "Print" flag.
void setToggleNoView(boolean f)
Convenience method to access "ToggleNoView" flag.
boolean supportsPrint()
true if print flag can be selected/changed for this kind of annotation.
String toString()
void touch()
Assign the current date as the date of last modification.
Fields
META
public static final de.intarsys.pdf.pd.PDAnnotation.MetaClass META
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
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
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
Methods
addAction
public void addAction(PDAction newAction)
Parameters:
newAction - The PDAction to be executed.
basicGetFlags
public int basicGetFlags()
Returns:
The annotation flags in its integer representation.
basicSetFlags
public void basicSetFlags(int newFlags)
Parameters:
newFlags - The new annotation flags.
canReceiveFocus
public boolean canReceiveFocus()
Returns:
true if this can receive the focus in an interactive viewer.
copy
public PDAnnotation copy()
Returns:
A copy of the receiver.
dispose
public void dispose()
Deprecated.
getAction
public PDAction getAction()
Returns:
The PDAction to be executed when this is "activated".
getAdditionalActions
public PDAdditionalActions getAdditionalActions()
getAppearance
public PDAppearance getAppearance()
Returns:
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()
Returns:
All defined appearance states in this.
getBorderStyle
public PDBorderStyle getBorderStyle()
Returns:
The annotations border style.
getBorderStyleName
public COSName getBorderStyleName()
Returns:
The name of the border style.
getBorderStyleWidth
public float getBorderStyleWidth()
Returns:
The width of the annotations border.
getColor
public float[] getColor()
Returns:
The color values for this.
getContents
public String getContents()
Returns:
The contents java.lang.String for this.
getFlags
public AnnotationFlags getFlags()
Returns:
The annotation flags.
getModified
public CDSDate getModified()
Returns:
The last modification date.
getName
public String getName()
Returns:
The annotations name.
getNormalizedRectangle
public CDSRectangle getNormalizedRectangle()
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()
Returns:
getSubtypeLabel
public abstract String getSubtypeLabel()
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()
isInvisible
public boolean isInvisible()
isLocked
public boolean isLocked()
isMarkupAnnotation
public boolean isMarkupAnnotation()
Returns:
true if this is a PDMarkupAnnotation.
isNoRotate
public boolean isNoRotate()
isNoView
public boolean isNoView()
isNoZoom
public boolean isNoZoom()
isPrint
public boolean isPrint()
supportsPrint
public boolean supportsPrint()
Returns:
true if print flag can be selected/changed for this kind of annotation.
isReadOnly
public boolean isReadOnly()
isToggleNoView
public boolean isToggleNoView()
isWidgetAnnotation
public boolean isWidgetAnnotation()
Returns:
true if this is a PDWidgetAnnotation.
setAction
public void setAction(PDAction newAction)
Parameters:
newAction - Set the PDAction for the "activation" of this.
setAdditionalActions
public void setAdditionalActions(PDAdditionalActions actions)
setAppearance
public void setAppearance(PDAppearance newAppearance)
Parameters:
newAppearance - The new PDAppearance.
setAppearanceState
public void setAppearanceState(COSName newAppearanceState)
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)
Parameters:
newStyle - The new border style name.
setBorderStyleWidth
public void setBorderStyleWidth(float newWidth)
Parameters:
newWidth - The new Border width.
setColor
public void setColor(float[] color)
Assign a color.
Parameters:
setContents
public void setContents(String newContents)
Parameters:
newContents - The new content java.lang.String.
setHidden
public void setHidden(boolean f)
setInvisible
public void setInvisible(boolean f)
setLocked
public void setLocked(boolean f)
setName
public void setName(String newName)
Assign a name.
Parameters:
newName - The new name.
setNoRotate
public void setNoRotate(boolean f)
setNoView
public void setNoView(boolean f)
setNoZoom
public void setNoZoom(boolean f)
setPrint
public void setPrint(boolean f)
setReadOnly
public void setReadOnly(boolean readOnly)
setRectangle
public void setRectangle(CDSRectangle newRectangle)
Parameters:
newRectangle - Assign a CDSRectangle for the visual appearance of this.
setToggleNoView
public void setToggleNoView(boolean f)
toString
public String toString()
touch
public void touch()
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
Method Summary
Class getRootClass()
Methods
getRootClass
public Class getRootClass()
de.intarsys.pdf.pd
Class PDAnnotationTools
java.lang.Object
|
+-de.intarsys.pdf.pd.PDAnnotationTools
Field Summary
public static final CAPTION_CHECK
Value: 4
Value: l
Value: 8
Value: u
Value: n
Value: H
Method Summary
static PDAppearance getAppearance(PDAnnotation annotation)
The PDAppearance for annotation.
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
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)
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.
getStateChecked
public static COSName getStateChecked(PDWidgetAnnotation 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".
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
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
Methods
getSubtypeLabel
public String getSubtypeLabel()
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
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
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.
Field Summary
public static final DK_D
Method Summary
PDForm getAppearance(COSName key, COSName state)
The PDForm for state state.
boolean isDefined()
true if this appearance dictionary has valid contents.
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
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.
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.
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
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
Field Summary
public static final DK_AC
Value: 3
Value: 2
Value: 5
Value: 0
Value: 6
Value: 4
Value: 1
Method Summary
COSStream cosGetDownIcon()
COSStream cosGetNormalIcon()
COSStream cosGetRolloverIcon()
float[] getBackgroundColor()
float[] getBorderColor()
String getDownCaption()
PDIconFit getIconFit()
String getNormalCaption()
String getRolloverCaption()
int getRotation()
int getTextPosition()
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
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
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.
META
public static final de.intarsys.pdf.pd.PDAppearanceCharacteristics.MetaClass META
Methods
getBackgroundColor
public float[] getBackgroundColor()
getBorderColor
public float[] getBorderColor()
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)
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)
setRotation
public void setRotation(int newRotation)
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
de.intarsys.pdf.pd
Class PDAppearanceTools
java.lang.Object
|
+-de.intarsys.pdf.pd.PDAppearanceTools
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".
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".
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)
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
Field Summary
public static final DK_LastModified
Method Summary
COSObject cosGetData()
The private data entry or COSNull
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
DK_Private
public static final de.intarsys.pdf.cos.COSName DK_Private
META
public static final de.intarsys.pdf.pd.PDApplicationData.MetaClass META
Methods
cosSetData
public COSObject cosSetData(COSObject data)
Parameters:
data - The private data for this.
Returns:
The /Private entry previously associated with this.
cosGetData
public COSObject cosGetData()
Returns:
The private data entry or COSNull
getLastModification
public CDSDate getLastModification()
Returns:
The timestamp of th elast modification.
touch
public void touch()
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
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
Field Summary
public static final META
The meta class instance
Method Summary
float[] getCoords()
float[] getDomain()
PDFunction getFunction()
int getShadingType()
Fields
META
public static final de.intarsys.pdf.pd.PDAxialShading.MetaClass META
Methods
getCoords
public float[] getCoords()
getDomain
public float[] getDomain()
getFunction
public PDFunction getFunction()
getShadingType
public int getShadingType()
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
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
Field Summary
public static final CN_S_B
Style B: beveled
Method Summary
int[] getDashArray()
COSName getStyle()
float getWidth()
Fields
META
public static final de.intarsys.pdf.pd.PDBorderStyle.MetaClass META
DK_W
public static final de.intarsys.pdf.cos.COSName DK_W
DK_S
public static final de.intarsys.pdf.cos.COSName DK_S
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
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
CN_Type_Border
public static final de.intarsys.pdf.cos.COSName CN_Type_Border
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)
Parameters:
newWidth - The new width.
getWidth
public float getWidth()
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
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
Field Summary
public static final DK_Date
Method Summary
CDSDate getDate()
String getName()
String getOS()
int getR()
int getV()
boolean isNonEFontNoWarn()
boolean isPreRelease()
boolean isTrustedMode()
Fields
META
public static final de.intarsys.pdf.pd.PDBuildData.MetaClass META
DK_Name
public static final de.intarsys.pdf.cos.COSName DK_Name
DK_Date
public static final de.intarsys.pdf.cos.COSName DK_Date
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()
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)
setR
public void setR(int moduleRevision)
setTrustedMode
public void setTrustedMode(boolean trustedMode)
setV
public void setV(int minimumSoftwareVersion)
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
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
Field Summary
public static final DK_App
Method Summary
PDBuildData getApp()
PDBuildData getFilter()
PDBuildData getPubSec()
Fields
META
public static final de.intarsys.pdf.pd.PDBuildProperties.MetaClass META
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)
setPubSec
public void setPubSec(PDBuildData pubSecData)
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
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
Field Summary
public static final CN_CS_CalGray
Method Summary
Object getCachedColorSpace()
void invalidateCaches()
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
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
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
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)
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
Method Summary
Class getRootClass()
Methods
getRootClass
public Class getRootClass()
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
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
Methods
getShadingType
public int getShadingType()
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
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
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
Methods
getAlternate
public PDColorSpace getAlternate()
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
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
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
Methods
getAlternate
public PDColorSpace getAlternate()
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
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
Field Summary
public static final META
The meta class instance
Fields
META
public static final de.intarsys.pdf.pd.PDCSCIEBased.MetaClass META
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
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
Field Summary
public static final META
The meta class instance
Fields
META
public static final de.intarsys.pdf.pd.PDCSDevice.MetaClass META
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
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
Field Summary
public static final META
The meta class instance
Method Summary
String toString()
Fields
META
public static final de.intarsys.pdf.pd.PDCSDeviceCMYK.MetaClass META
SINGLETON
public static de.intarsys.pdf.pd.PDCSDeviceCMYK SINGLETON
Methods
toString
public String toString()
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
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
Field Summary
public static final META
The meta class instance
Method Summary
String toString()
Fields
META
public static final de.intarsys.pdf.pd.PDCSDeviceGray.MetaClass META
SINGLETON
public static de.intarsys.pdf.pd.PDCSDeviceGray SINGLETON
Methods
toString
public String toString()
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
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
Field Summary
public static final META
The meta class instance
Method Summary
PDColorSpace getAlternate()
PDFunction getTintTransform()
Fields
META
public static final de.intarsys.pdf.pd.PDCSDeviceN.MetaClass META
Methods
getAlternate
public PDColorSpace getAlternate()
getTintTransform
public PDFunction getTintTransform()
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
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
Field Summary
public static final META
The meta class instance
Method Summary
String toString()
Fields
META
public static final de.intarsys.pdf.pd.PDCSDeviceRGB.MetaClass META
SINGLETON
public static de.intarsys.pdf.pd.PDCSDeviceRGB SINGLETON
Methods
toString
public String toString()
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
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
Field Summary
public static final DK_Alternate
Method Summary
COSStream cosGetProfileStream()
PDColorSpace getAlternate()
Fields
DK_Alternate
public static final de.intarsys.pdf.cos.COSName DK_Alternate
DK_N
public static final de.intarsys.pdf.cos.COSName DK_N
META
public static final de.intarsys.pdf.pd.PDCSICCBased.MetaClass META
Methods
cosGetProfileStream
public COSStream cosGetProfileStream()
getAlternate
public PDColorSpace getAlternate()
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
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
Field Summary
public static final META
The meta class instance
Method Summary
PDColorSpace getBaseColorSpace()
byte[] getColorBytes()
int getColorCount()
Fields
META
public static final de.intarsys.pdf.pd.PDCSIndexed.MetaClass META
Methods
getColorCount
public int getColorCount()
getBaseColorSpace
public PDColorSpace getBaseColorSpace()
getColorBytes
public byte[] getColorBytes()
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
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
Field Summary
public static final DK_BlackPoint
Method Summary
float[] getWhitePoint()
Fields
DK_BlackPoint
public static final de.intarsys.pdf.cos.COSName DK_BlackPoint
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
Methods
getWhitePoint
public float[] getWhitePoint()
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
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
Field Summary
public static final META
The meta class instance
Fields
META
public static final de.intarsys.pdf.pd.PDCSPattern.MetaClass META
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
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
Field Summary
public static final META
The meta class instance
Method Summary
PDColorSpace getAlternate()
String getName()
PDFunction getTintTransform()
Fields
META
public static final de.intarsys.pdf.pd.PDCSSeparation.MetaClass META
Methods
getAlternate
public PDColorSpace getAlternate()
getName
public String getName()
getTintTransform
public PDFunction getTintTransform()
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
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
Field Summary
public static final META
The meta class instance
Fields
META
public static final de.intarsys.pdf.pd.PDCSSpecial.MetaClass META
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
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
Field Summary
public static final META
The meta class instance
Method Summary
abstract getResolvedDestination(PDDocument doc)
PDExplicitDestination
Fields
META
public static final de.intarsys.pdf.pd.PDDestination.MetaClass META
Methods
getResolvedDestination
public abstract PDExplicitDestination getResolvedDestination(PDDocument doc)
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
Method Summary
Class getRootClass()
Methods
getRootClass
public Class getRootClass()
de.intarsys.pdf.pd
Class PDDocument
java.lang.Object
|
+-de.intarsys.pdf.pd.PDDocument
All Implemented Interfaces:
ILocatorSupport, IAttributeSupport, IAdditionalActionSupport
The PD Level representation of a PDF Document. PD Level objects provide the PDF semantics on top of the COS objects.
A PDDocument object should not be shared between threads without thought. Some clients may store information along with the
PDDocument extensions in a non thread safe manner.
Field Summary
public static final CATALOG_ACTION_TRIGGERS
Method Summary
void addAction(PDAction action)
void close()
Close the document.
PDDocument copyDeep()
Make a deep copy of the receiver.
COSDocument cosGetDoc()
The COS level implementation of the document
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.
PDAcroForm createAcroForm()
create an AcroForm in a PDF Document.
PDPageTree createPageTree()
create a new page tree for this document. tha page tree must still be added to the document
or a page tree to get visible.
IAccessPermissions getAccessPermissions()
Simple delegate to COSDocument.getAccessPermissions()
PDAcroForm getAcroForm()
read an AcroForm from a PDF Document. return null if no AcroForm is available.
PDAdditionalActions getAdditionalActions()
java.util.List getAnnotations()
String getAuthor()
COSCatalog getCatalog()
lookup the catalog dictionary in a document
CDSDate getCreationDate()
String getCreationDateString()
String getCreator()
COSInfoDict getInfoDict()
Get the info dictionary containing metadata.
String getKeywords()
ILocator getLocator()
String getMetadata()
CDSDate getModDate()
String getModDateString()
String getName()
PDAction getOpenAction()
PDOutline getOutline()
java.util.List getOutputIntents()
PDPageTree getPageTree()
return the documents root page tree
String getProducer()
String getSubject()
java.util.Set getSupportedTriggerEvents()
String getTitle()
String getTrapped()
EnumWriteMode getWriteModeHint()
The write mode to be used when the document is written the next time.
boolean isAppendOnly()
true if the document has a flag to prefere incremental save.
boolean isDirty()
boolean isEncrypted()
Lookup if this document is encrypted, means it has a security handler.
boolean isNew()
boolean isPreferIncrementalSave()
true if the document should be saved in an incremental way only.
boolean isReadOnly()
boolean isSigned()
true if the document contains digital signatures.
void save()
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
createFromCos
public static PDDocument createFromCos(COSDocument doc)
throws COSLoadException
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()
Returns:
A new PDDocument.
addAction
public void addAction(PDAction action)
addOpenAction
public void addOpenAction(PDAction newAction)
Parameters:
newAction - The new PDAction
addPageNode
public void addPageNode(PDPageNode newNode)
Parameters:
newNode - The page to be added
addPageNodeAfter
public void addPageNodeAfter(PDPageNode newNode,
PDPageNode destination)
Parameters:
newNode - the page to be added
destination - The page after the new one is inserted
close
public void close()
throws java.io.IOException
Throws:
IOException
copyDeep
public PDDocument copyDeep()
Returns:
the object copied recursively
cosGetDoc
public COSDocument cosGetDoc()
Returns:
The underlying COSDocument
cosGetPermissionsDict
public COSDictionary cosGetPermissionsDict()
Returns:
The permissions dictionary of the document.
cosGetPieceInfoDict
public COSDictionary cosGetPieceInfoDict()
Returns:
The piece info dictionary of the document.
cosGetURI
public COSDictionary cosGetURI()
Returns:
The uri dictionary of the document.
cosSetPermissionsDict
public void cosSetPermissionsDict(COSDictionary permsDict)
Parameters:
permsDict - the new permission dictionary
cosSetPieceInfoDict
public void cosSetPieceInfoDict(COSDictionary dict)
Parameters:
dict - the new piece info dictionary
createAcroForm
public PDAcroForm createAcroForm()
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()
Returns:
document access permissions
getAcroForm
public PDAcroForm getAcroForm()
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()
Returns:
the document catalog object
getCreationDate
public CDSDate getCreationDate()
getCreationDateString
public String getCreationDateString()
getCreator
public String getCreator()
getInfoDict
public COSInfoDict getInfoDict()
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()
getOutline
public PDOutline getOutline()
getOutputIntent
public PDOutputIntent getOutputIntent(COSName oiName)
getOutputIntents
public java.util.List getOutputIntents()
getPageTree
public PDPageTree getPageTree()
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()
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()
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:
isAppendOnly
public boolean isAppendOnly()
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
save
public void save(ILocator locator,
java.util.Map options)
throws java.io.IOException
setAcroForm
public void setAcroForm(PDAcroForm form)
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)
setInfoDict
public void setInfoDict(COSInfoDict infoDict)
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)
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.
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
Field Summary
public static final CN_Type_EmbeddedFile
Method Summary
COSDictionary cosGetDict()
byte[] getBytes()
get the data representing the XObject
Fields
META
public static final de.intarsys.pdf.pd.PDEmbeddedFile.MetaClass META
CN_Type_EmbeddedFile
public static final de.intarsys.pdf.cos.COSName CN_Type_EmbeddedFile
Methods
cosGetDict
public COSDictionary cosGetDict()
getBytes
public byte[] getBytes()
Returns:
get the data representing the XObject
setBytes
public void setBytes(byte[] bytes)
Parameters:
bytes - the data representing the XObject
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
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
The explicit reference to a destination in a PDF document, consisting of a page and a definition of the rectangle to be displayed.
Field Summary
public static final CN_DISPLAY_MODE_Fit
Method Summary
COSName getDisplayMode()
float[] getParameters()
Fields
META
public static final de.intarsys.pdf.pd.PDExplicitDestination.MetaClass META
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
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)
setParameters
public void setParameters(double[] parameters)
getResolvedDestination
public PDExplicitDestination getResolvedDestination(PDDocument doc)
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
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
The extended graphic state object. This is used in a resource dictionary to additionally define graphics context information.
Field Summary
public static final BLEND_MODES
supported additional action triggers
Method Summary
COSName getBlendMode()
float getNonStrokingAlphaConstant()
float getStrokingAlphaConstant()
boolean isBlendModeMultiply()
boolean isBlendModeNormal()
void setBlendModeMultiply()
void setBlendModeNormal()
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
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
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
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
META
public static final de.intarsys.pdf.pd.PDExtGState.MetaClass META
CN_Type_ExtGState
public static final de.intarsys.pdf.cos.COSName CN_Type_ExtGState
Methods
setStrokingAlphaConstant
public void setStrokingAlphaConstant(float alpha)
setNonStrokingAlphaConstant
public void setNonStrokingAlphaConstant(float alpha)
getStrokingAlphaConstant
public float getStrokingAlphaConstant()
getNonStrokingAlphaConstant
public float getNonStrokingAlphaConstant()
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()
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
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
Field Summary
public static final CN_Name_Graph
Constructor Summary
public PDFileAttachmentAnnotation(COSObject object)
Method Summary
PDFileSpecification getFileSpecification()
COSName getIconName()
Fields
META
public static final de.intarsys.pdf.pd.PDFileAttachmentAnnotation.MetaClass META
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
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)
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
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
Field Summary
public static final CN_F_DOS
File specification string for DOS files
Method Summary
PDEmbeddedFile getEmbeddedFile(COSName flavor)
The embedded file of a specific flavor (one of F, DOS, Mac, Unix),
COSDictionary getEmbeddedFiles()
The dictionary mapping the F/DOC/Mac/Unix entries of the file spec to embedded file
dictionaries.
String getFile()
COSName getFileSystem()
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
DK_FS
public static final de.intarsys.pdf.cos.COSName DK_FS
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
CN_F_Mac
public static final de.intarsys.pdf.cos.COSName CN_F_Mac
CN_F_Unix
public static final de.intarsys.pdf.cos.COSName CN_F_Unix
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
DK_RF
public static final de.intarsys.pdf.cos.COSName DK_RF
Methods
setFileSystem
public void setFileSystem(COSName bs)
getFileSystem
public COSName getFileSystem()
getFile
public String getFile()
getEmbeddedFile
public PDEmbeddedFile getEmbeddedFile(COSName flavor)
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)
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
Method Summary
Class getRootClass()
Methods
getRootClass
public Class getRootClass()
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
Field Summary
public static final META
The meta class instance
Method Summary
static createNew(java.net.URL url)
PDFileSpecificationUR
L
java.net.URL getURL()
Fields
META
public static final de.intarsys.pdf.pd.PDFileSpecificationURL.MetaClass META
Methods
setURL
public void setURL(java.net.URL newURL)
getURL
public java.net.URL getURL()
createNew
public static PDFileSpecificationURL createNew(java.net.URL url)
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
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
A form object. A form object specifies a reusable graphical object (not an AcroForm).
Field Summary
public static final CN_Subtype_Form
Method Summary
COSDictionary cosGetPieceInfo()
The piece info dictionary of the document.
CDSRectangle getBoundingBox()
The bounding box of the receiver form.
CSContent getContentStream()
CDSMatrix getMatrix()
The form matrix of the receiver form.
PDResources getResources()
The resource dictionary of the receiver form.
java.awt.geom.Rectang getTransformedBBox()
le2D
Compute a box according to the PDF specification that completely encompasses the
transformed bounding box of the form.
void invalidateCaches()
boolean isForm()
Fields
META
public static final de.intarsys.pdf.pd.PDForm.MetaClass META
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
setApplicationData
public void setApplicationData(COSName name,
PDApplicationData data)
getApplicationData
public PDApplicationData getApplicationData(COSName name)
setBoundingBox
public void setBoundingBox(CDSRectangle rect)
Parameters:
rect - The new bounding box of the receiver.
getBoundingBox
public CDSRectangle getBoundingBox()
Returns:
The bounding box of the receiver form.
getContentStream
public CSContent getContentStream()
setContentStream
public void setContentStream(CSContent content)
isForm
public boolean isForm()
setMarkedContent
public void setMarkedContent(byte[] content)
Parameters:
content - The new variable content of the stream.
setMatrix
public void setMatrix(CDSMatrix matrix)
Parameters:
matrix - The new matrix of the receiver.
getMatrix
public CDSMatrix getMatrix()
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)
Parameters:
content - The new variable content of the stream.
cosGetPieceInfo
public COSDictionary cosGetPieceInfo()
Returns:
The piece info dictionary of the document.
cosSetPieceInfo
public COSDictionary cosSetPieceInfo(COSDictionary dict)
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.
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
de.intarsys.pdf.pd
Class PDFormTools
java.lang.Object
|
+-de.intarsys.pdf.pd.PDFormTools
Method Summary
static PDResources getResources(PDForm form)
Get or create the PDResourceDict for the PDForm lazy.
Methods
getResources
public static PDResources getResources(PDForm form)
Parameters:
form - The form to lookup (and create) the PDResourceDict.
Returns:
The PDResourceDict for form.
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
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
Methods
getShadingType
public int getShadingType()
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
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
Field Summary
public static final DK_Domain
Method Summary
COSArray cosGetDomain()
int getInputSize()
COSArray getRange()
Fields
META
public static final de.intarsys.pdf.pd.PDFunction.MetaClass META
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)
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)
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
Method Summary
Class getRootClass()
Methods
getRootClass
public Class getRootClass()
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
Field Summary
public static final META
The meta class instance
Method Summary
float[] getDomain()
PDFunction getFunction()
float[] getMatrix()
int getShadingType()
Fields
META
public static final de.intarsys.pdf.pd.PDFunctionBasedShading.MetaClass META
Methods
getDomain
public float[] getDomain()
getFunction
public PDFunction getFunction()
getMatrix
public float[] getMatrix()
getShadingType
public int getShadingType()
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
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
Field Summary
public static final CN_S_A
Anamorphic scaling
Method Summary
float[] getAlignment()
COSName getScalingCircumstances()
COSName getScalingMode()
boolean isIgnoreBorderWidth()
Fields
META
public static final de.intarsys.pdf.pd.PDIconFit.MetaClass META
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
CN_SW_A
public static final de.intarsys.pdf.cos.COSName CN_SW_A
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
Methods
setAlignment
public void setAlignment(float[] align)
getAlignment
public float[] getAlignment()
setScalingCircumstances
public void setScalingCircumstances(COSName flag)
getScalingCircumstances
public COSName getScalingCircumstances()
setScalingMode
public void setScalingMode(COSName flag)
getScalingMode
public COSName getScalingMode()
setIgnoreBorderWidth
public void setIgnoreBorderWidth(boolean ignore)
isIgnoreBorderWidth
public boolean isIgnoreBorderWidth()
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
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
Field Summary
public static final C_RENDERING_VALID1
the valid rendering intents *
Value: RelativeColorimetric
Value: AbsoluteColorimetric
Value: Perceptual
Value: Saturation
Method Summary
COSStream cosExtractJPEGStream()
COSObject cosGetColorSpace()
COSObject cosGetMask()
int getBitsPerComponent()
The number of bits per component.
PDColorSpace getColorSpace()
The color space used by the image.
int[] getDecode()
int getHeight()
get the height of the raster image
PDImage getMaskImage()
PDXObject getSMask()
int getWidth()
get the width of the raster image
boolean hasTransparency()
void invalidateCaches()
boolean isImage()
boolean isImageMask()
boolean isInterpolate()
Fields
C_RENDERING_VALID1
public static final java.lang.String C_RENDERING_VALID1
C_RENDERING_VALID2
public static final java.lang.String C_RENDERING_VALID2
C_RENDERING_VALID3
public static final java.lang.String C_RENDERING_VALID3
C_RENDERING_VALID4
public static final java.lang.String C_RENDERING_VALID4
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
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
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
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
Methods
cosGetColorSpace
public COSObject cosGetColorSpace()
cosGetMask
public COSObject cosGetMask()
cosExtractJPEGStream
public COSStream cosExtractJPEGStream()
throws java.io.IOException
getBitsPerComponent
public int getBitsPerComponent()
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()
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()
Returns:
the height
getMaskImage
public PDImage getMaskImage()
getSMask
public PDXObject getSMask()
getWidth
public int getWidth()
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()
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:
cosSetColorSpace
public COSArray cosSetColorSpace(COSArray colorspace)
cosSetColorSpace
public COSName cosSetColorSpace(COSName colorspace)
setDecode
public void setDecode(int[] decode)
setHeight
public void setHeight(int height)
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)
Parameters:
width - the width of the raster image
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
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
Field Summary
public static final DK_C0
Method Summary
float[] evaluate(float[] values)
float[] getC0()
float[] getC1()
float getN()
int getOutputSize()
Fields
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
Methods
evaluate
public float[] evaluate(float[] values)
getC0
public float[] getC0()
getC1
public float[] getC1()
getN
public float getN()
getOutputSize
public int getOutputSize()
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
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
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
Methods
getShadingType
public int getShadingType()
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
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
Field Summary
public static final CN_H_I
Method Summary
PDDestination getDestination()
COSName getHighlightingMode()
String getSubtypeLabel()
Fields
META
public static final de.intarsys.pdf.pd.PDLinkAnnotation.MetaClass META
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
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()
getDestination
public PDDestination getDestination()
setDestination
public void setDestination(PDDestination destination)
getHighlightingMode
public COSName getHighlightingMode()
setHighlightingMode
public void setHighlightingMode(COSName newHighlightingMode)
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
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
Field Summary
public static final CN_Subtype_Circle
Method Summary
COSObject cosSetField(COSName name, COSObject cosObj)
CDSDate getCreationDate()
float[] getInnerColor()
PDAnnotation getInReplyTo()
double getOpacity()
PDAnnotation getPopup()
String getRichContent()
String getSubject()
String getSubtypeLabel()
String getText()
boolean isMarkupAnnotation()
Fields
META
public static final de.intarsys.pdf.pd.PDMarkupAnnotation.MetaClass META
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
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
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()
setOpacity
public void setOpacity(float value)
getRichContent
public String getRichContent()
getInnerColor
public float[] getInnerColor()
setInnerColor
public void setInnerColor(float[] color)
getSubtypeLabel
public String getSubtypeLabel()
isMarkupAnnotation
public boolean isMarkupAnnotation()
cosSetField
public COSObject cosSetField(COSName name,
COSObject cosObj)
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
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
A destination within a document defined using a named destination. The destination is looked up via the /Dests entry in the catalog.
Field Summary
public static final META
The meta class instance
Method Summary
String getName()
Fields
META
public static final de.intarsys.pdf.pd.PDNamedDestination.MetaClass META
Methods
getName
public String getName()
getResolvedDestination
public PDExplicitDestination getResolvedDestination(PDDocument doc)
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
de.intarsys.pdf.pd
Class PDObject
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
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();
Field Summary
public static final DK_Subtype
Method Summary
COSObject cosGetFieldDescendant(COSName name)
Convenience method to access 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.
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).
String toString()
Fields
META
public static final de.intarsys.pdf.pd.PDObject.MetaClass META
DK_Type
public static final de.intarsys.pdf.cos.COSName DK_Type
DK_Subtype
public static final de.intarsys.pdf.cos.COSName DK_Subtype
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)
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)
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.
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.
getDoc
public PDDocument getDoc()
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.
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).
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).
Parameters:
parent - The new parent object.
toString
public String toString()
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
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
Field Summary
public static final CN_Type_Outlines
Method Summary
boolean isOutline()
Fields
META
public static final de.intarsys.pdf.pd.PDOutline.MetaClass META
CN_Type_Outlines
public static final de.intarsys.pdf.cos.COSName CN_Type_Outlines
Methods
isOutline
public boolean isOutline()
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
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
A document outline item. This is used to represent all tree elements in a PDF outline tree.
Field Summary
public static final DK_A
Method Summary
int basicGetFlags()
The flags as 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.
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
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
Methods
basicGetFlags
public int basicGetFlags()
Returns:
The flags as integer value.
basicSetFlags
public void basicSetFlags(int value)
Parameters:
value - The new flags
cosGetColor
public COSArray cosGetColor()
Returns:
The color values to be used for this.
getAction
public PDAction getAction()
Returns:
The PDAction executed when the outline item is activated.
getDestination
public PDDestination getDestination()
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()
Returns:
The next PDOutlineItem within the items linked list.
getParent
public PDOutlineNode getParent()
Returns:
The parent item.
getPrev
public PDOutlineItem getPrev()
Returns:
The previous PDOutlineItem within the items linked list.
getTitle
public String getTitle()
Returns:
The title to be displayed for this.
setAction
public void setAction(PDAction action)
Parameters:
action - The PDAction to be executed.
setDestination
public void setDestination(PDDestination destination)
Parameters:
destination - The PDDestination to be displayed.
setTitle
public void setTitle(String title)
Parameters:
title - The new outline title.
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
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
Field Summary
public static final DK_Count
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.
boolean isOutline()
true if this is the outline (root element) itself.
Fields
META
public static final de.intarsys.pdf.pd.PDOutlineNode.MetaClass META
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()
Returns:
The list of all child nodes for this.
getCount
public int getCount()
Returns:
The number of child elements.
getFirst
public PDOutlineItem getFirst()
Returns:
The first child element in the linked list of children.
getLast
public PDOutlineItem getLast()
Returns:
The last child element in the linked list of children.
isOutline
public boolean isOutline()
Returns:
true if this is the outline (root element) itself.
addItem
public void addItem(PDOutlineItem newItem)
Parameters:
newItem - The new item to be inserted at the end.
removeItem
public boolean removeItem(PDOutlineItem pItem)
Parameters:
pItem - The item to be removed.
Returns:
true if the item was removed.
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
Method Summary
Class getRootClass()
Methods
getRootClass
public Class getRootClass()
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
Field Summary
public static final DK_DestOutputProfile
Method Summary
COSStream cosGetOutputProfile()
boolean importCMYK_ICCProfile()
boolean importRGB_ICCProfile()
Fields
META
public static final de.intarsys.pdf.pd.PDOutputIntent.MetaClass META
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
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)
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
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
Field Summary
public static COPY_SUFFIX
Method Summary
COSObject cosGetContents()
The /Contents entry
COSDictionary cosGetPieceInfo()
The piece info dictionary of the document.
void dispose()
PDAdditionalActions getAdditionalActions()
java.util.List getAnnotations()
Get a list of all PDAnnotation objects that are referenced in this page.
CSContent getContentStream()
The CSContent defining the visual content of the page.
int getCount()
PDAnnotation getFirstAnnotation()
PDPageNode getFirstNode()
PDPage getFirstPage()
PDAnnotation getLastAnnotation()
PDPageNode getLastNode()
PDPage getLastPage()
PDPage getNextPage()
The next page after the receiver.
PDPage getPreviousPage()
Get the previous page before the receiver.
PDResources getResources()
return a PDCResourceDict. this is a wrapper around a COSDictionary that handles
Resource specific details.
java.util.Set getSupportedTriggerEvents()
void invalidateCaches()
boolean isPage()
Fields
META
public static final de.intarsys.pdf.pd.PDPage.MetaClass META
COPY_SUFFIX
public static java.lang.String COPY_SUFFIX
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
Methods
addAnnotation
public void addAnnotation(PDAnnotation annot)
Parameters:
annot - The PDAnnotation to add to the page.
addContentStream
public void addContentStream(CSContent contentStream)
Parameters:
contentStream - The new CSContent
cosAddContents
public void cosAddContents(COSStream content)
Parameters:
content - The COSStream to add to the page
cosPrependContents
public void cosPrependContents(COSStream content)
Parameters:
content - The COSStream to add to the page
cosGetContents
public COSObject cosGetContents()
Returns:
The /Contents entry
cosGetPieceInfo
public COSDictionary cosGetPieceInfo()
Returns:
The piece info dictionary of the document.
cosSetContents
public COSObject cosSetContents(COSObject content)
Parameters:
content - the stream defining the page content
Returns:
The /Contents entry previously associated with this.
cosSetPieceInfo
public COSDictionary cosSetPieceInfo(COSDictionary dict)
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)
Parameters:
name - The name of the PDApplicationData to lookup.
Returns:
The PDApplicationData associated with name on the page.
getContentStream
public CSContent getContentStream()
Returns:
The CSContent defining the visual content of the page.
getCount
public int getCount()
getFirstAnnotation
public PDAnnotation getFirstAnnotation()
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).
getFirstPage
public PDPage getFirstPage()
Get the first page (leaf node) within the receiver hierarchy.
getLastAnnotation
public PDAnnotation getLastAnnotation()
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).
getLastPage
public PDPage getLastPage()
Get the last page (leaf node) within the receiver hierarchy.
getNextAnnotation
public PDAnnotation getNextAnnotation(PDAnnotation annot)
The PDAnnotation following the given PDAnnotation annot or null, if annot was the last one in the list or does't exist
on this page.
Parameters:
annot - a PDAnnotation
Returns:
a PDAnnotation or null
getNextPage
public PDPage getNextPage()
Returns:
The next page after the receiver.
getPageAt
public PDPage getPageAt(int index)
getPreviousAnnotation
public PDAnnotation getPreviousAnnotation(PDAnnotation annot)
Returns the PDAnnotation preceding the given PDAnnotation annot or null, if annot was the first one in the list or
does't exist on this page.
Parameters:
annot - a PDAnnotation
Returns:
a PDAnnotation or null
getPreviousPage
public PDPage getPreviousPage()
Returns:
Get the previous page before the receiver.
getResources
public PDResources getResources()
return a PDCResourceDict. this is a wrapper around a COSDictionary that handles Resource specific details.
Returns:
the resource dict as a PDCResourceDict
getSupportedTriggerEvents
public java.util.Set getSupportedTriggerEvents()
invalidateCaches
public void invalidateCaches()
Invalidate all local caches as the base object may have changed.
isPage
public boolean isPage()
removeAnnotation
public void removeAnnotation(PDAnnotation annot)
Parameters:
annot - The PDAnnotation to remove from the page.
removeApplicationData
public void removeApplicationData(String name)
Parameters:
name - The name of the application data object to be removed.
setAdditionalActions
public void setAdditionalActions(PDAdditionalActions actions)
setApplicationData
public void setApplicationData(String name,
PDApplicationData data)
Parameters:
name - The name for the PDApplicationData instance within this.
data - The PDApplicationData instance.
setContentStream
public void setContentStream(CSContent contentStream)
Parameters:
contentStream - The new visual appearance.
setResources
public void setResources(PDResources resources)
de.intarsys.pdf.pd
Class PDPage.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDPageNode.MetaClass
|
+-de.intarsys.pdf.pd.PDPage.MetaClass
de.intarsys.pdf.pd
Class PDPageNode
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDPageNode
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
Field Summary
public static final CN_Type_Page
Method Summary
void dispose()
Deprecated.
CDSRectangle getCropBox()
The rectangle in user space coordinates defining the visible region of the page.
PDAnnotation getFirstAnnotation()
The first PDAnnotation linked on this page.
PDObject getGenericParent()
PDAnnotation getLastAnnotation()
The last PDAnnotation linked on this page.
PDPage getLastPage()
Get the last page (leaf node) within the receiver hierarchy.
CDSRectangle getMediaBox()
The rectangle in user space coordinates defining the physical page boundaries. user space is
measured in 1/72 inch initially
PDPageNode getNextNode()
Get the next node after the receiver.
int getNodeIndex()
The zero based index of this within the document.
PDPageTree getParent()
The parent node if available.
PDPageNode getPreviousNode()
The previous node .
int getRotate()
The number of degrees by which the page should be rotated clockwise when displayed or
printed.
void invalidateCaches()
Fields
META
public static final de.intarsys.pdf.pd.PDPageNode.MetaClass META
DK_Parent
public static final de.intarsys.pdf.cos.COSName DK_Parent
DK_Pages
public static final de.intarsys.pdf.cos.COSName DK_Pages
CN_Type_Page
public static final de.intarsys.pdf.cos.COSName CN_Type_Page
DK_Rotate
public static final de.intarsys.pdf.cos.COSName DK_Rotate
Methods
dispose
public void dispose()
Deprecated.
getCount
public abstract int getCount()
Returns:
The total number of pages represented by this node.
getCropBox
public CDSRectangle getCropBox()
The rectangle in user space coordinates defining the visible region of the page. User space is measured in 1/72 inch initially
Returns:
The rectangle in user space coordinates defining the visible region of the page
getFirstAnnotation
public PDAnnotation getFirstAnnotation()
Returns:
The first PDAnnotation linked on this page.
getFirstNode
public abstract PDPageNode getFirstNode()
Get the first node within the receiver or the receiver if it is not a collection (page tree).
Returns:
Get the first node within the receiver or the receiver if it is not a collection (page tree).
getFirstPage
public abstract PDPage getFirstPage()
Get the first page (leaf node) within the receiver hierarchy.
Returns:
Get the first page (leaf node) within the receiver hierarchy.
getGenericParent
public PDObject getGenericParent()
The parent of the receiver if it is a node in a hierarchical structure (like page nodes or form fields).
getLastAnnotation
public PDAnnotation getLastAnnotation()
Returns:
The last PDAnnotation linked on this page.
getLastNode
public abstract PDPageNode getLastNode()
Get the last node within the receiver or the receiver if it is not a collection (page tree).
Returns:
Get the last node within the receiver or the receiver if it is not a collection (page tree).
getLastPage
public PDPage getLastPage()
Get the last page (leaf node) within the receiver hierarchy.
Returns:
Get the last page (leaf node) within the receiver hierarchy.
getMediaBox
public CDSRectangle getMediaBox()
The rectangle in user space coordinates defining the physical page boundaries. user space is measured in 1/72 inch initially
Returns:
The rectangle in user space coordinates defining the physical page boundaries
getNextNode
public PDPageNode getNextNode()
Returns:
Get the next node after the receiver.
getNodeIndex
public int getNodeIndex()
Returns:
The zero based index of this within the document.
getPageAt
public PDPage getPageAt(int index)
Parameters:
index - The page index
Returns:
The page at index within the receivers subtree.
getParent
public PDPageTree getParent()
The parent node if available. The root tree node of the document has no parent.
Returns:
The parent node if available.
getPreviousNode
public PDPageNode getPreviousNode()
Returns:
The previous node.
getRotate
public int getRotate()
The number of degrees by which the page should be rotated clockwise when displayed or printed. The value must be a
multiple of 90. Default value: 0.
Returns:
Rotation as a multiple of 90
invalidateCaches
public void invalidateCaches()
Invalidate all local caches as the base object may have changed.
isPage
public abstract boolean isPage()
Returns:
Answer true if this is a single page node.
setCropBox
public void setCropBox(CDSRectangle rect)
Set the rectangle in user space coordinates defining the visible region of the page. user space is measured in 1/72 inch
initially
Parameters:
rect - The rectangle defining the visible page region
setGenericParent
public void setGenericParent(PDObject newParent)
Set the parent of the receiver if it is a node in a hierarchical structure (like page nodes or form fields).
setMediaBox
public void setMediaBox(CDSRectangle rect)
Set the rectangle in user space coordinates defining the physical page boundaries. user space is measured in 1/72 inch
initially
Parameters:
rect - The rectangle defining the physical page boundaries
setRotate
public void setRotate(int rotate)
The number of degrees by which the page should be rotated clockwise when displayed or printed. The value must be a
multiple of 90. If a value of 0 is set, which is the default, the field will be cleared.
Parameters:
rotate - A multiple of 90, the value is not checked for a legal value
de.intarsys.pdf.pd
Class PDPageNode.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDPageNode.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass
Method Summary
Class getRootClass()
Methods
getRootClass
public Class getRootClass()
de.intarsys.pdf.pd
Class PDPageTree
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDPageNode
|
+-de.intarsys.pdf.pd.PDPageTree
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
A page tree node is a container for pages (and other page tree nodes) within a PFD document. All pages in the document are direct
or indirect children of the root page tree node in the COSCatalog object
Field Summary
public static final DK_Count
Method Summary
void addNode(int index, PDPageNode newNode)
Add a page after at the designated index.
int getCount()
PDPageNode getFirstNode()
PDPage getFirstPage()
java.util.List getGenericChildren()
java.util.List getKids()
Get the list of all page nodes that are children of the receiver.
PDPageNode getLastNode()
void invalidateCaches()
boolean isPage()
PDPageTree rebalance()
Rebalanve this.
Fields
META
public static final de.intarsys.pdf.pd.PDPageTree.MetaClass META
DK_Kids
public static final de.intarsys.pdf.cos.COSName DK_Kids
DK_Count
public static final de.intarsys.pdf.cos.COSName DK_Count
Methods
addNode
public void addNode(int index,
PDPageNode newNode)
Parameters:
index - the index which to insert the new child at
newNode - the child page to add
addNode
public void addNode(PDPageNode newNode)
Parameters:
newNode - the child page to create
addNodeAfter
public void addNodeAfter(PDPageNode newNode,
PDPageNode destination)
Add a page after the designated destination page. the destination page must be in the receiver tree node
Parameters:
newNode - the child page to add
destination - the page after which to insert the new child
getCount
public int getCount()
getFirstNode
public PDPageNode getFirstNode()
Get the first node within the receiver or the receiver if it is not a collection (page tree).
getFirstPage
public PDPage getFirstPage()
Get the first page (leaf node) within the receiver hierarchy.
getGenericChildren
public java.util.List getGenericChildren()
Get a collection of PDObject children if the receiver is a node in a hierarchical structure (like page nodes or form fields).
This enables the generic implementation of inherited field values and so on.
getKids
public java.util.List getKids()
Get the list of all page nodes that are children of the receiver.
Returns:
an ArrayList
getLastNode
public PDPageNode getLastNode()
Get the last node within the receiver or the receiver if it is not a collection (page tree).
invalidateCaches
public void invalidateCaches()
Invalidate all local caches as the base object may have changed.
isPage
public boolean isPage()
rebalance
public PDPageTree rebalance()
Rebalanve this.
Returns:
The new PDPageTree created or null if nothing changed.
removeNode
public void removeNode(PDPageNode node)
Remove a node
Parameters:
node - The child node to remove
de.intarsys.pdf.pd
Class PDPageTree.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDPageNode.MetaClass
|
+-de.intarsys.pdf.pd.PDPageTree.MetaClass
de.intarsys.pdf.pd
Class PDPattern
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDPattern
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
Field Summary
public static final CN_Type_Pattern
Value: 2
Value: 1
Method Summary
abstract int getPatternType()
Fields
DK_PatternType
public static final de.intarsys.pdf.cos.COSName DK_PatternType
CN_Type_Pattern
public static final de.intarsys.pdf.cos.COSName CN_Type_Pattern
META
public static final de.intarsys.pdf.pd.PDPattern.MetaClass META
PATTERN_TYPE_SHADING
public static final int PATTERN_TYPE_SHADING
Constant value: 2
PATTERN_TYPE_TILING
public static final int PATTERN_TYPE_TILING
Constant value: 1
Methods
getPatternType
public abstract int getPatternType()
de.intarsys.pdf.pd
Class PDPattern.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDPattern.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass
Method Summary
Class getRootClass()
Methods
getRootClass
public Class getRootClass()
de.intarsys.pdf.pd
Class PDPopupAnnotation
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAnnotation
|
+-de.intarsys.pdf.pd.PDPopupAnnotation
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IAdditionalActionSupport
The implementation of a popup window definition within the document. The popup window is associated with other annotations to
enable the user to give comments and replies.
Field Summary
public static final CN_Subtype_Popup
Method Summary
float[] getColor()
String getContents()
CDSDate getModified()
PDPage getPage()
PDAnnotation getParent()
String getSubject()
String getSubtypeLabel()
String getText()
boolean isOpen()
Fields
META
public static final de.intarsys.pdf.pd.PDPopupAnnotation.MetaClass META
CN_Subtype_Popup
public static final de.intarsys.pdf.cos.COSName CN_Subtype_Popup
DK_T
public static final de.intarsys.pdf.cos.COSName DK_T
DK_Parent
public static final de.intarsys.pdf.cos.COSName DK_Parent
DK_Open
public static final de.intarsys.pdf.cos.COSName DK_Open
Methods
getText
public String getText()
getParent
public PDAnnotation getParent()
setParent
public void setParent(PDAnnotation parent)
getContents
public String getContents()
setContents
public void setContents(String contents)
getSubject
public String getSubject()
getPage
public PDPage getPage()
Try to access the PDPage we are on. This may return null, as this reference is not required by the spec.
setSubject
public void setSubject(String subject)
getModified
public CDSDate getModified()
getColor
public float[] getColor()
isOpen
public boolean isOpen()
setOpen
public void setOpen(boolean open)
getSubtypeLabel
public String getSubtypeLabel()
de.intarsys.pdf.pd
Class PDPopupAnnotation.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAnnotation.MetaClass
|
+-de.intarsys.pdf.pd.PDPopupAnnotation.MetaClass
de.intarsys.pdf.pd
Class PDPostScript
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDXObject
|
+-de.intarsys.pdf.pd.PDPostScript
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
Field Summary
public static final CN_Subtype_PS
Method Summary
boolean isPostscript()
Fields
META
public static final de.intarsys.pdf.pd.PDPostScript.MetaClass META
CN_Subtype_PS
public static final de.intarsys.pdf.cos.COSName CN_Subtype_PS
Methods
isPostscript
public boolean isPostscript()
de.intarsys.pdf.pd
Class PDPostScript.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDXObject.MetaClass
|
+-de.intarsys.pdf.pd.PDPostScript.MetaClass
de.intarsys.pdf.pd
Class PDPostScriptFunction
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDFunction
|
+-de.intarsys.pdf.pd.PDPostScriptFunction
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
Field Summary
public static final META
The meta class instance
Method Summary
COSDictionary cosGetDict()
String getCode()
int getOutputSize()
Fields
META
public static final de.intarsys.pdf.pd.PDPostScriptFunction.MetaClass META
Methods
cosGetDict
public COSDictionary cosGetDict()
evaluate
public float[] evaluate(float[] values)
getCode
public String getCode()
getOutputSize
public int getOutputSize()
de.intarsys.pdf.pd
Class PDPostScriptFunction.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDFunction.MetaClass
|
+-de.intarsys.pdf.pd.PDPostScriptFunction.MetaClass
de.intarsys.pdf.pd
Class PDRadialShading
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDShading
|
+-de.intarsys.pdf.pd.PDRadialShading
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
Field Summary
public static final META
The meta class instance
Method Summary
int getShadingType()
Fields
META
public static final de.intarsys.pdf.pd.PDRadialShading.MetaClass META
Methods
getShadingType
public int getShadingType()
de.intarsys.pdf.pd
Class PDRadialShading.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDShading.MetaClass
|
+-de.intarsys.pdf.pd.PDRadialShading.MetaClass
de.intarsys.pdf.pd
Class PDResources
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDResources
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
The resource dictionary holds the references to indirect objects that are use within a CSContent. From the CSContent, these
objects are referenced using the key under which they are stored in the dictionary.
Field Summary
public static final CN_RT_ColorSpace
Method Summary
void invalidateCaches()
Fields
CN_RT_ColorSpace
public static final de.intarsys.pdf.cos.COSName CN_RT_ColorSpace
CN_RT_Encoding
public static final de.intarsys.pdf.cos.COSName CN_RT_Encoding
CN_RT_ExtGState
public static final de.intarsys.pdf.cos.COSName CN_RT_ExtGState
CN_RT_Font
public static final de.intarsys.pdf.cos.COSName CN_RT_Font
CN_RT_Pattern
public static final de.intarsys.pdf.cos.COSName CN_RT_Pattern
CN_RT_ProcSet
public static final de.intarsys.pdf.cos.COSName CN_RT_ProcSet
CN_RT_Properties
public static final de.intarsys.pdf.cos.COSName CN_RT_Properties
CN_RT_Shading
public static final de.intarsys.pdf.cos.COSName CN_RT_Shading
CN_RT_XObject
public static final de.intarsys.pdf.cos.COSName CN_RT_XObject
META
public static final de.intarsys.pdf.pd.PDResources.MetaClass META
Methods
addColorSpaceResource
public void addColorSpaceResource(COSName name,
PDColorSpace colorSpace)
addExtGStateResource
public void addExtGStateResource(COSName name,
PDExtGState extGState)
addFontResource
public void addFontResource(COSName name,
PDFont font)
addPatternResource
public void addPatternResource(COSName name,
PDPattern pattern)
addResource
public void addResource(COSName resourceType,
COSName name,
PDObject object)
addShadingResource
public void addShadingResource(COSName name,
PDShading shading)
addXObjectResource
public void addXObjectResource(COSName name,
PDXObject object)
cosAddResource
public void cosAddResource(COSName resourceType,
COSName resourceName,
COSObject resource)
cosCreateResource
public COSName cosCreateResource(COSName resourceType,
COSObject resource)
cosGetResource
public COSObject cosGetResource(COSName resourceType,
COSName resourceName)
cosGetResources
public COSDictionary cosGetResources(COSName resourceType)
createColorSpaceResource
public COSName createColorSpaceResource(PDColorSpace colorSpace)
Parameters:
colorSpace - The colorSpace to lookup.
Returns:
the name of a ColorSpace resource within the resource dictionary.
createExtGStateResource
public COSName createExtGStateResource(PDExtGState gstate)
Parameters:
gstate - The gstate to lookup.
Returns:
the name of a ExtGState resource within the resource dictionary.
createFontResource
public COSName createFontResource(PDFont font)
Return the name of the font resource within this resource dictionary.
Parameters:
font - The font whose name is looked up.
Returns:
the name of the font resource within this resource dictionary.
createResource
public COSName createResource(COSName resourceType,
PDObject object)
Return the name of a new resource of selected resource type within the resource dictionary.
Parameters:
object - The resource to lookup.
Returns:
The name of a resource within the resource dictionary.
createShadingResource
public COSName createShadingResource(PDShading shading)
Parameters:
shading - The shading to lookup.
Returns:
The name of the resource within the resource dictionary.
createXObjectResource
public COSName createXObjectResource(PDXObject xobject)
Parameters:
xobject - The object to lookup.
Returns:
the name of a XObject resource within the resource dictionary.
getColorSpaceResource
public PDColorSpace getColorSpaceResource(COSName name)
Parameters:
name - The name of the ColorSpace resource.
Returns:
A named ColorSpace resource from the resource dictionary.
getExtGStateResource
public PDExtGState getExtGStateResource(COSName name)
Parameters:
name - The name of the ExtGState resource.
Returns:
a named ExtGState resource from the resource dictionary.
getFontResource
public PDFont getFontResource(COSName name)
Parameters:
name - The name of the font resource
Returns:
A named font resource from within the resource dictionary.
getPatternResource
public PDPattern getPatternResource(COSName name)
Parameters:
name - The name of the Pattern resource.
Returns:
a named Pattern resource from the resource dictionary.
getResource
public PDObject getResource(COSName resourceType,
PDObject.MetaClass metaClass,
COSName name)
Parameters:
name - The name of the resource.
Returns:
a named resource from the resource dictionary.
getShadingResource
public PDShading getShadingResource(COSName name)
Parameters:
name - The name of the Pattern resource.
Returns:
a named Pattern resource from the resource dictionary.
getXObjectResource
public PDXObject getXObjectResource(COSName name)
Parameters:
name - The name of the XObject resource.
Returns:
a named XObject resource from the resource dictionary.
invalidateCaches
public void invalidateCaches()
Invalidate all local caches as the base object may have changed.
de.intarsys.pdf.pd
Class PDResources.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDResources.MetaClass
de.intarsys.pdf.pd
Class PDSampledFunction
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDFunction
|
+-de.intarsys.pdf.pd.PDSampledFunction
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
Field Summary
public static final DK_BitsPerSample
Method Summary
COSArray cosGetDecode()
Return the Decode value array.
COSDictionary cosGetDict()
COSArray cosGetEncode()
Return the Encode value array
int getBitsPerSample()
Return the BitsPerSample value.
int getOutputSize()
Return the number of output values for one input value.
COSArray getSize()
Return the Size value array.
Fields
DK_BitsPerSample
public static final de.intarsys.pdf.cos.COSName DK_BitsPerSample
DK_Decode
public static final de.intarsys.pdf.cos.COSName DK_Decode
DK_Encode
public static final de.intarsys.pdf.cos.COSName DK_Encode
DK_Order
public static final de.intarsys.pdf.cos.COSName DK_Order
DK_Size
public static final de.intarsys.pdf.cos.COSName DK_Size
META
public static final de.intarsys.pdf.pd.PDSampledFunction.MetaClass META
Methods
cosGetDict
public COSDictionary cosGetDict()
evaluate
public float[] evaluate(float[] input)
Evaluate the function for each of the input values in turn. The output values are stored in an array and returned.
Parameters:
input - input values to evaluate
Returns:
an array of output values
getBitsPerSample
public int getBitsPerSample()
Returns:
the BitsPerSample value
cosGetDecode
public COSArray cosGetDecode()
Returns:
the Decode value array
getDecodeMax
public float getDecodeMax(int dimension)
Return the max value of the Decode array for the given dimension.
Parameters:
dimension - the dimension to get the max value for
Returns:
the max value of the Decode array for the given dimension
getDecodeMin
public float getDecodeMin(int dimension)
Return the min value of the Decode array for the given dimension.
Parameters:
dimension - the dimension to get the min value for
Returns:
the min value of the Decode array for the given dimension
cosGetEncode
public COSArray cosGetEncode()
Returns:
the Encode value array
getEncodeMax
public float getEncodeMax(int dimension)
Return the max value of the Encode array for the given dimension.
Parameters:
dimension - the dimension to get the max value for
Returns:
the max value of the Encode array for the given dimension
getEncodeMin
public float getEncodeMin(int dimension)
Return the min value of the Encode array for the given dimension.
Parameters:
dimension - the dimension to get the min value for
Returns:
the min value of the Encode array for the given dimension
getOutputSize
public int getOutputSize()
Returns:
the number of output values for one input value
getSize
public COSArray getSize()
Returns:
the Size value array
getSize
public int getSize(int dimension)
Parameters:
dimension - the dimension to get the size value for
Returns:
the size value for the given dimension
de.intarsys.pdf.pd
Class PDSampledFunction.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDFunction.MetaClass
|
+-de.intarsys.pdf.pd.PDSampledFunction.MetaClass
de.intarsys.pdf.pd
Class PDShading
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDShading
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
Field Summary
public static final META
The meta class instance
Value: 2
Value: 6
Value: 4
Value: 1
Value: 5
Value: 3
Value: 7
Method Summary
CDSRectangle getBoundingBox()
PDColorSpace getColorSpace()
boolean isAntiAlias()
Fields
META
public static final de.intarsys.pdf.pd.PDShading.MetaClass META
SHADING_TYPE_AXIAL
public static final int SHADING_TYPE_AXIAL
Constant value: 2
SHADING_TYPE_COONS
public static final int SHADING_TYPE_COONS
Constant value: 6
SHADING_TYPE_FREEFORM
public static final int SHADING_TYPE_FREEFORM
Constant value: 4
SHADING_TYPE_FUNCTIONBASED
public static final int SHADING_TYPE_FUNCTIONBASED
Constant value: 1
SHADING_TYPE_LATTICEFORM
public static final int SHADING_TYPE_LATTICEFORM
Constant value: 5
SHADING_TYPE_RADIAL
public static final int SHADING_TYPE_RADIAL
Constant value: 3
SHADING_TYPE_TENSORPRODUCT
public static final int SHADING_TYPE_TENSORPRODUCT
Constant value: 7
Methods
getBoundingBox
public CDSRectangle getBoundingBox()
getColorSpace
public PDColorSpace getColorSpace()
getShadingType
public abstract int getShadingType()
isAntiAlias
public boolean isAntiAlias()
de.intarsys.pdf.pd
Class PDShading.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDShading.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass, MetaClass, MetaClass, MetaClass, MetaClass, MetaClass
Method Summary
Class getRootClass()
Methods
getRootClass
public Class getRootClass()
de.intarsys.pdf.pd
Class PDShadingPattern
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDPattern
|
+-de.intarsys.pdf.pd.PDShadingPattern
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
Field Summary
public static final META
The meta class instance
Method Summary
float[] getMatrix()
int getPatternType()
PDShading getShading()
Fields
META
public static final de.intarsys.pdf.pd.PDShadingPattern.MetaClass META
Methods
getMatrix
public float[] getMatrix()
getPatternType
public int getPatternType()
getShading
public PDShading getShading()
de.intarsys.pdf.pd
Class PDShadingPattern.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDPattern.MetaClass
|
+-de.intarsys.pdf.pd.PDShadingPattern.MetaClass
de.intarsys.pdf.pd
Class PDSignature
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDSignature
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
This class represents the signature object referenced for example in an AcroForm signature field.
Field Summary
public static final CN_Type_Sig
Method Summary
COSArray cosGetByteRange()
PDAFSignatureField getAcroFormField()
PDBuildProperties getBuildProperties()
java.util.List getCert()
Get a List of certificates, the first one is the certificate of the signer himself.
String getContactInfo()
byte[] getContentBytes()
CDSDate getDate()
COSName getFilter()
Filter is a name for the original signature creator, for example: Adobe.PPKLite
String getLocation()
String getName()
String getReason()
COSName getSubFilter()
SubFilter is the name of a encoding and storage algorithm.
Fields
META
public static final de.intarsys.pdf.pd.PDSignature.MetaClass META
CN_Type_Sig
public static final de.intarsys.pdf.cos.COSName CN_Type_Sig
DK_Filter
public static final de.intarsys.pdf.cos.COSName DK_Filter
DK_SubFilter
public static final de.intarsys.pdf.cos.COSName DK_SubFilter
DK_Contents
public static final de.intarsys.pdf.cos.COSName DK_Contents
DK_Cert
public static final de.intarsys.pdf.cos.COSName DK_Cert
DK_ByteRange
public static final de.intarsys.pdf.cos.COSName DK_ByteRange
DK_Reference
public static final de.intarsys.pdf.cos.COSName DK_Reference
DK_Changes
public static final de.intarsys.pdf.cos.COSName DK_Changes
DK_Name
public static final de.intarsys.pdf.cos.COSName DK_Name
DK_M
public static final de.intarsys.pdf.cos.COSName DK_M
DK_Location
public static final de.intarsys.pdf.cos.COSName DK_Location
DK_Reason
public static final de.intarsys.pdf.cos.COSName DK_Reason
DK_ContactInfo
public static final de.intarsys.pdf.cos.COSName DK_ContactInfo
DK_R
public static final de.intarsys.pdf.cos.COSName DK_R
DK_V
public static final de.intarsys.pdf.cos.COSName DK_V
DK_Prop_Build
public static final de.intarsys.pdf.cos.COSName DK_Prop_Build
DK_Prop_AuthTime
public static final de.intarsys.pdf.cos.COSName DK_Prop_AuthTime
DK_Prop_AuthType
public static final de.intarsys.pdf.cos.COSName DK_Prop_AuthType
Methods
cosGetByteRange
public COSArray cosGetByteRange()
Returns:
the byte range for the signature or null
getAcroFormField
public PDAFSignatureField getAcroFormField()
getBuildProperties
public PDBuildProperties getBuildProperties()
getCert
public java.util.List getCert()
Get a List of certificates, the first one is the certificate of the signer himself. Followed by certificates of certificate
authoritys.
Returns:
a List of certificates or null
getContactInfo
public String getContactInfo()
Returns:
how to contact the signer or null
getContentBytes
public byte[] getContentBytes()
getDate
public CDSDate getDate()
Returns:
the date the signature took place
getFilter
public COSName getFilter()
Filter is a name for the original signature creator, for example: Adobe.PPKLite
Returns:
name of the signature creator
getLocation
public String getLocation()
Returns:
where the document was signed or null
getName
public String getName()
Returns:
name of the signer or null
getReason
public String getReason()
Returns:
reason for signing this document or null
getSubFilter
public COSName getSubFilter()
Returns:
the name of the encoding algorithm
setAcroFormField
public void setAcroFormField(PDAFSignatureField acroFormField)
setBuildProperties
public void setBuildProperties(PDBuildProperties buildProperties)
setCert
public void setCert(byte[] certificate)
Parameters:
certificate - a DER encoded byte[]
setCert
public void setCert(java.util.List certificates)
Parameters:
certificates - a list of DER encoded byte[]
setContactInfo
public void setContactInfo(String contactInfo)
Parameters:
contactInfo - how to contact the signer, may be null
setDate
public void setDate(CDSDate date)
setFilter
public void setFilter(COSName filter)
Parameters:
filter - name of the signature creator
setLocation
public void setLocation(String location)
Parameters:
location - location the signer signed the document, may be null
setName
public void setName(String name)
Parameters:
name - name of the signer, may be null
setReason
public void setReason(String reason)
Parameters:
reason - reason why is document was signed, may be null
setSubFilter
public void setSubFilter(COSName subfilter)
Parameters:
subfilter - name of the encoding algorithm
de.intarsys.pdf.pd
Class PDSignature.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDSignature.MetaClass
de.intarsys.pdf.pd
Class PDSignatureReference
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDSignatureReference
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
Field Summary
public static final CN_Type_SigRef
Fields
META
public static final de.intarsys.pdf.pd.PDSignatureReference.MetaClass META
CN_Type_SigRef
public static final de.intarsys.pdf.cos.COSName CN_Type_SigRef
DK_TransformMethod
public static final de.intarsys.pdf.cos.COSName DK_TransformMethod
DK_TransformParams
public static final de.intarsys.pdf.cos.COSName DK_TransformParams
DK_Data
public static final de.intarsys.pdf.cos.COSName DK_Data
DK_DigestMethod
public static final de.intarsys.pdf.cos.COSName DK_DigestMethod
DK_DigestValue
public static final de.intarsys.pdf.cos.COSName DK_DigestValue
DK_DigestLocation
public static final de.intarsys.pdf.cos.COSName DK_DigestLocation
de.intarsys.pdf.pd
Class PDSignatureReference.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDSignatureReference.MetaClass
de.intarsys.pdf.pd
Class PDStampAnnotation
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAnnotation
|
+-de.intarsys.pdf.pd.PDMarkupAnnotation
|
+-de.intarsys.pdf.pd.PDStampAnnotation
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IAdditionalActionSupport
A stamp annotation.
Field Summary
public static final CN_DRAFT
Constructor Summary
public PDStampAnnotation(COSObject object)
Method Summary
COSName getIconName()
Fields
CN_Subtype_Stamp
public static final de.intarsys.pdf.cos.COSName CN_Subtype_Stamp
DK_Name
public static final de.intarsys.pdf.cos.COSName DK_Name
META
public static final de.intarsys.pdf.pd.PDStampAnnotation.MetaClass META
CN_DRAFT
public static final de.intarsys.pdf.cos.COSName CN_DRAFT
Constructors
PDStampAnnotation
public PDStampAnnotation(COSObject object)
Methods
getIconName
public COSName getIconName()
setIconName
public COSName setIconName(COSName name)
de.intarsys.pdf.pd
Class PDStampAnnotation.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAnnotation.MetaClass
|
+-de.intarsys.pdf.pd.PDMarkupAnnotation.MetaClass
|
+-de.intarsys.pdf.pd.PDStampAnnotation.MetaClass
de.intarsys.pdf.pd
Class PDStitchingFunction
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDFunction
|
+-de.intarsys.pdf.pd.PDStitchingFunction
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
Field Summary
public static final META
The meta class instance
Method Summary
float[] evaluate(float[] values)
float[] getBounds()
float[] getEncode()
PDFunction[] getFunctions()
int getOutputSize()
Fields
META
public static final de.intarsys.pdf.pd.PDStitchingFunction.MetaClass META
Methods
evaluate
public float[] evaluate(float[] values)
getOutputSize
public int getOutputSize()
getBounds
public float[] getBounds()
getEncode
public float[] getEncode()
getFunctions
public PDFunction[] getFunctions()
de.intarsys.pdf.pd
Class PDStitchingFunction.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDFunction.MetaClass
|
+-de.intarsys.pdf.pd.PDStitchingFunction.MetaClass
de.intarsys.pdf.pd
Class PDTensorProductShading
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDShading
|
+-de.intarsys.pdf.pd.PDTensorProductShading
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
Field Summary
public static final META
The meta class instance
Method Summary
int getShadingType()
Fields
META
public static final de.intarsys.pdf.pd.PDTensorProductShading.MetaClass META
Methods
getShadingType
public int getShadingType()
de.intarsys.pdf.pd
Class PDTensorProductShading.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDShading.MetaClass
|
+-de.intarsys.pdf.pd.PDTensorProductShading.MetaClass
de.intarsys.pdf.pd
Class PDTextAnnotation
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAnnotation
|
+-de.intarsys.pdf.pd.PDMarkupAnnotation
|
+-de.intarsys.pdf.pd.PDTextAnnotation
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IAdditionalActionSupport
Field Summary
public static final CN_Subtype_Text
Method Summary
String getSubtypeLabel()
boolean isPrint()
boolean supportsPrint()
Fields
META
public static final de.intarsys.pdf.pd.PDTextAnnotation.MetaClass META
CN_Subtype_Text
public static final de.intarsys.pdf.cos.COSName CN_Subtype_Text
Methods
getSubtypeLabel
public String getSubtypeLabel()
isPrint
public boolean isPrint()
supportsPrint
public boolean supportsPrint()
de.intarsys.pdf.pd
Class PDTextAnnotation.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAnnotation.MetaClass
|
+-de.intarsys.pdf.pd.PDMarkupAnnotation.MetaClass
|
+-de.intarsys.pdf.pd.PDTextAnnotation.MetaClass
de.intarsys.pdf.pd
Class PDTextMarkupAnnotation
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAnnotation
|
+-de.intarsys.pdf.pd.PDMarkupAnnotation
|
+-de.intarsys.pdf.pd.PDTextMarkupAnnotation
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IAdditionalActionSupport
Field Summary
public static final CN_Subtype_Highlight
Method Summary
float[] getQuadPoints()
String getSubtypeLabel()
Fields
META
public static final de.intarsys.pdf.pd.PDTextMarkupAnnotation.MetaClass META
DK_QuadPoints
public static final de.intarsys.pdf.cos.COSName DK_QuadPoints
CN_Subtype_Highlight
public static final de.intarsys.pdf.cos.COSName CN_Subtype_Highlight
CN_Subtype_Underline
public static final de.intarsys.pdf.cos.COSName CN_Subtype_Underline
CN_Subtype_Squiggly
public static final de.intarsys.pdf.cos.COSName CN_Subtype_Squiggly
CN_Subtype_StrikeOut
public static final de.intarsys.pdf.cos.COSName CN_Subtype_StrikeOut
Methods
getQuadPoints
public float[] getQuadPoints()
setQuadPoints
public void setQuadPoints(float[] color)
getSubtypeLabel
public String getSubtypeLabel()
de.intarsys.pdf.pd
Class PDTextMarkupAnnotation.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAnnotation.MetaClass
|
+-de.intarsys.pdf.pd.PDMarkupAnnotation.MetaClass
|
+-de.intarsys.pdf.pd.PDTextMarkupAnnotation.MetaClass
de.intarsys.pdf.pd
Class PDTilingPattern
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDPattern
|
+-de.intarsys.pdf.pd.PDTilingPattern
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
Field Summary
public static final META
The meta class instance
Method Summary
int getPatternType()
Fields
META
public static final de.intarsys.pdf.pd.PDTilingPattern.MetaClass META
Methods
getPatternType
public int getPatternType()
de.intarsys.pdf.pd
Class PDTilingPattern.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDPattern.MetaClass
|
+-de.intarsys.pdf.pd.PDTilingPattern.MetaClass
de.intarsys.pdf.pd
Class PDTransformMethod
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDTransformMethod
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
Field Summary
public static final DK_DocMDP
Method Summary
static getSingleton(COSName name)
PDTransformMethod
Fields
DK_DocMDP
public static final de.intarsys.pdf.cos.COSName DK_DocMDP
DK_UR
public static final de.intarsys.pdf.cos.COSName DK_UR
DK_FieldMDP
public static final de.intarsys.pdf.cos.COSName DK_FieldMDP
DK_Identity
public static final de.intarsys.pdf.cos.COSName DK_Identity
META
public static final de.intarsys.pdf.pd.PDTransformMethod.MetaClass META
Methods
getSingleton
public static PDTransformMethod getSingleton(COSName name)
de.intarsys.pdf.pd
Class PDTransformMethod.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDTransformMethod.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass, MetaClass, MetaClass
Method Summary
Class getRootClass()
Methods
getRootClass
public Class getRootClass()
de.intarsys.pdf.pd
Class PDTransformMethodDocMDP
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDTransformMethod
|
+-de.intarsys.pdf.pd.PDTransformMethodDocMDP
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
Field Summary
public static final META
The meta class instance
Fields
META
public static final de.intarsys.pdf.pd.PDTransformMethodDocMDP.MetaClass META
SINGLETON
public static de.intarsys.pdf.pd.PDTransformMethod SINGLETON
de.intarsys.pdf.pd
Class PDTransformMethodDocMDP.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDTransformMethod.MetaClass
|
+-de.intarsys.pdf.pd.PDTransformMethodDocMDP.MetaClass
de.intarsys.pdf.pd
Class PDTransformMethodFieldMDP
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDTransformMethod
|
+-de.intarsys.pdf.pd.PDTransformMethodFieldMDP
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
Field Summary
public static final META
The meta class instance
Fields
META
public static final de.intarsys.pdf.pd.PDTransformMethodFieldMDP.MetaClass META
SINGLETON
public static de.intarsys.pdf.pd.PDTransformMethod SINGLETON
de.intarsys.pdf.pd
Class PDTransformMethodFieldMDP.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDTransformMethod.MetaClass
|
+-de.intarsys.pdf.pd.PDTransformMethodFieldMDP.MetaClass
de.intarsys.pdf.pd
Class PDTransformMethodIdentity
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDTransformMethod
|
+-de.intarsys.pdf.pd.PDTransformMethodIdentity
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
Field Summary
public static final META
The meta class instance
Fields
META
public static final de.intarsys.pdf.pd.PDTransformMethodIdentity.MetaClass META
SINGLETON
public static de.intarsys.pdf.pd.PDTransformMethod SINGLETON
de.intarsys.pdf.pd
Class PDTransformMethodIdentity.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDTransformMethod.MetaClass
|
+-de.intarsys.pdf.pd.PDTransformMethodIdentity.MetaClass
de.intarsys.pdf.pd
Class PDTransformMethodUR
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDTransformMethod
|
+-de.intarsys.pdf.pd.PDTransformMethodUR
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
Field Summary
public static final META
The meta class instance
Fields
META
public static final de.intarsys.pdf.pd.PDTransformMethodUR.MetaClass META
SINGLETON
public static de.intarsys.pdf.pd.PDTransformMethod SINGLETON
de.intarsys.pdf.pd
Class PDTransformMethodUR.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDTransformMethod.MetaClass
|
+-de.intarsys.pdf.pd.PDTransformMethodUR.MetaClass
de.intarsys.pdf.pd
Class PDTransformParams
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDTransformParams
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
Field Summary
public static final CN_Type_TransformParams
Fields
META
public static final de.intarsys.pdf.pd.PDTransformParams.MetaClass META
CN_Type_TransformParams
public static final de.intarsys.pdf.cos.COSName CN_Type_TransformParams
DK_P
public static final de.intarsys.pdf.cos.COSName DK_P
DK_V
public static final de.intarsys.pdf.cos.COSName DK_V
de.intarsys.pdf.pd
Class PDTransformParams.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDTransformParams.MetaClass
de.intarsys.pdf.pd
Class PDWidgetAnnotation
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDAnnotation
|
+-de.intarsys.pdf.pd.PDWidgetAnnotation
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport, IAdditionalActionSupport
Field Summary
public static final CN_H_I
highlightning: I: Invert
Method Summary
boolean canReceiveFocus()
void dispose()
PDAcroFormField getAcroFormField()
COSName getAltAppearanceState()
PDAppearanceCharacter getAppearanceCharacteristics()
istics
COSName getHighlightingMode()
CDSRectangle getNormalizedRectangle()
String getSubtypeLabel()
boolean isOff()
boolean isWidgetAnnotation()
void setAppearanceCharacteristics(PDAppearanceCharacteristics
newAppearanceCharacteristics)
Fields
META
public static final de.intarsys.pdf.pd.PDWidgetAnnotation.MetaClass META
DK_H
public static final de.intarsys.pdf.cos.COSName DK_H
Highlighting Mode
CN_H_N
public static final de.intarsys.pdf.cos.COSName CN_H_N
highlightning: N: None
CN_H_I
public static final de.intarsys.pdf.cos.COSName CN_H_I
highlightning: I: Invert
CN_H_O
public static final de.intarsys.pdf.cos.COSName CN_H_O
highlightning: O: Outline
CN_H_P
public static final de.intarsys.pdf.cos.COSName CN_H_P
highlightning: P: Push
CN_H_T
public static final de.intarsys.pdf.cos.COSName CN_H_T
highlightning: T: Toggle
DK_MK
public static final de.intarsys.pdf.cos.COSName DK_MK
CN_Subtype_Widget
public static final de.intarsys.pdf.cos.COSName CN_Subtype_Widget
CN_State_Off
public static final de.intarsys.pdf.cos.COSName CN_State_Off
Methods
getAcroFormField
public PDAcroFormField getAcroFormField()
getAltAppearanceState
public COSName getAltAppearanceState()
setAppearanceCharacteristics
public void setAppearanceCharacteristics(PDAppearanceCharacteristics
newAppearanceCharacteristics)
getAppearanceCharacteristics
public PDAppearanceCharacteristics getAppearanceCharacteristics()
setHighlightingMode
public void setHighlightingMode(COSName newHighlightingMode)
getHighlightingMode
public COSName getHighlightingMode()
getNormalizedRectangle
public CDSRectangle getNormalizedRectangle()
isOff
public boolean isOff()
isWidgetAnnotation
public boolean isWidgetAnnotation()
canReceiveFocus
public boolean canReceiveFocus()
transform
public void transform(CDSRectangle rect,
CDSMatrix matrix)
Change a given rectangle and matrix (belonging to a form) according to the annotations defined rotation.
Parameters:
getSubtypeLabel
public String getSubtypeLabel()
dispose
public void dispose()
cosSetField
public COSObject cosSetField(COSName name,
COSObject cosObj)
de.intarsys.pdf.pd
Class PDWidgetAnnotation.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDAnnotation.MetaClass
|
+-de.intarsys.pdf.pd.PDWidgetAnnotation.MetaClass
de.intarsys.pdf.pd
Class PDXObject
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.pd.PDObject
|
+-de.intarsys.pdf.pd.PDXObject
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
The representation of a XObject. A XObject defines a strokable object. The content is defined in the underlying content stream.
Field Summary
public static final CN_Type_XObject
Method Summary
COSDictionary cosGetDict()
byte[] getBytes()
The data representing the XObject
boolean isForm()
true if this is a form.
boolean isImage()
true if this is an image.
boolean isPostscript()
true if this is a postscript object.
Fields
META
public static final de.intarsys.pdf.pd.PDXObject.MetaClass META
DK_Resources
public static final de.intarsys.pdf.cos.COSName DK_Resources
CN_Type_XObject
public static final de.intarsys.pdf.cos.COSName CN_Type_XObject
Methods
cosGetDict
public COSDictionary cosGetDict()
getBytes
public byte[] getBytes()
Returns:
The data representing the XObject
isForm
public boolean isForm()
Returns:
true if this is a form.
isImage
public boolean isImage()
Returns:
true if this is an image.
isPostscript
public boolean isPostscript()
Returns:
true if this is a postscript object.
setBytes
public void setBytes(byte[] bytes)
Parameters:
bytes - The data representing the XObject
de.intarsys.pdf.pd
Class PDXObject.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.pd.PDObject.MetaClass
|
+-de.intarsys.pdf.pd.PDXObject.MetaClass
Direct Known Subclasses:
MetaClass, MetaClass, MetaClass
Method Summary
Class getRootClass()
Methods
getRootClass
public Class getRootClass()
de.intarsys.pdf.pd
Class SubmitFormFlags
java.lang.Object
|
+-de.intarsys.pdf.pd.AbstractBitFlags
|
+-de.intarsys.pdf.pd.SubmitFormFlags
• 0: include
• 1: include no value fields
• 2: export format
• 3: get method
• 4: submit coordinates
• 5: XFDF
• 6: include append saves
• 7: include annotations
• 8: submit PDF
• 9: canonical format
• 10: exclude non user annotations
• 11: exclude F key
• 12: not defined
• 13: embed form
Field Summary
public static final Bit_CanonicalFormat
Value: 512
Value: 8192
Value: 2048
Value: 1024
Value: 4
Value: 8
Value: 1
Value: 128
Value: 64
Value: 2
Value: 4096
Value: 16
Value: 256
Value: 32
Constructor Summary
public SubmitFormFlags(PDActionSubmitForm submitForm)
Method Summary
boolean isCanonicalFormat()
boolean isEmbedForm()
boolean isExclFKey()
boolean isExclNonUserAnnots()
boolean isExportFormat()
boolean isGetMethod()
boolean isInclude()
boolean isIncludeAnnotations()
boolean isIncludeAppendSaves()
boolean isIncludeNoValueFields()
boolean isNotDEFINED()
boolean isSubmitCoordinates()
boolean isSubmitPDF()
boolean isXFDF()
Fields
Bit_Include
public static final int Bit_Include
Constant value: 1
Bit_IncludeNoValueFields
public static final int Bit_IncludeNoValueFields
Constant value: 2
Bit_ExportFormat
public static final int Bit_ExportFormat
Constant value: 4
Bit_GetMethod
public static final int Bit_GetMethod
Constant value: 8
Bit_SubmitCoordinates
public static final int Bit_SubmitCoordinates
Constant value: 16
Bit_XFDF
public static final int Bit_XFDF
Constant value: 32
Bit_IncludeAppendSaves
public static final int Bit_IncludeAppendSaves
Constant value: 64
Bit_IncludeAnnotations
public static final int Bit_IncludeAnnotations
Bit_SubmitPDF
public static final int Bit_SubmitPDF
Bit_CanonicalFormat
public static final int Bit_CanonicalFormat
Bit_ExclNonUserAnnots
public static final int Bit_ExclNonUserAnnots
Bit_ExclFKey
public static final int Bit_ExclFKey
Bit_NotDEFINED
public static final int Bit_NotDEFINED
Bit_EmbedForm
public static final int Bit_EmbedForm
Constructors
SubmitFormFlags
public SubmitFormFlags(PDActionSubmitForm submitForm)
Methods
setCanonicalFormat
public void setCanonicalFormat(boolean flag)
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()
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()
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()
setXFDF
public void setXFDF(boolean flag)
isXFDF
public boolean isXFDF()
de.intarsys.pdf.postscript
Class Handler
java.lang.Object
|
+-de.intarsys.pdf.postscript.Handler
Very simple class to execute postscript code as it it parsed (which means to execute it again you have to parse it again)
Constructor Summary
public Handler()
Method Summary
java.util.List popResult()
void processEndArray()
void processEndProcedure()
void processLiteral(double d)
void processLiteral(int i)
void processStartArray()
void processStartProcedure()
Constructors
Handler
public Handler()
Methods
popResult
public java.util.List popResult()
processEndArray
public void processEndArray()
processEndProcedure
public void processEndProcedure()
processIdentifier
public void processIdentifier(String string)
throws ParseException
processImmediateIdentifier
public void processImmediateIdentifier(String string)
processKeyIdentifier
public void processKeyIdentifier(String string)
processLiteral
public void processLiteral(double d)
processLiteral
public void processLiteral(int i)
processLiteral
public void processLiteral(String string)
processStartArray
public void processStartArray()
processStartProcedure
public void processStartProcedure()
pushArgs
public void pushArgs(java.util.List args)
de.intarsys.pdf.postscript
Interface IOperator
All Known Implementing Classes:
Operator_abs, Operator_add, Operator_and, Operator_atan, Operator_bitshift, Operator_ceiling,
Operator_copy, Operator_cos, Operator_cvi, Operator_cvr, Operator_div, Operator_dup, Operator_eq,
Operator_exch, Operator_exp, Operator_false, Operator_floor, Operator_ge, Operator_gt, Operator_idiv,
Operator_if, Operator_ifelse, Operator_index, Operator_le, Operator_ln, Operator_log, Operator_lt,
Operator_mod, Operator_mul, Operator_ne, Operator_neg, Operator_not, Operator_or, Operator_pop,
Operator_roll, Operator_round, Operator_sin, Operator_sqrt, Operator_sub, Operator_true, Operator_truncate,
Operator_xor
Method Summary
void execute(java.util.Stack stack)
Methods
execute
public void execute(java.util.Stack stack)
throws ParseException
de.intarsys.pdf.postscript
Class JavaCharStream
java.lang.Object
|
+-de.intarsys.pdf.postscript.JavaCharStream
An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (with java-like unicode
escape processing).
Field Summary
public bufpos
Value: false
Constructor Summary
public JavaCharStream(java.io.Reader dstream, int startline, int startcolumn,
int buffersize)
Method Summary
void adjustBeginLineColumn(int newLine, int newCol)
Method to adjust line and column numbers for the start of a token.
char BeginToken()
void Done()
int getBeginColumn()
int getBeginLine()
int getColumn()
Deprecated.
int getEndColumn()
int getEndLine()
String GetImage()
int getLine()
Deprecated.
char readChar()
Fields
staticFlag
public static final boolean staticFlag
bufpos
public int bufpos
Constructors
JavaCharStream
public JavaCharStream(java.io.Reader dstream,
int startline,
int startcolumn,
int buffersize)
JavaCharStream
public JavaCharStream(java.io.Reader dstream,
int startline,
int startcolumn)
JavaCharStream
public JavaCharStream(java.io.Reader dstream)
JavaCharStream
public JavaCharStream(java.io.InputStream dstream,
String encoding,
int startline,
int startcolumn,
int buffersize)
JavaCharStream
public JavaCharStream(java.io.InputStream dstream,
int startline,
int startcolumn,
int buffersize)
JavaCharStream
public JavaCharStream(java.io.InputStream dstream,
String encoding,
int startline,
int startcolumn)
JavaCharStream
public JavaCharStream(java.io.InputStream dstream,
int startline,
int startcolumn)
JavaCharStream
public JavaCharStream(java.io.InputStream dstream,
String encoding)
JavaCharStream
public JavaCharStream(java.io.InputStream dstream)
Methods
BeginToken
public char BeginToken()
throws java.io.IOException
readChar
public char readChar()
throws java.io.IOException
getColumn
public int getColumn()
Deprecated.
See Also:
getEndColumn()
getLine
public int getLine()
Deprecated.
See Also:
getEndLine()
getEndColumn
public int getEndColumn()
getEndLine
public int getEndLine()
getBeginColumn
public int getBeginColumn()
getBeginLine
public int getBeginLine()
backup
public void backup(int amount)
ReInit
public void ReInit(java.io.Reader dstream,
int startline,
int startcolumn,
int buffersize)
ReInit
public void ReInit(java.io.Reader dstream,
int startline,
int startcolumn)
ReInit
public void ReInit(java.io.Reader dstream)
ReInit
public void ReInit(java.io.InputStream dstream,
String encoding,
int startline,
int startcolumn,
int buffersize)
throws java.io.UnsupportedEncodingException
ReInit
public void ReInit(java.io.InputStream dstream,
int startline,
int startcolumn,
int buffersize)
ReInit
public void ReInit(java.io.InputStream dstream,
String encoding,
int startline,
int startcolumn)
throws java.io.UnsupportedEncodingException
ReInit
public void ReInit(java.io.InputStream dstream,
int startline,
int startcolumn)
ReInit
public void ReInit(java.io.InputStream dstream,
String encoding)
throws java.io.UnsupportedEncodingException
ReInit
public void ReInit(java.io.InputStream dstream)
GetImage
public String GetImage()
GetSuffix
public char[] GetSuffix(int len)
Done
public void Done()
adjustBeginLineColumn
public void adjustBeginLineColumn(int newLine,
int newCol)
Method to adjust line and column numbers for the start of a token.
de.intarsys.pdf.postscript
Class Operator_abs
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_abs
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_abs Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_add
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_add
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_add Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_and
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_and
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_and Instance
Methods
execute
public void execute(java.util.Stack stack)
throws ParseException
de.intarsys.pdf.postscript
Class Operator_atan
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_atan
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_atan Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_bitshift
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_bitshift
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_bitshift Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_ceiling
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_ceiling
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_ceiling Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_copy
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_copy
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_copy Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_cos
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_cos
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_cos Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_cvi
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_cvi
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_cvi Instance
Methods
execute
public void execute(java.util.Stack stack)
throws ParseException
de.intarsys.pdf.postscript
Class Operator_cvr
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_cvr
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_cvr Instance
Methods
execute
public void execute(java.util.Stack stack)
throws ParseException
de.intarsys.pdf.postscript
Class Operator_div
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_div
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_div Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_dup
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_dup
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_dup Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_eq
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_eq
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_eq Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_exch
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_exch
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_exch Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_exp
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_exp
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_exp Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_false
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_false
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_false Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_floor
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_floor
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_floor Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_ge
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_ge
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_ge Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_gt
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_gt
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_gt Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_idiv
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_idiv
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_idiv Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_if
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_if
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_if Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_ifelse
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_ifelse
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_ifelse Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_index
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_index
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_index Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_le
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_le
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_le Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_ln
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_ln
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_ln Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_log
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_log
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_log Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_lt
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_lt
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_lt Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_mod
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_mod
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_mod Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_mul
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_mul
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_mul Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_ne
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_ne
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_ne Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_neg
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_neg
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_neg Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_not
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_not
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_not Instance
Methods
execute
public void execute(java.util.Stack stack)
throws ParseException
de.intarsys.pdf.postscript
Class Operator_or
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_or
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_or Instance
Methods
execute
public void execute(java.util.Stack stack)
throws ParseException
de.intarsys.pdf.postscript
Class Operator_pop
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_pop
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_pop Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_roll
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_roll
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_roll Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_round
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_round
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_round Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_sin
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_sin
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_sin Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_sqrt
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_sqrt
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_sqrt Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_sub
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_sub
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_sub Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_true
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_true
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_true Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_truncate
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_truncate
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_truncate Instance
Methods
execute
public void execute(java.util.Stack stack)
de.intarsys.pdf.postscript
Class Operator_xor
java.lang.Object
|
+-de.intarsys.pdf.postscript.Operator_xor
All Implemented Interfaces:
IOperator
Field Summary
public static Instance
Method Summary
void execute(java.util.Stack stack)
Fields
Instance
public static de.intarsys.pdf.postscript.Operator_xor Instance
Methods
execute
public void execute(java.util.Stack stack)
throws ParseException
de.intarsys.pdf.postscript
Class ParseException
java.lang.Object
|
+-java.lang.Throwable
|
+-java.lang.Exception
|
+-de.intarsys.pdf.postscript.ParseException
All Implemented Interfaces:
java.io.Serializable
This exception is thrown when parse errors are encountered. You can explicitly create objects of this exception type by calling the
method generateParseException in the generated parser. You can modify this class to customize your error reporting mechanisms
so long as you retain the public fields.
Field Summary
public currentToken
This is the last token that has been consumed successfully.
public expectedTokenSequences
Each entry in this array is an array of integers.
public tokenImage
This is a reference to the "tokenImage" array of the generated parser within which the parse
error occurred.
Constructor Summary
public ParseException()
The following constructors are for use by you for whatever purpose you can think of.
Method Summary
String getMessage()
This method has the standard behavior when this object has been created using the standard
constructors.
Fields
currentToken
public de.intarsys.pdf.postscript.Token currentToken
This is the last token that has been consumed successfully. If this object has been created due to a parse error, the token
followng this token will (therefore) be the first error token.
expectedTokenSequences
public int expectedTokenSequences
Each entry in this array is an array of integers. Each array of integers represents a sequence of tokens (by their ordinal
values) that is expected at this point of the parse.
tokenImage
public java.lang.String tokenImage
This is a reference to the "tokenImage" array of the generated parser within which the parse error occurred. This array is
defined in the generated ...Constants interface.
Constructors
ParseException
public ParseException()
The following constructors are for use by you for whatever purpose you can think of. Constructing the exception in this
manner makes the exception behave in the normal way - i.e., as documented in the class "Throwable". The fields
"errorToken", "expectedTokenSequences", and "tokenImage" do not contain relevant information. The JavaCC generated
code does not use these constructors.
ParseException
public ParseException(String message)
ParseException
public ParseException(Throwable cause)
ParseException
public ParseException(Token currentTokenVal,
int[][] expectedTokenSequencesVal,
String[] tokenImageVal)
This constructor is used by the method "generateParseException" in the generated parser. Calling this constructor generates
a new object of this type with the fields "currentToken", "expectedTokenSequences", and "tokenImage" set. The boolean
flag "specialConstructor" is also set to true to indicate that this constructor was used to create this object. This constructor
calls its super class with the empty string to force the "toString" method of parent class "Throwable" to print the error
message in the form: ParseException:
Methods
getMessage
public String getMessage()
This method has the standard behavior when this object has been created using the standard constructors. Otherwise, it uses
"currentToken" and "expectedTokenSequences" to generate a parse error message and returns it. If this object has been
created due to a parse error, and you do not catch it (it gets thrown from the parser), then this method is called during the
printing of the final stack trace, and hence the correct error message gets displayed.
de.intarsys.pdf.postscript
Class Parser
java.lang.Object
|
+-de.intarsys.pdf.postscript.Parser
All Implemented Interfaces:
ParserConstants
Field Summary
public jj_nt
public token
public token_source
Constructor Summary
public Parser(java.io.InputStream stream)
Method Summary
void disable_tracing()
void enable_tracing()
ParseException generateParseException()
Token getNextToken()
Fields
token
public de.intarsys.pdf.postscript.Token token
jj_nt
public de.intarsys.pdf.postscript.Token jj_nt
token_source
public de.intarsys.pdf.postscript.ParserTokenManager token_source
Constructors
Parser
public Parser(java.io.InputStream stream)
Parser
public Parser(java.io.InputStream stream,
String encoding)
Parser
public Parser(java.io.Reader stream)
Parser
public Parser(ParserTokenManager tm)
Methods
disable_tracing
public final void disable_tracing()
enable_tracing
public final void enable_tracing()
generateParseException
public ParseException generateParseException()
getNextToken
public final Token getNextToken()
getToken
public final Token getToken(int index)
parse
public final void parse(Handler handler)
throws ParseException
ReInit
public void ReInit(java.io.InputStream stream)
ReInit
public void ReInit(java.io.InputStream stream,
String encoding)
ReInit
public void ReInit(java.io.Reader stream)
ReInit
public void ReInit(ParserTokenManager tm)
de.intarsys.pdf.postscript
Interface ParserConstants
All Known Implementing Classes:
Parser, ParserTokenManager
Field Summary
public static final DECIMAL_LITERAL
Value: 4
Value: 0
Value: 13
Value: 0
Value: 7
Value: 6
Value: 5
Value: 9
Value: 11
Value: 3
Value: 10
Value: 14
Value: 16
Value: 12
Value: 15
Value: 17
Value: 8
Fields
DECIMAL_LITERAL
public static final int DECIMAL_LITERAL
Constant value: 4
DEFAULT
public static final int DEFAULT
Constant value: 0
DIGIT
public static final int DIGIT
Constant value: 13
EOF
public static final int EOF
Constant value: 0
EXPONENT
public static final int EXPONENT
Constant value: 7
FLOATING_POINT_LITERAL
public static final int FLOATING_POINT_LITERAL
Constant value: 6
HEX_LITERAL
public static final int HEX_LITERAL
Constant value: 5
IDENTIFIER
public static final int IDENTIFIER
Constant value: 9
IMMEDIATE_IDENTIFIER
public static final int IMMEDIATE_IDENTIFIER
Constant value: 11
INTEGER_LITERAL
public static final int INTEGER_LITERAL
Constant value: 3
KEY_IDENTIFIER
public static final int KEY_IDENTIFIER
Constant value: 10
LBRACE
public static final int LBRACE
Constant value: 14
LBRACKET
public static final int LBRACKET
Constant value: 16
LETTER
public static final int LETTER
Constant value: 12
RBRACE
public static final int RBRACE
Constant value: 15
RBRACKET
public static final int RBRACKET
Constant value: 17
STRING_LITERAL
public static final int STRING_LITERAL
Constant value: 8
tokenImage
public static final java.lang.String tokenImage
de.intarsys.pdf.postscript
Class ParserTokenManager
java.lang.Object
|
+-de.intarsys.pdf.postscript.ParserTokenManager
All Implemented Interfaces:
ParserConstants
Field Summary
public debugStream
Constructor Summary
public ParserTokenManager(JavaCharStream stream)
Method Summary
Token getNextToken()
Fields
jjstrLiteralImages
public static final java.lang.String jjstrLiteralImages
lexStateNames
public static final java.lang.String lexStateNames
debugStream
public java.io.PrintStream debugStream
Constructors
ParserTokenManager
public ParserTokenManager(JavaCharStream stream)
ParserTokenManager
public ParserTokenManager(JavaCharStream stream,
int lexState)
Methods
getNextToken
public Token getNextToken()
ReInit
public void ReInit(JavaCharStream stream)
ReInit
public void ReInit(JavaCharStream stream,
int lexState)
setDebugStream
public void setDebugStream(java.io.PrintStream ds)
SwitchTo
public void SwitchTo(int lexState)
de.intarsys.pdf.postscript
Class Token
java.lang.Object
|
+-de.intarsys.pdf.postscript.Token
Field Summary
public beginColumn
beginLine and beginColumn describe the position of the first character of this token;
endLine and endColumn describe the position of the last character of this token.
public beginLine
beginLine and beginColumn describe the position of the first character of this token;
endLine and endColumn describe the position of the last character of this token.
public endColumn
beginLine and beginColumn describe the position of the first character of this token;
endLine and endColumn describe the position of the last character of this token.
public endLine
beginLine and beginColumn describe the position of the first character of this token;
endLine and endColumn describe the position of the last character of this token.
public image
The string image of the token.
public kind
An integer that describes the kind of this token.
public next
A reference to the next regular (non-special) token from the input stream.
public specialToken
This field is used to access special tokens that occur prior to this token, but after the
immediately preceding regular (non-special) token.
Constructor Summary
public Token()
Method Summary
static Token newToken(int ofKind)
Returns a new Token object, by default.
String toString()
Returns the image.
Fields
beginLine
public int beginLine
beginLine and beginColumn describe the position of the first character of this token; endLine and endColumn describe the
position of the last character of this token.
beginColumn
public int beginColumn
beginLine and beginColumn describe the position of the first character of this token; endLine and endColumn describe the
position of the last character of this token.
endLine
public int endLine
beginLine and beginColumn describe the position of the first character of this token; endLine and endColumn describe the
position of the last character of this token.
endColumn
public int endColumn
beginLine and beginColumn describe the position of the first character of this token; endLine and endColumn describe the
position of the last character of this token.
image
public java.lang.String image
kind
public int kind
An integer that describes the kind of this token. This numbering system is determined by JavaCCParser, and a table of
these numbers is stored in the file ...Constants.java.
next
public de.intarsys.pdf.postscript.Token next
A reference to the next regular (non-special) token from the input stream. If this is the last token from the input stream, or
if the token manager has not read tokens beyond this one, this field is set to null. This is true only if this token is also a
regular token. Otherwise, see below for a description of the contents of this field.
specialToken
public de.intarsys.pdf.postscript.Token specialToken
This field is used to access special tokens that occur prior to this token, but after the immediately preceding regular (non-
special) token. If there are no such special tokens, this field is set to null. When there are more than one such special token,
this field refers to the last of these special tokens, which in turn refers to the next previous special token through its
specialToken field, and so on until the first special token (whose specialToken field is null). The next fields of special
tokens refer to other special tokens that immediately follow it (without an intervening regular token). If there is no such
token, this field is null.
Constructors
Token
public Token()
Methods
newToken
public final static Token newToken(int ofKind)
Returns a new Token object, by default. However, if you want, you can create and return subclass objects based on the
value of ofKind. Simply add the cases to the switch for all those special cases. For example, if you have a subclass of
Token called IDToken that you want to create if ofKind is ID, simlpy add something like : case MyParserConstants.ID :
return new IDToken(); to the following switch statement. Then you can cast matchedToken variable to the appropriate type
and use it in your lexical actions.
toString
public String toString()
de.intarsys.pdf.postscript
Class TokenMgrError
java.lang.Object
|
+-java.lang.Throwable
|
+-java.lang.Error
|
+-de.intarsys.pdf.postscript.TokenMgrError
All Implemented Interfaces:
java.io.Serializable
Constructor Summary
public TokenMgrError()
Method Summary
String getMessage()
You can also modify the body of this method to customize your error messages.
Constructors
TokenMgrError
public TokenMgrError()
TokenMgrError
public TokenMgrError(boolean EOFSeen,
int lexState,
int errorLine,
int errorColumn,
String errorAfter,
char curChar,
int reason)
TokenMgrError
public TokenMgrError(String message,
int reason)
Methods
getMessage
public String getMessage()
You can also modify the body of this method to customize your error messages. For example, cases like
LOOP_DETECTED and INVALID_LEXICAL_STATE are not of end-users concern, so you can return something like :
"Internal Error : Please file a bug report .... " from this method for such cases in the release version of your parser.
de.intarsys.pdf.st
Class AbstractXRefParser
java.lang.Object
|
+-de.intarsys.pdf.st.AbstractXRefParser
Direct Known Subclasses:
XRefFallbackParser, XRefStreamParser, XRefTrailerParser
Constructor Summary
public AbstractXRefParser(STDocument doc, COSDocumentParser parser)
Method Summary
abstract parse(IRandomAccess randomAcces)
STXRefSection
Parser the STXRefSection from the randomAccess.
Constructors
AbstractXRefParser
public AbstractXRefParser(STDocument doc,
COSDocumentParser parser)
Methods
parse
public abstract STXRefSection parse(IRandomAccess randomAcces)
throws java.io.IOException,
COSLoadException
Parameters:
randomAcces
Returns:
The parsed STXRefSection
Throws:
IOException
COSLoadException
de.intarsys.pdf.st
Class AbstractXRefWriter
java.lang.Object
|
+-de.intarsys.pdf.st.AbstractXRefWriter
All Implemented Interfaces:
IXRefEntryVisitor
Field Summary
public static final STARTXREF
Constructor Summary
public AbstractXRefWriter(COSWriter cosWriter)
Method Summary
COSWriter getCosWriter()
Fields
STARTXREF
public static final byte STARTXREF
Constructors
AbstractXRefWriter
public AbstractXRefWriter(COSWriter cosWriter)
Methods
getCosWriter
public COSWriter getCosWriter()
visitFromCompressed
public void visitFromCompressed(STXRefEntryCompressed entry)
throws XRefEntryVisitorException
visitFromFree
public void visitFromFree(STXRefEntryFree entry)
throws XRefEntryVisitorException
visitFromOccupied
public void visitFromOccupied(STXRefEntryOccupied entry)
throws XRefEntryVisitorException
writeXRef
public void writeXRef(STXRefSection xRefSection)
throws java.io.IOException
de.intarsys.pdf.st
Class COSObjectStream
java.lang.Object
|
+-de.intarsys.pdf.cos.COSBasedObject
|
+-de.intarsys.pdf.st.COSObjectStream
All Implemented Interfaces:
ICOSObjectListener, IAttributeSupport
Field Summary
public static final CN_Type_ObjStm
Method Summary
int getFirst()
int getN()
Fields
META
public static final de.intarsys.pdf.st.COSObjectStream.MetaClass META
CN_Type_ObjStm
public static final de.intarsys.pdf.cos.COSName CN_Type_ObjStm
DK_First
public static final de.intarsys.pdf.cos.COSName DK_First
DK_N
public static final de.intarsys.pdf.cos.COSName DK_N
DK_Extends
public static final de.intarsys.pdf.cos.COSName DK_Extends
Methods
getFirst
public int getFirst()
getN
public int getN()
loadObject
public COSObject loadObject(int index,
COSDocumentParser parser)
throws java.io.IOException,
COSLoadException
parse
public void parse(int index,
COSDocumentParser parser)
throws java.io.IOException,
COSLoadException
de.intarsys.pdf.st
Class COSObjectStream.MetaClass
java.lang.Object
|
+-de.intarsys.pdf.cos.MetaClass
|
+-de.intarsys.pdf.cos.COSBasedObject.MetaClass
|
+-de.intarsys.pdf.st.COSObjectStream.MetaClass
de.intarsys.pdf.st
Class EnumWriteMode
java.lang.Object
|
+-de.intarsys.tools.enumeration.EnumItem
|
+-de.intarsys.pdf.st.EnumWriteMode
All Implemented Interfaces:
Comparable
Field Summary
public static final FULL
Force full writing
Method Summary
boolean isFull()
boolean isIncremental()
boolean isUndefined()
Fields
META
public static final de.intarsys.tools.enumeration.EnumMeta META
UNDEFINED
public static final de.intarsys.pdf.st.EnumWriteMode UNDEFINED
INCREMENTAL
public static final de.intarsys.pdf.st.EnumWriteMode INCREMENTAL
FULL
public static final de.intarsys.pdf.st.EnumWriteMode FULL
Methods
isIncremental
public boolean isIncremental()
isFull
public boolean isFull()
isUndefined
public boolean isUndefined()
de.intarsys.pdf.st
Class PACKAGE
java.lang.Object
|
+-de.intarsys.pdf.st.PACKAGE
Field Summary
public static final Log
Constructor Summary
public PACKAGE()
Fields
Messages
public static final de.intarsys.tools.message.MessageBundle Messages
Log
public static final java.util.logging.Logger Log
Constructors
PACKAGE
public PACKAGE()
de.intarsys.pdf.st
Class STDocType
java.lang.Object
|
+-de.intarsys.pdf.st.STDocType
Constructor Summary
public STDocType()
Method Summary
String getTypeName()
String getVersion()
boolean isFDF()
boolean isPDF()
String toString()
Constructors
STDocType
public STDocType()
STDocType
public STDocType(String typeName,
String version)
Methods
getVersion
public String getVersion()
setVersion
public void setVersion(String version)
getTypeName
public String getTypeName()
setTypeName
public void setTypeName(String typeName)
toString
public String toString()
isFDF
public boolean isFDF()
isPDF
public boolean isPDF()
de.intarsys.pdf.st
Class STDocument
java.lang.Object
|
+-de.intarsys.pdf.st.STDocument
All Implemented Interfaces:
ILocatorSupport
The most physical abstraction of a PDF document. This object handles the random access representation of the PDF file.
An STDocument manages the cross ref access to data stream positions from COS level objects. As such the ST and the COS
package are highly interdependent.
Field Summary
public static final DOCTYPE_FDF
our current fdf version number *
Value: writeModeHint
Method Summary
void addChangedReference(COSIndirectObject object)
Mark object as changed within this document.
void close()
Close the document.
STDocument copyDeep()
Return a deep copy of the document.
COSDictionary cosGetTrailer()
The documents trailer dictionary
STXRefSection createNewXRefSection()
COSObjectKey createObjectKey()
Create a new valid key for use in the document.
void garbageCollect()
Start a garbage collection for the receiver.
Object getAccessLock()
java.util.Collection getChanges()
COSDocument getDoc()
STDocType getDocType()
int getIncrementalCount()
COSDictionary getLinearizedDict()
The /Linearized dictionary of the document.
ILocator getLocator()
THe locator for the document data.
String getName()
A name for the document.
COSDocumentParser getParser()
The parser used for decoding the document data stream.
IRandomAccess getRandomAccess()
The random access object for the documents data.
ISystemSecurityHandle getSystemSecurityHandler()
r
The documents security handler
COSTrailer getTrailer()
String getVersion()
The version of the PDF spec for this document
EnumWriteMode getWriteModeHint()
The write mode to be used when the document is written the next time.
STXRefSection getXRefSection()
The most recent STXrefSection of the document.
void incrementalGarbageCollect()
boolean isClosed()
boolean isDirty()
true if this has been changed.
boolean isEncrypted()
boolean isLinearized()
true if this document is linearized.
boolean isNew()
boolean isReadOnly()
true if this is read only.
boolean isStreamed()
true if this has only streamed xref sections.
void loadAll()
int loadedSize()
The number of objects currently loaded.
java.util.Iterator objects()
An iterator on the indirect objects of the storage layer document.
void reparseFromLocator()
Reparses the XREF sections without actually instantiating.
void save()
void updateModificationDate()
Fields
DOCTYPE_FDF
public static final de.intarsys.pdf.st.STDocType DOCTYPE_FDF
DOCTYPE_PDF
public static final de.intarsys.pdf.st.STDocType DOCTYPE_PDF
OPTION_WRITEMODEHINT
public static final java.lang.String OPTION_WRITEMODEHINT
Methods
createFromLocator
public static STDocument createFromLocator(ILocator locator)
throws java.io.IOException,
COSLoadException
Parameters:
locator - The locator to the documents data
Returns:
A new document representing the data referenced by locator.
Throws:
IOException
COSLoadException
createNew
public static STDocument createNew()
Returns:
A new empty pdf document
createNew
public static STDocument createNew(STDocType docType)
Returns:
A new empty document
addChangedReference
public void addChangedReference(COSIndirectObject object)
Parameters:
object - The object that is new or changed
addObjectReference
public void addObjectReference(COSIndirectObject newRef)
Parameters:
newRef - The new indirect object.
close
public void close()
throws java.io.IOException
Throws:
IOException
copyDeep
public STDocument copyDeep()
Return a deep copy of the document. This will create a copy of the documents content. The new documents location
(random access) is undefined. The objects will not preserve their key values.
Returns:
A deep copy of this.
cosGetTrailer
public COSDictionary cosGetTrailer()
Returns:
The documents trailer dictionary
createNewXRefSection
public STXRefSection createNewXRefSection()
createObjectKey
public COSObjectKey createObjectKey()
Returns:
A new valid key for use in the document.
garbageCollect
public void garbageCollect()
Start a garbage collection for the receiver. In a garbage collection every indirect object currently unused (unreachable from
the catalog) is removed.
getAccessLock
public Object getAccessLock()
getChanges
public java.util.Collection getChanges()
getDoc
public COSDocument getDoc()
getDocType
public STDocType getDocType()
getIncrementalCount
public int getIncrementalCount()
getLocator
public ILocator getLocator()
Returns:
THe locator for the document data.
getName
public String getName()
This is either a "local" name or the name of the locator reference if present.
Returns:
getObjectReference
public COSIndirectObject getObjectReference(COSObjectKey key)
The indirect object with object number objNum and generation number genNum is looked up in the document. If the
indirect object is not yet available, it is created and registered.
Parameters:
key
Returns:
The indirect object with object number objNum and generation number genNum
getParser
public COSDocumentParser getParser()
Returns:
The parser used for decoding the document data stream.
getRandomAccess
public IRandomAccess getRandomAccess()
The random access object for the documents data. Be aware that using the IRandomAccess after it is closed will throw an
IOException.
Returns:
The random access object for the documents data.
getSystemSecurityHandler
public ISystemSecurityHandler getSystemSecurityHandler()
Returns:
The documents security handler
getTrailer
public COSTrailer getTrailer()
getVersion
public String getVersion()
Returns:
The version of the PDF spec for this document
getWriteModeHint
public EnumWriteMode getWriteModeHint()
The write mode to be used when the document is written the next time. If defined this overrides any hint that is used when
saving the document. The write mode is reset after each "save".
Returns:
The write mode to be used when the document is written.
getXRefSection
public STXRefSection getXRefSection()
Returns:
The most recent STXrefSection of the document.
incrementalGarbageCollect
public void incrementalGarbageCollect()
isClosed
public boolean isClosed()
isDirty
public boolean isDirty()
Returns:
true if this has been changed.
isEncrypted
public boolean isEncrypted()
Returns:
if the document has an ISystemSecurityHandler
isNew
public boolean isNew()
isReadOnly
public boolean isReadOnly()
Returns:
true if this is read only.
isStreamed
public boolean isStreamed()
Returns:
true if this has only streamed xref sections.
load
public COSObject load(COSIndirectObject ref)
throws java.io.IOException,
COSLoadException
Parameters:
ref - The object reference to be loaded.
Throws:
IOException
COSLoadException
loadAll
public void loadAll()
throws java.io.IOException,
COSLoadException
loadedSize
public int loadedSize()
Returns:
The number of objects currently loaded.
objects
public java.util.Iterator objects()
An iterator on the indirect objects of the storage layer document. This includes garbage and purely technical objects like x
ref streams.
Returns:
An iterator on the indirect objects of the storage layer document. This includes garbage and purely technical objects
like x ref streams.
reparseFromLocator
public void reparseFromLocator()
throws java.io.IOException,
COSLoadException
Reparses the XREF sections without actually instantiating. Used for collecting errors on XREF level
Throws:
IOException
COSLoadException
restore
public void restore(ILocator newLocator)
throws java.io.IOException,
COSLoadException
save
public void save()
throws java.io.IOException
save
public void save(ILocator pLocator)
throws java.io.IOException
save
public void save(ILocator pLocator,
java.util.Map options)
throws java.io.IOException
setDirty
public void setDirty(boolean dirty)
Parameters:
dirty - true if this should be marked as changed
setDoc
public void setDoc(COSDocument doc)
setName
public void setName(String name)
Parameters:
name - The new local name of this
setWriteModeHint
public void setWriteModeHint(EnumWriteMode writeMode)
The write mode to be used when the document is written the next time. If defined this overrides any hint that is used when
saving the document. The write mode is reset after each "save".
Parameters:
writeMode - The write mode to be used when the document is written.
setXRefSection
public void setXRefSection(STXRefSection xRefSection)
Parameters:
xRefSection - The x ref section representing the most recent document changes.
updateModificationDate
public void updateModificationDate()
isLinearized
public boolean isLinearized()
When linearized reading is truly implemented, this check should be made using the document length instead for
performance reasons.
Returns:
true if this document is linearized.
getLinearizedDict
public COSDictionary getLinearizedDict()
The /Linearized dictionary of the document. The /Linearized dictionary is represented by the first entry in the (logically)
first XRef section.
Note that this method may NOT return a dictionary even if the document contains a /Linearized dictionary as the first
object. This is the case when the document was linearized and was written with an incremental change so that the
linearization is obsolete.
Returns:
de.intarsys.pdf.st
Class STStreamXRefSection
java.lang.Object
|
+-de.intarsys.pdf.st.STXRefSection
|
+-de.intarsys.pdf.st.STStreamXRefSection
Field Summary
public static final CN_Type_XRef
Constructor Summary
public STStreamXRefSection(STDocument doc, long offset, COSStream stream)
Method Summary
COSDictionary cosGetDict()
COSObject cosGetObject()
COSStream cosGetStream()
STXRefSection createSuccessor()
Fields
DK_Type
public static final de.intarsys.pdf.cos.COSName DK_Type
CN_Type_XRef
public static final de.intarsys.pdf.cos.COSName CN_Type_XRef
DK_Index
public static final de.intarsys.pdf.cos.COSName DK_Index
DK_W
public static final de.intarsys.pdf.cos.COSName DK_W
Constructors
STStreamXRefSection
public STStreamXRefSection(STDocument doc,
long offset,
COSStream stream)
STStreamXRefSection
public STStreamXRefSection(STDocument doc)
Methods
cosGetDict
public COSDictionary cosGetDict()
cosGetStream
public COSStream cosGetStream()
setIndex
public void setIndex(COSArray index)
createSuccessor
public STXRefSection createSuccessor()
cosGetObject
public COSObject cosGetObject()
getWriter
public AbstractXRefWriter getWriter(COSWriter cosWriter)
de.intarsys.pdf.st
Class STTrailerXRefSection
java.lang.Object
|
+-de.intarsys.pdf.st.STXRefSection
|
+-de.intarsys.pdf.st.STTrailerXRefSection
Constructor Summary
public STTrailerXRefSection(STDocument doc, long offset)
Method Summary
COSDictionary cosGetDict()
COSObject cosGetObject()
STXRefSection createSuccessor()
STStreamXRefSection getXRefStream()
Constructors
STTrailerXRefSection
public STTrailerXRefSection(STDocument doc,
long offset)
STTrailerXRefSection
public STTrailerXRefSection(STDocument doc)
Methods
cosGetDict
public COSDictionary cosGetDict()
cosSetDict
public void cosSetDict(COSDictionary pTrailerDict)
getXRefStream
public STStreamXRefSection getXRefStream()
setXRefStream
public void setXRefStream(STStreamXRefSection xRefStream)
createSuccessor
public STXRefSection createSuccessor()
load
public COSObject load(int objectNumber,
ISystemSecurityHandler securityHandler)
throws java.io.IOException,
COSLoadException
cosGetObject
public COSObject cosGetObject()
getWriter
public AbstractXRefWriter getWriter(COSWriter cosWriter)
de.intarsys.pdf.st
Class STXRefEntry
java.lang.Object
|
+-de.intarsys.pdf.st.STXRefEntry
All Implemented Interfaces:
Comparable
The XRef entry describes an object slot in a XRef. The entry consists of an offset in the file, a generation number and a token
indicating if this entry is free.
Method Summary
abstract void accept(IXRefEntryVisitor visitor)
int getGenerationNumber()
COSObjectKey getKey()
int getObjectNumber()
String toString()
Methods
isFree
public abstract boolean isFree()
getGenerationNumber
public int getGenerationNumber()
compareTo
public int compareTo(Object obj)
fill
public abstract STXRefEntryOccupied fill(int pos)
getObjectNumber
public int getObjectNumber()
toString
public String toString()
load
public abstract COSObject load(STDocument doc,
ISystemSecurityHandler securityHandler)
throws java.io.IOException,
COSLoadException
getColumn1
public abstract long getColumn1()
getColumn2
public abstract int getColumn2()
getKey
public COSObjectKey getKey()
accept
public abstract void accept(IXRefEntryVisitor visitor)
throws XRefEntryVisitorException
copy
public abstract STXRefEntry copy()
de.intarsys.pdf.st
Class STXRefEntryCompressed
java.lang.Object
|
+-de.intarsys.pdf.st.STXRefEntry
|
+-de.intarsys.pdf.st.STXRefEntryCompressed
All Implemented Interfaces:
Comparable
Constructor Summary
public STXRefEntryCompressed(COSObjectKey key, COSObjectKey stmObjectKey, int
indexOfObject)
Method Summary
void accept(IXRefEntryVisitor visitor)
STXRefEntry copy()
long getColumn1()
int getColumn2()
int getIndex()
COSObjectKey getStreamObjectKey()
int getStreamObjectNumber()
boolean isFree()
Constructors
STXRefEntryCompressed
public STXRefEntryCompressed(COSObjectKey key,
COSObjectKey stmObjectKey,
int indexOfObject)
Methods
isFree
public boolean isFree()
load
public COSObject load(STDocument doc,
ISystemSecurityHandler securityHandler)
throws java.io.IOException,
COSLoadException
getColumn1
public long getColumn1()
getColumn2
public int getColumn2()
fill
public STXRefEntryOccupied fill(int pos)
accept
public void accept(IXRefEntryVisitor visitor)
throws XRefEntryVisitorException
getIndex
public int getIndex()
getStreamObjectKey
public COSObjectKey getStreamObjectKey()
getStreamObjectNumber
public int getStreamObjectNumber()
copy
public STXRefEntry copy()
de.intarsys.pdf.st
Class STXRefEntryFree
java.lang.Object
|
+-de.intarsys.pdf.st.STXRefEntry
|
+-de.intarsys.pdf.st.STXRefEntryFree
All Implemented Interfaces:
Comparable
Constructor Summary
public STXRefEntryFree(COSObjectKey key, int nextFreeObject)
Method Summary
void accept(IXRefEntryVisitor visitor)
STXRefEntry copy()
long getColumn1()
int getColumn2()
int getNextFreeObjectNumber()
boolean isFree()
Constructors
STXRefEntryFree
public STXRefEntryFree(COSObjectKey key,
int nextFreeObject)
Methods
getColumn1
public long getColumn1()
getColumn2
public int getColumn2()
isFree
public boolean isFree()
getNextFreeObjectNumber
public int getNextFreeObjectNumber()
enqueue
public void enqueue(STXRefEntryFree entry)
Add a new free entry in the linked list of free entries. The linked list is formed by the head entry with index 0. This entry
and all subsequent hold a reference to their successor and predecessor. Adding a new entry means that we look up the entry
in the linked list, starting at the head, that has the highest index smaller than the index of the new entry. The new entry is
inserted after that position in the linked list.
Parameters:
entry - The new entry to insert in the linked list.
fill
public STXRefEntryOccupied fill(int pos)
load
public COSObject load(STDocument doc,
ISystemSecurityHandler securityHandler)
accept
public void accept(IXRefEntryVisitor visitor)
throws XRefEntryVisitorException
copy
public STXRefEntry copy()
de.intarsys.pdf.st
Class STXRefEntryOccupied
java.lang.Object
|
+-de.intarsys.pdf.st.STXRefEntry
|
+-de.intarsys.pdf.st.STXRefEntryOccupied
All Implemented Interfaces:
Comparable
Constructor Summary
public STXRefEntryOccupied(COSObjectKey key, long offset)
Method Summary
void accept(IXRefEntryVisitor visitor)
STXRefEntry copy()
long getColumn1()
int getColumn2()
long getOffset()
boolean isFree()
Constructors
STXRefEntryOccupied
public STXRefEntryOccupied(COSObjectKey key,
long offset)
Methods
isFree
public boolean isFree()
See Also:
STXRefEntry.isFree()
load
public COSObject load(STDocument doc,
ISystemSecurityHandler securityHandler)
throws java.io.IOException,
COSLoadException
fill
public STXRefEntryOccupied fill(int pos)
getOffset
public long getOffset()
setOffset
public void setOffset(long offset)
getColumn1
public long getColumn1()
getColumn2
public int getColumn2()
accept
public void accept(IXRefEntryVisitor visitor)
throws XRefEntryVisitorException
copy
public STXRefEntry copy()
de.intarsys.pdf.st
Class STXRefSection
java.lang.Object
|
+-de.intarsys.pdf.st.STXRefSection
Direct Known Subclasses:
STStreamXRefSection, STTrailerXRefSection
A section in a XRef.
The XRef allows random access to the objects in the PDF file.
A XRef section is the part of a pdf document starting with a "xref" token. It consists of several, non contiguous subsections, one
additional for each incremental update.
Field Summary
public static final DK_XRefStm
Method Summary
void addEntry(STXRefEntry entry)
abstract cosGetDict()
COSDictionary
The "trailer" dictionary associated with the XRef section.
COSObject cosGetEncryption()
abstract createSuccessor()
STXRefSection
java.util.Iterator entryIterator()
STDocument getDoc()
COSArray getID()
int getIncrementalCount()
int getMaxObjectNumber()
long getOffset()
STXRefSection getPrevious()
int getPreviousOffset()
int getSize()
The total number of indirect objects in the document.
int getStart()
The object number of the first object in this section.
STXRefSubsection getXRefSubsection()
The first subsection in this section.
java.util.Iterator subsectionIterator()
Fields
DK_XRefStm
public static final de.intarsys.pdf.cos.COSName DK_XRefStm
Methods
addEntry
public void addEntry(STXRefEntry entry)
contains
public boolean contains(int number)
cosGetDict
public abstract COSDictionary cosGetDict()
Returns:
The "trailer" dictionary associated with the XRef section.
cosGetEncryption
public COSObject cosGetEncryption()
cosGetObject
public abstract COSObject cosGetObject()
cosSetEncryption
public void cosSetEncryption(COSObject encryption)
createSuccessor
public abstract STXRefSection createSuccessor()
entryIterator
public java.util.Iterator entryIterator()
getDoc
public STDocument getDoc()
getEntry
public STXRefEntry getEntry(int number)
getID
public COSArray getID()
getIncrementalCount
public int getIncrementalCount()
getMaxObjectNumber
public int getMaxObjectNumber()
getOffset
public long getOffset()
getPrevious
public STXRefSection getPrevious()
getPreviousOffset
public int getPreviousOffset()
Returns:
offset of previous trailer dict or -1 if none exists
getSize
public int getSize()
Returns:
The total number of indirect objects in the document.
getStart
public int getStart()
Returns:
The object number of the first object in this section.
getWriter
public abstract AbstractXRefWriter getWriter(COSWriter cosWriter)
getXRefSubsection
public STXRefSubsection getXRefSubsection()
The first subsection in this section. All other subsections are implemented as a linked list.
Returns:
The first subsection in this section.
load
public COSObject load(int objectNumber,
ISystemSecurityHandler securityHandler)
throws java.io.IOException,
COSLoadException
subsectionIterator
public java.util.Iterator subsectionIterator()
de.intarsys.pdf.st
Class STXRefSubsection
java.lang.Object
|
+-de.intarsys.pdf.st.STXRefSubsection
A XRef section consists of at least one subsection. The subsections describe the objects that have changed with regard to the
previous document version.
Each subsection contains entries for a contiguous range of objects. The serialized form starts with 2 number, the object number of
the first entry and the number of entries. Following this ther is one line for each enty in the form In Use entry: offset[10] " "
generation[5] " " n eol[2] Free entry: next free[10] " " generation[5] " " f eol[2]
Constructor Summary
public STXRefSubsection(STXRefSection xRefSection, int start)
Method Summary
int getSize()
int getStart()
int getStop()
Constructors
STXRefSubsection
public STXRefSubsection(STXRefSection xRefSection,
int start)
Methods
getStart
public int getStart()
getStop
public int getStop()
getSize
public int getSize()
de.intarsys.pdf.st
Class XRefEntryVisitorException
java.lang.Object
|
+-java.lang.Throwable
|
+-java.lang.Exception
|
+-de.intarsys.pdf.st.XRefEntryVisitorException
All Implemented Interfaces:
java.io.Serializable
Constructor Summary
public XRefEntryVisitorException(Throwable cause)
Constructors
XRefEntryVisitorException
public XRefEntryVisitorException(Throwable cause)
de.intarsys.pdf.st
Class XRefFallbackParser
java.lang.Object
|
+-de.intarsys.pdf.st.AbstractXRefParser
|
+-de.intarsys.pdf.st.XRefFallbackParser
The parser reads lines in the document and looks if the line begins with a object definition, which looks like: number number "obj".
Every object definition found is added as a XRefEntry to the STDocument.
False object definitions can be read and they can cause a problem, if a real object with the same object number is read after the
false one. On the other side: the document was already broke before this parser was called.
Constructor Summary
public XRefFallbackParser(STDocument doc, COSDocumentParser parser)
Method Summary
STXRefSection parse(IRandomAccess input)
Constructors
XRefFallbackParser
public XRefFallbackParser(STDocument doc,
COSDocumentParser parser)
Methods
parse
public STXRefSection parse(IRandomAccess input)
throws java.io.IOException,
COSLoadException
de.intarsys.pdf.st
Class XRefStreamParser
java.lang.Object
|
+-de.intarsys.pdf.st.AbstractXRefParser
|
+-de.intarsys.pdf.st.XRefStreamParser
Constructor Summary
public XRefStreamParser(STDocument doc, COSDocumentParser parser)
Method Summary
STXRefSection parse(IRandomAccess randomAcces)
Constructors
XRefStreamParser
public XRefStreamParser(STDocument doc,
COSDocumentParser parser)
Methods
parse
public STXRefSection parse(IRandomAccess randomAcces)
throws java.io.IOException,
COSLoadException
de.intarsys.pdf.st
Class XRefStreamWriter
java.lang.Object
|
+-de.intarsys.pdf.st.AbstractXRefWriter
|
+-de.intarsys.pdf.st.XRefStreamWriter
All Implemented Interfaces:
IXRefEntryVisitor
Field Summary
public static TYPE_COMPRESSED
Constructor Summary
public XRefStreamWriter(COSWriter cosWriter)
Fields
TYPE_FREE
public static byte TYPE_FREE
TYPE_OCCUPIED
public static byte TYPE_OCCUPIED
TYPE_COMPRESSED
public static byte TYPE_COMPRESSED
Constructors
XRefStreamWriter
public XRefStreamWriter(COSWriter cosWriter)
de.intarsys.pdf.st
Class XRefTrailerParser
java.lang.Object
|
+-de.intarsys.pdf.st.AbstractXRefParser
|
+-de.intarsys.pdf.st.XRefTrailerParser
Constructor Summary
public XRefTrailerParser(STDocument doc, COSDocumentParser parser)
Method Summary
STXRefSection parse(IRandomAccess randomAcces)
Constructors
XRefTrailerParser
public XRefTrailerParser(STDocument doc,
COSDocumentParser parser)
Methods
parse
public STXRefSection parse(IRandomAccess randomAcces)
throws java.io.IOException,
COSLoadException
de.intarsys.pdf.st
Class XRefTrailerWriter
java.lang.Object
|
+-de.intarsys.pdf.st.AbstractXRefWriter
|
+-de.intarsys.pdf.st.XRefTrailerWriter
All Implemented Interfaces:
IXRefEntryVisitor
Field Summary
public static final FORMAT_XREF_GENERATION
Constructor Summary
public XRefTrailerWriter(COSWriter cosWriter)
Method Summary
void visitFromCompressed(STXRefEntryCompressed entry)
Fields
TYPE_FREE
public static final byte TYPE_FREE
TYPE_OCCUPIED
public static final byte TYPE_OCCUPIED
FORMAT_XREF_GENERATION
public static final java.text.NumberFormat FORMAT_XREF_GENERATION
FORMAT_XREF_OFFSET
public static final java.text.NumberFormat FORMAT_XREF_OFFSET
XREF
public static final byte XREF
Constructors
XRefTrailerWriter
public XRefTrailerWriter(COSWriter cosWriter)
Methods
visitFromCompressed
public void visitFromCompressed(STXRefEntryCompressed entry)
throws XRefEntryVisitorException
de.intarsys.pdf.tools.kernel
Class PDFGeometryTools
java.lang.Object
|
+-de.intarsys.pdf.tools.kernel.PDFGeometryTools
Method Summary
static void adjustTransform(java.awt.geom.AffineTransform transform, int rotate,
java.awt.geom.Rectangle2D rect)
Given a transformation in user space, apply the necessary transformation steps to move the
origin of the coordinate system to the lower left corner of rect after rotating it clockwise
by rotate.
Methods
normalizeRotate
public static int normalizeRotate(int rotation)
Parameters:
rotation
Returns:
Normalize the rotation parameter to a positive multiple of 90 between 0 and 270.
adjustTransform
public static void adjustTransform(java.awt.geom.AffineTransform transform,
int rotate,
java.awt.geom.Rectangle2D rect)
Given a transformation in user space, apply the necessary transformation steps to move the origin of the coordinate system
to the lower left corner of rect after rotating it clockwise by rotate.
Parameters:
transform
rotate
rect
de.intarsys.pdf.writer
Class COSWriter
java.lang.Object
|
+-de.intarsys.pdf.writer.COSWriter
All Implemented Interfaces:
ICOSProxyVisitor, ICOSObjectVisitor
Field Summary
public static final ARRAY_CLOSE
Constructor Summary
public COSWriter(IRandomAccess randomAccess, ISystemSecurityHandler
securityHandler)
Method Summary
static void basicWriteFixed(IRandomAccess randomAccess, float value, int precision)
java.util.List getProxies()
The collection of proxies to COSObjects visited by the writer.
IRandomAccess getRandomAccess()
boolean isIncremental()
void seekToEnd()
void write(byte[] b)
This will write some byte to the stream.
void write(int b)
This will write a single byte to the stream.
void writeEOL()
This will write an EOL to the stream.
Fields
ARRAY_CLOSE
public static final byte ARRAY_CLOSE
ARRAY_OPEN
public static final byte ARRAY_OPEN
COMMENT
public static final byte COMMENT
CRLF
public static final byte CRLF
DICT_CLOSE
public static final byte DICT_CLOSE
DICT_OPEN
public static final byte DICT_OPEN
ENDOBJ
public static final byte ENDOBJ
ENDSTREAM
public static final byte ENDSTREAM
EOF
public static final byte EOF
EOL
public static final byte EOL
FALSE
public static final byte FALSE
GARBAGE
public static final byte GARBAGE
LF
public static final byte LF
LITERAL_ESCAPED_BS
public static final byte LITERAL_ESCAPED_BS
LITERAL_ESCAPED_CR
public static final byte LITERAL_ESCAPED_CR
LITERAL_ESCAPED_FF
public static final byte LITERAL_ESCAPED_FF
LITERAL_ESCAPED_HT
public static final byte LITERAL_ESCAPED_HT
LITERAL_ESCAPED_LF
public static final byte LITERAL_ESCAPED_LF
NAME_ESCAPE
public static final byte NAME_ESCAPE
NAME_PREFIX
public static final byte NAME_PREFIX
NULL
public static final byte NULL
OBJ
public static final byte OBJ
PDF_ESCAPE
public static final byte PDF_ESCAPE
REFERENCE
public static final byte REFERENCE
SPACE
public static final byte SPACE
STREAM
public static final byte STREAM
STRING_CLOSE
public static final byte STRING_CLOSE
STRING_HEX_CLOSE
public static final byte STRING_HEX_CLOSE
STRING_HEX_OPEN
public static final byte STRING_HEX_OPEN
STRING_OPEN
public static final byte STRING_OPEN
TRAILER
public static final byte TRAILER
TRUE
public static final byte TRUE
Constructors
COSWriter
public COSWriter(IRandomAccess randomAccess,
ISystemSecurityHandler securityHandler)
Methods
basicWriteFixed
public static void basicWriteFixed(IRandomAccess randomAccess,
float value,
int precision)
throws java.io.IOException
basicWriteInteger
public static void basicWriteInteger(IRandomAccess randomAccess,
int value)
throws java.io.IOException
basicWriteName
public static void basicWriteName(IRandomAccess randomAccess,
byte[] name)
throws java.io.IOException
Parameters:
randomAccess - the randomAccessData to write to
name - the names byte stream
Throws:
IOException
basicWriteStringHex
public static void basicWriteStringHex(IRandomAccess randomAccess,
byte[] string)
throws java.io.IOException
Parameters:
randomAccess - the randomAccessData to write to
string - the string to write
Throws:
IOException
basicWriteStringLiteral
public static void basicWriteStringLiteral(IRandomAccess randomAccess,
byte[] string)
throws java.io.IOException
Parameters:
randomAccess - the randomAccessData to write to
string - the string to write
Throws:
toByteArray
public final static byte[] toByteArray(COSObject object)
Parameters:
object - The object to be serialized.
Returns:
A byte array representation from a COSObject.
getProxies
public java.util.List getProxies()
Returns:
The collection of proxies to COSObjects visited by the writer.
getRandomAccess
public IRandomAccess getRandomAccess()
isIncremental
public boolean isIncremental()
seekToEnd
public void seekToEnd()
throws java.io.IOException
setIncremental
public void setIncremental(boolean incremental)
visitFromArray
public Object visitFromArray(COSArray obj)
throws COSVisitorException
visitFromArray.
Parameters:
obj - The object that is being visited.
Returns:
unused
Throws:
COSVisitorException - If there is an exception while visiting this object.
visitFromBoolean
public Object visitFromBoolean(COSBoolean obj)
throws COSVisitorException
visitFromBoolean.
Parameters:
obj - The object that is being visited.
Returns:
unused
Throws:
COSVisitorException - If there is an exception while visiting this object.
visitFromDictionary
public Object visitFromDictionary(COSDictionary obj)
throws COSVisitorException
visitFromDictionary.
Parameters:
obj - The object that is being visited.
Returns:
unused
Throws:
COSVisitorException - If there is an exception while visiting this object.
visitFromFixed
public Object visitFromFixed(COSFixed obj)
throws COSVisitorException
visitFromFixed.
Parameters:
obj - The object that is being visited.
Returns:
unused
Throws:
COSVisitorException - If there is an exception while visiting this object.
visitFromIndirectObject
public Object visitFromIndirectObject(COSIndirectObject obj)
throws COSVisitorException
Parameters:
obj - The indirect object to write.
Throws:
COSVisitorException - If there is an exception while visiting this object.
visitFromInteger
public Object visitFromInteger(COSInteger obj)
throws COSVisitorException
visitFromInteger.
Parameters:
obj - The object that is being visited.
Returns:
unused
Throws:
COSVisitorException - If there is an exception while visiting this object.
visitFromName
public Object visitFromName(COSName obj)
throws COSVisitorException
visitFromName.
Parameters:
obj - The object that is being visited.
Returns:
unused
Throws:
COSVisitorException - If there is an exception while visiting this object.
visitFromNull
public Object visitFromNull(COSNull obj)
throws COSVisitorException
visitFromNull.
Parameters:
obj - The object that is being visited.
Returns:
unused
Throws:
COSVisitorException - If there is an exception while visiting this object.
visitFromProxy
public Object visitFromProxy(COSObjectProxy obj)
throws COSVisitorException
visitFromStream
public Object visitFromStream(COSStream obj)
throws COSVisitorException
visitFromStream.
Parameters:
obj - The object that is being visited.
Returns:
unused
Throws:
COSVisitorException - If there is an exception while visiting this object.
visitFromString
public Object visitFromString(COSString obj)
throws COSVisitorException
visitFromString.
Parameters:
obj - The object that is being visited.
Returns:
unused
Throws:
COSVisitorException - If there is an exception while visiting this object.
write
public void write(byte[] b)
throws java.io.IOException
Parameters:
b - The source byte array.
Throws:
IOException - If the underlying stream throws an exception.
write
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
Parameters:
b - The source byte array.
off - The offset into the array to start writing.
Throws:
IOException - If the underlying stream throws an exception.
write
public void write(int b)
throws java.io.IOException
Parameters:
b - The byte to write to the stream.
Throws:
IOException - If there is an error writing to the underlying stream.
writeContentStream
public void writeContentStream(CSContent contentStream)
throws java.io.IOException
writeDocument
public void writeDocument(STDocument doc)
throws java.io.IOException
writeEOL
public void writeEOL()
throws java.io.IOException
Throws:
IOException - If there is an error writing to the stream
writeIndirectObject
public void writeIndirectObject(COSIndirectObject object)
throws java.io.IOException
writeObject
public void writeObject(COSObject object)
throws java.io.IOException
Parameters:
object - the object to write
Throws:
IOException - If an error occurs while generating the data.
de.intarsys.tools.attribute
Class Attribute
java.lang.Object
|
+-de.intarsys.tools.attribute.Attribute
ATTENTION: Do NOT override equals as this is intended to be used in secure environments where foreign code should not be
able to gain access to attributes.
Constructor Summary
public Attribute(String name)
Method Summary
String toString()
Constructors
Attribute
public Attribute(String name)
Methods
toString
public String toString()
de.intarsys.tools.attribute
Class AttributeSupport
java.lang.Object
|
+-de.intarsys.tools.attribute.AttributeSupport
All Implemented Interfaces:
IAttributeSupport
Constructor Summary
public AttributeSupport()
Method Summary
Object getAttribute(Object key)
Constructors
AttributeSupport
public AttributeSupport()
Methods
getAttribute
public Object getAttribute(Object key)
removeAttribute
public Object removeAttribute(Object key)
setAttribute
public Object setAttribute(Object key,
Object o)
de.intarsys.tools.attribute
Interface IAttributeSupport
All Known Implementing Classes:
AttributeSupport, PDDocument, COSBasedObject, COSCompositeObject, COSDocument
This means the object implementing this interface may be extended transparently by its clients with name/value pairs. These
attributes and their values are stored but not interpreted by the object that implements this interface.
Method Summary
Object getAttribute(Object key)
get an attribute from the context
Methods
setAttribute
public Object setAttribute(Object key,
Object o)
Parameters:
key - the name of the attribute to set
o - the new value the attribute
Returns:
The previously associated object for key
getAttribute
public Object getAttribute(Object key)
Parameters:
key - the name of the attribute to get
Returns:
The value of the attribute to get
removeAttribute
public Object removeAttribute(Object key)
Parameters:
key - the name of the attribute to remove
Returns:
The previously associated object for key
de.intarsys.tools.authenticate
Interface IPasswordProvider
A simple interface for a password provider. Implementors can provide passwords from any source, for example a database or a
GUI.
Method Summary
char[] getPassword()
Returns a password or null to indicate cancelation.
Methods
getPassword
public char[] getPassword()
Returns:
a char[] containing the password or null
de.intarsys.tools.authenticate
Interface IPasswordValidator
Method Summary
boolean isValid(char[] password)
Check if the password provided by the user is valid.
Methods
isValid
public boolean isValid(char[] password)
throws java.io.IOException
Parameters:
password - The password provided by the user.
Returns:
true if password valid.
de.intarsys.tools.locator
Class ByteArrayLocator
java.lang.Object
|
+-de.intarsys.tools.locator.CommonLocator
|
+-de.intarsys.tools.locator.ByteArrayLocator
All Implemented Interfaces:
ILocator
Constructor Summary
public ByteArrayLocator(byte[] data, String name, String type)
Method Summary
void delete()
boolean exists()
String getFullName()
java.io.InputStream getInputStream()
String getLocalName()
java.io.OutputStream getOutputStream()
ILocator getParent()
IRandomAccess getRandomAccess()
java.io.Reader getReader()
String getType()
String getTypedName()
java.io.Writer getWriter()
boolean isDirectory()
boolean isOutOfSynch()
boolean isSynchSynchronous()
void synch()
java.net.URL toURL()
Constructors
ByteArrayLocator
public ByteArrayLocator(byte[] data,
String name,
String type)
Methods
getInputStream
public java.io.InputStream getInputStream()
getRandomAccess
public IRandomAccess getRandomAccess()
getChild
public ILocator getChild(String name)
isDirectory
public boolean isDirectory()
getFullName
public String getFullName()
getLocalName
public String getLocalName()
getTypedName
public String getTypedName()
getOutputStream
public java.io.OutputStream getOutputStream()
getParent
public ILocator getParent()
getReader
public java.io.Reader getReader()
getReader
public java.io.Reader getReader(String encoding)
throws java.io.IOException
isSynchSynchronous
public boolean isSynchSynchronous()
getType
public String getType()
getWriter
public java.io.Writer getWriter()
getWriter
public java.io.Writer getWriter(String encoding)
throws java.io.IOException
exists
public boolean exists()
listLocators
public ILocator[] listLocators(ILocatorNameFilter filter)
synch
public void synch()
toURL
public java.net.URL toURL()
isOutOfSynch
public boolean isOutOfSynch()
rename
public void rename(String newName)
throws java.io.IOException
delete
public void delete()
throws java.io.IOException
de.intarsys.tools.locator
Class ClassLoaderResourceLocator
java.lang.Object
|
+-de.intarsys.tools.locator.CommonLocator
|
+-de.intarsys.tools.locator.ClassLoaderResourceLocator
All Implemented Interfaces:
ILocator
Constructor Summary
public ClassLoaderResourceLocator(ClassLoader classLoader, String name)
Method Summary
boolean equals(Object obj)
boolean exists()
ClassLoader getClassLoader()
The java.lang.ClassLoader used to access the resource.
String getFullName()
java.io.InputStream getInputStream()
String getLocalName()
String getName()
The resource name defined when constructing this.
java.io.OutputStream getOutputStream()
ILocator getParent()
IRandomAccess getRandomAccess()
java.io.Reader getReader()
String getType()
String getTypedName()
java.io.Writer getWriter()
int hashCode()
boolean isDirectory()
boolean isOutOfSynch()
boolean isReadOnly()
boolean isSynchSynchronous()
void synch()
String toString()
java.net.URL toURL()
Constructors
ClassLoaderResourceLocator
public ClassLoaderResourceLocator(ClassLoader classLoader,
String name)
Methods
getChild
public ILocator getChild(String childName)
isDirectory
public boolean isDirectory()
getFullName
public String getFullName()
getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException
getLocalName
public String getLocalName()
getTypedName
public String getTypedName()
getName
public String getName()
Returns:
The resource name defined when constructing this.
isOutOfSynch
public boolean isOutOfSynch()
getParent
public ILocator getParent()
getReader
public java.io.Reader getReader()
throws java.io.IOException
getReader
public java.io.Reader getReader(String newEncoding)
throws java.io.IOException
isSynchSynchronous
public boolean isSynchSynchronous()
getType
public String getType()
equals
public boolean equals(Object obj)
exists
public boolean exists()
hashCode
public int hashCode()
listLocators
public ILocator[] listLocators(ILocatorNameFilter filter)
throws java.io.IOException
synch
public void synch()
toString
public String toString()
getOutputStream
public java.io.OutputStream getOutputStream()
throws java.io.IOException
getWriter
public java.io.Writer getWriter()
throws java.io.IOException
getWriter
public java.io.Writer getWriter(String pEncoding)
throws java.io.IOException
getClassLoader
public ClassLoader getClassLoader()
Returns:
The java.lang.ClassLoader used to access the resource.
toURL
public java.net.URL toURL()
getRandomAccess
public IRandomAccess getRandomAccess()
throws java.io.IOException
isReadOnly
public boolean isReadOnly()
de.intarsys.tools.locator
Class ClassResourceLocator
java.lang.Object
|
+-de.intarsys.tools.locator.CommonLocator
|
+-de.intarsys.tools.locator.ClassResourceLocator
All Implemented Interfaces:
ILocator
Constructor Summary
public ClassResourceLocator(Class clazz, String name)
Method Summary
boolean equals(Object obj)
boolean exists()
Class getClazz()
The java.lang.Class used to define this.
String getFullName()
java.io.InputStream getInputStream()
String getLocalName()
String getName()
The resource name used when constructing this.
java.io.OutputStream getOutputStream()
ILocator getParent()
IRandomAccess getRandomAccess()
java.io.Reader getReader()
String getType()
String getTypedName()
java.io.Writer getWriter()
int hashCode()
boolean isDirectory()
boolean isOutOfSynch()
boolean isReadOnly()
boolean isSynchSynchronous()
void synch()
String toString()
java.net.URL toURL()
Constructors
ClassResourceLocator
public ClassResourceLocator(Class clazz,
String name)
Methods
getChild
public ILocator getChild(String childName)
getClazz
public Class getClazz()
Returns:
The java.lang.Class used to define this.
isDirectory
public boolean isDirectory()
getFullName
public String getFullName()
getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException
getLocalName
public String getLocalName()
getName
public String getName()
Returns:
The resource name used when constructing this.
isOutOfSynch
public boolean isOutOfSynch()
getParent
public ILocator getParent()
getReader
public java.io.Reader getReader()
throws java.io.IOException
getReader
public java.io.Reader getReader(String newEncoding)
throws java.io.IOException
isSynchSynchronous
public boolean isSynchSynchronous()
getType
public String getType()
getTypedName
public String getTypedName()
equals
public boolean equals(Object obj)
exists
public boolean exists()
hashCode
public int hashCode()
listLocators
public ILocator[] listLocators(ILocatorNameFilter filter)
throws java.io.IOException
synch
public void synch()
toString
public String toString()
getOutputStream
public java.io.OutputStream getOutputStream()
throws java.io.IOException
getWriter
public java.io.Writer getWriter()
throws java.io.IOException
getWriter
public java.io.Writer getWriter(String pEncoding)
throws java.io.IOException
toURL
public java.net.URL toURL()
getRandomAccess
public IRandomAccess getRandomAccess()
throws java.io.IOException
isReadOnly
public boolean isReadOnly()
de.intarsys.tools.locator
Class CommonLocator
java.lang.Object
|
+-de.intarsys.tools.locator.CommonLocator
All Implemented Interfaces:
ILocator
Constructor Summary
public CommonLocator()
Method Summary
void delete()
boolean isReadOnly()
void setReadOnly()
Constructors
CommonLocator
public CommonLocator()
Methods
rename
public void rename(String newName)
throws java.io.IOException
delete
public void delete()
throws java.io.IOException
setReadOnly
public void setReadOnly()
isReadOnly
public boolean isReadOnly()
de.intarsys.tools.locator
Class FileLocator
java.lang.Object
|
+-de.intarsys.tools.locator.CommonLocator
|
+-de.intarsys.tools.locator.FileLocator
All Implemented Interfaces:
ILocator
Constructor Summary
public FileLocator(java.io.File file)
Method Summary
void delete()
boolean exists()
java.io.File getCanonicalFile()
The canonical file represented by this.
java.io.File getFile()
Answer the file represented by this.
String getFullName()
java.io.InputStream getInputStream()
String getLocalName()
java.io.OutputStream getOutputStream()
ILocator getParent()
IRandomAccess getRandomAccess()
java.io.Reader getReader()
String getType()
String getTypedName()
java.io.Writer getWriter()
int hashCode()
boolean isDirectory()
boolean isOutOfSynch()
boolean isReadOnly()
boolean isSynchSynchronous()
boolean isUseTempFile()
true if temp file should be used.
void synch()
String toString()
java.net.URL toURL()
Constructors
FileLocator
public FileLocator(java.io.File file)
FileLocator
public FileLocator(String path)
Methods
equals
public boolean equals(Object obj)
exists
public boolean exists()
getCanonicalFile
public java.io.File getCanonicalFile()
Returns:
The canonical file represented by this.
getChild
public ILocator getChild(String name)
getFile
public java.io.File getFile()
Returns:
The canonical file represented by this.
getFullName
public String getFullName()
getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException
getLocalName
public String getLocalName()
getOutputStream
public java.io.OutputStream getOutputStream()
throws java.io.IOException
getParent
public ILocator getParent()
getRandomAccess
public IRandomAccess getRandomAccess()
throws java.io.IOException
getReader
public java.io.Reader getReader()
throws java.io.IOException
getReader
public java.io.Reader getReader(String newEncoding)
throws java.io.IOException
getType
public String getType()
getTypedName
public String getTypedName()
getWriter
public java.io.Writer getWriter()
throws java.io.IOException
getWriter
public java.io.Writer getWriter(String newEncoding)
throws java.io.IOException
hashCode
public int hashCode()
isDirectory
public boolean isDirectory()
isOutOfSynch
public boolean isOutOfSynch()
isSynchSynchronous
public boolean isSynchSynchronous()
isUseTempFile
public boolean isUseTempFile()
Returns:
true if temp file should be used.
listLocators
public ILocator[] listLocators(ILocatorNameFilter filter)
throws java.io.IOException
setSynchSynchronous
public void setSynchSynchronous(boolean synchSynchronous)
Parameters:
synchSynchronous
setUseTempFile
public void setUseTempFile(boolean useTempFile)
Parameters:
useTempFile
synch
public void synch()
toString
public String toString()
toURL
public java.net.URL toURL()
isReadOnly
public boolean isReadOnly()
rename
public void rename(String newName)
throws java.io.IOException
delete
public void delete()
throws java.io.IOException
de.intarsys.tools.locator
Class FileLocatorFactory
java.lang.Object
|
+-de.intarsys.tools.locator.FileLocatorFactory
All Implemented Interfaces:
ILocatorFactory
FileLocator instances are created either using an absolute path name or are looked up relative to the factorys search path.
Multiple search paths may be defined.
Field Summary
public static final PATH_SEPARATOR
The separator character for the definition of multiple search paths
Value: ;
Constructor Summary
public FileLocatorFactory()
Create a new factory.
Method Summary
ILocator createLocator(String path)
The file locator factory supports looking up resources in multiple paths.
String getSearchPathDefinition()
java.util.List getSearchPaths()
boolean isSynchSynchronous()
Fields
PATH_SEPARATOR
public static final java.lang.String PATH_SEPARATOR
Constructors
FileLocatorFactory
public FileLocatorFactory()
Methods
setSearchPathDefinition
public void setSearchPathDefinition(String searchPath)
getSearchPathDefinition
public String getSearchPathDefinition()
setSearchPaths
public void setSearchPaths(java.util.List searchPaths)
getSearchPaths
public java.util.List getSearchPaths()
setSynchSynchronous
public void setSynchSynchronous(boolean synchSynchronous)
isSynchSynchronous
public boolean isSynchSynchronous()
createLocator
public ILocator createLocator(String path)
The file locator factory supports looking up resources in multiple paths. To preserve compatibility to ILocatorFactory, the
last locator created is returned if no match is found. This is a valid locator, even so no existing physical resource is
designated.
See Also:
ILocatorFactory.createLocator(String)
de.intarsys.tools.locator
Interface ILocator
All Known Implementing Classes:
CommonLocator, ReadOnlyLocator
Method Summary
void delete()
Delete the artifact referenced by this.
boolean exists()
Answer true if the location designated by this exists.
String getFullName()
The full physical name of this.
java.io.InputStream getInputStream()
Return an java.io.InputStream on the data represented by the receiver.
String getLocalName()
The local name of the receiver within its parent.
java.io.OutputStream getOutputStream()
Return an java.io.OutputStream on the location represented by the receiver.
ILocator getParent()
The ILocator that is one hierarchy level up or null.
IRandomAccess getRandomAccess()
The IRandomAccess for this.
java.io.Reader getReader()
A java.io.Reader on the data represented by the receiver.
String getType()
The type of the resource.
String getTypedName()
The qualified local name of the receiver within its parent that includes the type specification
for the destination if appropriate.
java.io.Writer getWriter()
A java.io.Writer on the location represented by the receiver.
boolean isDirectory()
Answer true if the location designated by this is a directory.
boolean isReadOnly()
true if the specified resource is read only.
void setReadOnly()
Make the receiver read only.
java.net.URL toURL()
The location designated by this as an java.net.URL.
Methods
getChild
public ILocator getChild(String name)
The locator for the resource name within the context of this. This may for example be an ILocator to a file within a
directory.
Parameters:
name - The name of the resource to be located.
Returns:
The ILocator for the resource with the name "name" within the context of this.
isDirectory
public boolean isDirectory()
Answer true if the location designated by this is a directory. A directory location serves as a container for other resources,
you can never getInputStream on this.
Returns:
Answer true if the location designated by this is a directory.
getFullName
public String getFullName()
This method returns a representation that is proprietary to the underlying physical representation, for example a file name,
a SQL statement or so on.
Returns:
The full physical name of the receiver.
getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException
Returns:
An java.io.InputStream on the data represented by the receiver.
Throws:
IOException
getLocalName
public String getLocalName()
Returns:
The local name of the receiver within its parent.
getTypedName
public String getTypedName()
The qualified local name of the receiver within its parent that includes the type specification for the destination if
appropriate. This is for example a filename with its correct suffix. Some locator may return the same name as
"getLocalName".
Returns:
The qualified local name of the receiver within its parent that includes the type specification for the destination if
appropriate.
getOutputStream
public java.io.OutputStream getOutputStream()
throws java.io.IOException
Returns:
An java.io.OutputStream on the location represented by the receiver.
Throws:
IOException
getParent
public ILocator getParent()
The ILocator that is one hierarchy level up or null. This may be for example the directory where the currently designated
resource is found.
Returns:
The ILocatorthat is one hierarchy level up or null.
getRandomAccess
public IRandomAccess getRandomAccess()
throws java.io.IOException
Returns:
The IRandomAccess for this.
Throws:
IOException
getReader
public java.io.Reader getReader()
throws java.io.IOException
Returns:
A java.io.Reader on the data represented by the receiver.
Throws:
IOException
getReader
public java.io.Reader getReader(String encoding)
throws java.io.IOException
A java.io.Reader on the data represented by the receiver for the given encoding.
Parameters:
encoding - The encoding.
Returns:
A java.io.Reader on the data represented by the receiver for the given encoding.
Throws:
IOException
getType
public String getType()
The type of the resource. This may be for example a mime type or the file extension of the underlying file.
Returns:
The type of the resource
getWriter
public java.io.Writer getWriter()
throws java.io.IOException
Returns:
Throws:
IOException
getWriter
public java.io.Writer getWriter(String encoding)
throws java.io.IOException
A java.io.Writer on the location represented by the receiver for the given encoding.
Parameters:
encoding - The encoding.
Returns:
A java.io.Writer on the location represented by the receiver for the given encoding.
Throws:
IOException
exists
public boolean exists()
Returns:
Answer true if the location designated by this exists.
listLocators
public ILocator[] listLocators(ILocatorNameFilter filter)
throws java.io.IOException
Return an array of ILocator that are children of the receiver that conform to filter. This method never returns null.
Parameters:
filter - The filter used to examine the child resources.
Returns:
An array of ILocator objects that conform to the filter argument.
Throws:
IOException
toURL
public java.net.URL toURL()
Returns:
The location designated by this as an java.net.URL.
isReadOnly
public boolean isReadOnly()
Returns:
true if the specified resource is read only.
rename
public void rename(String newName)
throws java.io.IOException
Parameters:
newName - The new name of the ILocator. The new name is expected to contain both local and type part of the
name.
Throws:
IOException
delete
public void delete()
throws java.io.IOException
Throws:
IOException
setReadOnly
public void setReadOnly()
Make the receiver read only. This is a one way switch only.
de.intarsys.tools.locator
Interface ILocatorFactory
All Known Implementing Classes:
FileLocatorFactory
Method Summary
ILocator createLocator(String location)
Create a ILocator object.
Methods
createLocator
public ILocator createLocator(String location)
Parameters:
location - The fully qualified location definition.
Returns:
The ILocator object created from the location.
de.intarsys.tools.locator
Interface ILocatorNameFilter
ILocatorNameFilter objects can filter ILocator objects when listing their children.
Method Summary
boolean accept(ILocator parent, String name)
This method returns true if the ILocator with name name within parent should be
included in the result list.
Methods
accept
public boolean accept(ILocator parent,
String name)
This method returns true if the ILocator with name name within parent should be included in the result list.
Parameters:
parent - The parent locator.
name - The name of the locator within the parent.
Returns:
true if locator should be included in the result list.
de.intarsys.tools.locator
Interface ILocatorSupport
All Known Implementing Classes:
STDocument, PDDocument, COSDocument
Method Summary
ILocator getLocator()
Return the ILocator that defines the physical resource location for the reciver.
Methods
getLocator
public ILocator getLocator()
Return the ILocator that defines the physical resource location for the reciver.
Returns:
Return the ILocator that defines the physical resource location for the reciver.
de.intarsys.tools.locator
Class LocatorFactory
java.lang.Object
|
+-de.intarsys.tools.locator.LocatorFactory
Constructor Summary
public LocatorFactory()
Method Summary
static get()
ILocatorFactory
Constructors
LocatorFactory
public LocatorFactory()
Methods
get
public static ILocatorFactory get()
set
public static void set(ILocatorFactory factory)
de.intarsys.tools.locator
Class LocatorViewport
java.lang.Object
|
+-de.intarsys.tools.locator.CommonLocator
|
+-de.intarsys.tools.locator.LocatorViewport
All Implemented Interfaces:
ILocator
A viewport implementation for ILocator. This object defines a range of bytes visible to the client of the viewport.
Constructor Summary
public LocatorViewport(ILocator delegate)
Method Summary
void delete()
boolean exists()
ILocator getDelegate()
long getEnd()
String getFullName()
java.io.InputStream getInputStream()
String getLocalName()
String getName()
java.io.OutputStream getOutputStream()
ILocator getParent()
IRandomAccess getRandomAccess()
java.io.Reader getReader()
long getStart()
String getType()
String getTypedName()
java.io.Writer getWriter()
boolean isDirectory()
boolean isOutOfSynch()
boolean isReadOnly()
boolean isSynchSynchronous()
void synch()
java.net.URL toURL()
Constructors
LocatorViewport
public LocatorViewport(ILocator delegate)
Methods
exists
public boolean exists()
getChild
public ILocator getChild(String name)
getFullName
public String getFullName()
getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException
getLocalName
public String getLocalName()
getOutputStream
public java.io.OutputStream getOutputStream()
throws java.io.IOException
getParent
public ILocator getParent()
getRandomAccess
public IRandomAccess getRandomAccess()
throws java.io.IOException
getReader
public java.io.Reader getReader()
throws java.io.IOException
getReader
public java.io.Reader getReader(String encoding)
throws java.io.IOException
getType
public String getType()
getTypedName
public String getTypedName()
getWriter
public java.io.Writer getWriter()
throws java.io.IOException
getWriter
public java.io.Writer getWriter(String encoding)
throws java.io.IOException
isDirectory
public boolean isDirectory()
listLocators
public ILocator[] listLocators(ILocatorNameFilter filter)
throws java.io.IOException
toURL
public java.net.URL toURL()
isOutOfSynch
public boolean isOutOfSynch()
isSynchSynchronous
public boolean isSynchSynchronous()
synch
public void synch()
getDelegate
public ILocator getDelegate()
Returns:
getEnd
public long getEnd()
setEnd
public void setEnd(long end)
getStart
public long getStart()
setStart
public void setStart(long start)
getName
public String getName()
setName
public void setName(String name)
isReadOnly
public boolean isReadOnly()
rename
public void rename(String newName)
throws java.io.IOException
delete
public void delete()
throws java.io.IOException
de.intarsys.tools.locator
Class ReadOnlyLocator
java.lang.Object
|
+-de.intarsys.tools.locator.ReadOnlyLocator
All Implemented Interfaces:
ILocator
Constructor Summary
public ReadOnlyLocator(ILocator delegate)
Method Summary
void delete()
boolean exists()
ILocator getDelegate()
String getFullName()
java.io.InputStream getInputStream()
String getLocalName()
java.io.OutputStream getOutputStream()
ILocator getParent()
IRandomAccess getRandomAccess()
java.io.Reader getReader()
String getType()
String getTypedName()
java.io.Writer getWriter()
boolean isDirectory()
boolean isOutOfSynch()
boolean isReadOnly()
boolean isSynchSynchronous()
void setReadOnly()
void synch()
java.net.URL toURL()
Constructors
ReadOnlyLocator
public ReadOnlyLocator(ILocator delegate)
Methods
getLocalName
public String getLocalName()
getDelegate
public ILocator getDelegate()
exists
public boolean exists()
getChild
public ILocator getChild(String name)
getFullName
public String getFullName()
getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException
getOutputStream
public java.io.OutputStream getOutputStream()
throws java.io.IOException
getParent
public ILocator getParent()
getRandomAccess
public IRandomAccess getRandomAccess()
throws java.io.IOException
getReader
public java.io.Reader getReader()
throws java.io.IOException
getReader
public java.io.Reader getReader(String encoding)
throws java.io.IOException
getType
public String getType()
getTypedName
public String getTypedName()
getWriter
public java.io.Writer getWriter()
throws java.io.IOException
getWriter
public java.io.Writer getWriter(String encoding)
throws java.io.IOException
isDirectory
public boolean isDirectory()
isOutOfSynch
public boolean isOutOfSynch()
isSynchSynchronous
public boolean isSynchSynchronous()
listLocators
public ILocator[] listLocators(ILocatorNameFilter filter)
throws java.io.IOException
synch
public void synch()
toURL
public java.net.URL toURL()
delete
public void delete()
throws java.io.IOException
isReadOnly
public boolean isReadOnly()
rename
public void rename(String newName)
throws java.io.IOException
setReadOnly
public void setReadOnly()
de.intarsys.tools.locator
Class StreamLocator
java.lang.Object
|
+-de.intarsys.tools.locator.CommonLocator
|
+-de.intarsys.tools.locator.StreamLocator
All Implemented Interfaces:
ILocator
Constructor Summary
public StreamLocator(java.io.InputStream stream, String name, String type)
Method Summary
void delete()
boolean exists()
String getFullName()
java.io.InputStream getInputStream()
String getLocalName()
java.io.OutputStream getOutputStream()
ILocator getParent()
IRandomAccess getRandomAccess()
java.io.Reader getReader()
String getType()
String getTypedName()
java.io.Writer getWriter()
boolean isDirectory()
boolean isOutOfSynch()
boolean isReadOnly()
boolean isSynchSynchronous()
void synch()
java.net.URL toURL()
Constructors
StreamLocator
public StreamLocator(java.io.InputStream stream,
String name,
String type)
StreamLocator
public StreamLocator(java.io.OutputStream stream,
String name,
String type)
StreamLocator
public StreamLocator(java.io.InputStream is,
java.io.OutputStream os,
String name,
String type)
Methods
getChild
public ILocator getChild(String child)
isDirectory
public boolean isDirectory()
getFullName
public String getFullName()
getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException
getLocalName
public String getLocalName()
getTypedName
public String getTypedName()
isOutOfSynch
public boolean isOutOfSynch()
getOutputStream
public java.io.OutputStream getOutputStream()
getParent
public ILocator getParent()
getReader
public java.io.Reader getReader()
throws java.io.IOException
getReader
public java.io.Reader getReader(String encoding)
throws java.io.IOException
isSynchSynchronous
public boolean isSynchSynchronous()
getType
public String getType()
getWriter
public java.io.Writer getWriter()
getWriter
public java.io.Writer getWriter(String encoding)
throws java.io.IOException
exists
public boolean exists()
listLocators
public ILocator[] listLocators(ILocatorNameFilter filter)
synch
public void synch()
toURL
public java.net.URL toURL()
getRandomAccess
public IRandomAccess getRandomAccess()
throws java.io.IOException
isReadOnly
public boolean isReadOnly()
rename
public void rename(String newName)
throws java.io.IOException
delete
public void delete()
throws java.io.IOException
de.intarsys.tools.locator
Class StringLocator
java.lang.Object
|
+-de.intarsys.tools.locator.CommonLocator
|
+-de.intarsys.tools.locator.StringLocator
All Implemented Interfaces:
ILocator
Constructor Summary
public StringLocator(String content, String name, String type)
Method Summary
void delete()
boolean exists()
String getFullName()
java.io.InputStream getInputStream()
String getLocalName()
java.io.OutputStream getOutputStream()
ILocator getParent()
IRandomAccess getRandomAccess()
java.io.Reader getReader()
String getType()
String getTypedName()
java.io.Writer getWriter()
boolean isDirectory()
boolean isOutOfSynch()
boolean isReadOnly()
boolean isSynchSynchronous()
void synch()
java.net.URL toURL()
Constructors
StringLocator
public StringLocator(String content,
String name,
String type)
Methods
getFullName
public String getFullName()
getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException
getLocalName
public String getLocalName()
getTypedName
public String getTypedName()
getReader
public java.io.Reader getReader()
throws java.io.IOException
getReader
public java.io.Reader getReader(String encoding)
throws java.io.IOException
getType
public String getType()
listLocators
public ILocator[] listLocators(ILocatorNameFilter filter)
throws java.io.IOException
isDirectory
public boolean isDirectory()
exists
public boolean exists()
getParent
public ILocator getParent()
getChild
public ILocator getChild(String child)
isOutOfSynch
public boolean isOutOfSynch()
isSynchSynchronous
public boolean isSynchSynchronous()
synch
public void synch()
getOutputStream
public java.io.OutputStream getOutputStream()
throws java.io.IOException
getWriter
public java.io.Writer getWriter()
throws java.io.IOException
getWriter
public java.io.Writer getWriter(String encoding)
throws java.io.IOException
toURL
public java.net.URL toURL()
getRandomAccess
public IRandomAccess getRandomAccess()
throws java.io.IOException
isReadOnly
public boolean isReadOnly()
rename
public void rename(String newName)
throws java.io.IOException
delete
public void delete()
throws java.io.IOException
de.intarsys.tools.locator
Class TransientLocator
java.lang.Object
|
+-de.intarsys.tools.locator.CommonLocator
|
+-de.intarsys.tools.locator.TransientLocator
All Implemented Interfaces:
ILocator
A "non persistent" locator. This is used as a placeholder where an ILocator is necessary but no real location is yet defined.
Constructor Summary
public TransientLocator(String name, String type)
Method Summary
void delete()
boolean exists()
String getFullName()
java.io.InputStream getInputStream()
String getLocalName()
java.io.OutputStream getOutputStream()
ILocator getParent()
IRandomAccess getRandomAccess()
java.io.Reader getReader()
String getType()
String getTypedName()
java.io.Writer getWriter()
int hashCode()
boolean isAlwaysUnchanged()
boolean isDirectory()
boolean isOutOfSynch()
boolean isReadOnly()
boolean isSynchSynchronous()
void synch()
java.net.URL toURL()
Constructors
TransientLocator
public TransientLocator(String name,
String type)
Methods
equals
public boolean equals(Object obj)
exists
public boolean exists()
getChild
public ILocator getChild(String name)
getFullName
public String getFullName()
getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException
getLocalName
public String getLocalName()
getOutputStream
public java.io.OutputStream getOutputStream()
throws java.io.IOException
getParent
public ILocator getParent()
getRandomAccess
public IRandomAccess getRandomAccess()
throws java.io.IOException
getReader
public java.io.Reader getReader()
throws java.io.IOException
getReader
public java.io.Reader getReader(String encoding)
throws java.io.IOException
getType
public String getType()
getTypedName
public String getTypedName()
getWriter
public java.io.Writer getWriter()
throws java.io.IOException
getWriter
public java.io.Writer getWriter(String encoding)
throws java.io.IOException
hashCode
public int hashCode()
isAlwaysUnchanged
public boolean isAlwaysUnchanged()
isDirectory
public boolean isDirectory()
isOutOfSynch
public boolean isOutOfSynch()
isReadOnly
public boolean isReadOnly()
isSynchSynchronous
public boolean isSynchSynchronous()
listLocators
public ILocator[] listLocators(ILocatorNameFilter filter)
throws java.io.IOException
rename
public void rename(String newName)
throws java.io.IOException
setAlwaysUnchanged
public void setAlwaysUnchanged(boolean paramAlwaysUnchanged)
setLocalName
public void setLocalName(String name)
synch
public void synch()
toURL
public java.net.URL toURL()
delete
public void delete()
throws java.io.IOException
de.intarsys.tools.randomaccess
Class AbstractRandomAccess
java.lang.Object
|
+-de.intarsys.tools.randomaccess.AbstractRandomAccess
All Implemented Interfaces:
IRandomAccess
Supports reading and writing to a random access data container. A random access data container behaves like a large array of
bytes.
Constructor Summary
public AbstractRandomAccess()
Method Summary
java.io.InputStream asInputStream()
java.io.OutputStream asOutputStream()
void mark()
void reset()
Constructors
AbstractRandomAccess
public AbstractRandomAccess()
Methods
asInputStream
public java.io.InputStream asInputStream()
asOutputStream
public java.io.OutputStream asOutputStream()
mark
public void mark()
throws java.io.IOException
reset
public void reset()
throws java.io.IOException
de.intarsys.tools.randomaccess
Class BufferedRandomAccess
java.lang.Object
|
+-de.intarsys.tools.randomaccess.AbstractRandomAccess
|
+-de.intarsys.tools.randomaccess.BufferedRandomAccess
All Implemented Interfaces:
IRandomAccess
Constructor Summary
public BufferedRandomAccess(IRandomAccess randomAccess)
Method Summary
void close()
void flush()
long getLength()
long getOffset()
boolean isReadOnly()
int read()
void write(int b)
Constructors
BufferedRandomAccess
public BufferedRandomAccess(IRandomAccess randomAccess)
BufferedRandomAccess
public BufferedRandomAccess(IRandomAccess randomAccess,
int bufferSize)
Methods
close
public void close()
throws java.io.IOException
flush
public void flush()
throws java.io.IOException
getLength
public long getLength()
throws java.io.IOException
getOffset
public long getOffset()
throws java.io.IOException
isReadOnly
public boolean isReadOnly()
read
public int read()
throws java.io.IOException
read
public int read(byte[] buffer)
throws java.io.IOException
read
public int read(byte[] buffer,
int start,
int numBytes)
throws java.io.IOException
seek
public void seek(long offset)
throws java.io.IOException
seekBy
public void seekBy(long delta)
throws java.io.IOException
setLength
public void setLength(long newLength)
throws java.io.IOException
write
public void write(byte[] buffer)
throws java.io.IOException
write
public void write(byte[] buffer,
int start,
int numBytes)
throws java.io.IOException
write
public void write(int b)
throws java.io.IOException
de.intarsys.tools.randomaccess
Interface IRandomAccess
All Known Implementing Classes:
AbstractRandomAccess
An interface for an object that can randomly access bytes in a data stream.
This is an abstraction of RandomAccessFile to support other data storage objects (like byte arrays and so on).
Method Summary
java.io.InputStream asInputStream()
A java.io.InputStream view on the data structure.
java.io.OutputStream asOutputStream()
A java.io.OutputStream view on the data structure.
void close()
Closes this random access data container and releases any system resources associated with
the stream.
void flush()
Force changes to be made persistent.
long getLength()
Returns the length of this data container.
long getOffset()
Returns the current offset in this data container.
boolean isReadOnly()
true if this is a read only data container.
void mark()
Mark the current offset into the data in a stack like manner.
int read()
Reads a byte of data from this data container.
void reset()
Reset to the last position on the mark-stack.
void write(int b)
Writes the specified byte .
Methods
seek
public void seek(long offset)
throws java.io.IOException
Sets the offset, measured from the beginning of the data container at which the next read or write occurs. The offset may be
set beyond the end of the data container. Setting the offset beyond the end of the data container does not change the data
container length. The length will change only by writing after the offset has been set beyond the end of the data container.
Parameters:
offset - the offset position, measured in bytes from the beginning of the data container
Throws:
IOException - if offset is less than 0 or if an I/O error occurs.
seekBy
public void seekBy(long delta)
throws java.io.IOException
Sets the offset, measured from the current offset at which the next read or write occurs. The offset may be set beyond the
end of the data container. Setting the offset beyond the end of the data container does not change the data container length.
The length will change only by writing after the offset has been set beyond the end of the data container.
Parameters:
delta - the ammount of bytes by wich to change the current offset position
Throws:
IOException - if the resulting offset is less than 0 or if an I/O error occurs.
read
public int read()
throws java.io.IOException
Reads a byte of data from this data container. The byte is returned as an integer in the range 0 to 255 (0x00-0x0ff). This
method blocks if no input is yet available.
This method behaves in exactly the same way as the InputStream.read() method of InputStream.
Returns:
the next byte of data, or -1 if the end of the data container has been reached.
Throws:
IOException - if an I/O error occurs. Not thrown if the end of the data container has been reached.
getOffset
public long getOffset()
throws java.io.IOException
Returns:
the offset from the beginning of the data container, in bytes, at which the next read or write occurs.
Throws:
IOException - if an I/O error occurs.
getLength
public long getLength()
throws java.io.IOException
Returns:
the length of this data container, measured in bytes.
Throws:
IOException - if an I/O error occurs.
setLength
public void setLength(long newLength)
throws java.io.IOException
Assign the length. All bytes after length are truncated. If the real length is currently less than newLength, the data structure
will be enlarged.
Parameters:
newLength
Throws:
IOException
read
public int read(byte[] buffer)
throws java.io.IOException
Reads up to buffer.length bytes of data from this data container into an array of bytes. This method blocks until at least
one byte of input is available.
This method behaves in the exactly the same way as the InputStream.read(byte[]) method of InputStream.
Parameters:
buffer - the buffer into which the data is read.
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of this data container has
been reached.
Throws:
IOException - if an I/O error occurs.
read
public int read(byte[] buffer,
int start,
int numBytes)
throws java.io.IOException
Reads up to len bytes of data from this data container into an array of bytes. This method blocks until at least one byte of
input is available.
Parameters:
b - the buffer into which the data is read.
off - the start offset of the data.
len - the maximum number of bytes read.
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the file has been
reached.
Throws:
IOException - if an I/O error occurs.
close
public void close()
throws java.io.IOException
Closes this random access data container and releases any system resources associated with the stream. A closed random
access data container cannot perform input or output operations and cannot be reopened.
flush
public void flush()
throws java.io.IOException
Throws:
IOException
isReadOnly
public boolean isReadOnly()
Returns:
true if this is a read only data container.
write
public void write(int b)
throws java.io.IOException
Writes the specified byte . The write starts at the current offset.
Parameters:
b - the byte to be written.
Throws:
IOException - if an I/O error occurs.
write
public void write(byte[] buffer)
throws java.io.IOException
Writes b.length bytes from the specified byte array, starting at the current offset.
Parameters:
b - the data.
Throws:
IOException - if an I/O error occurs.
write
public void write(byte[] buffer,
int start,
int numBytes)
throws java.io.IOException
Writes len bytes from the specified byte array starting at start.
Parameters:
buffer - the data.
start - the start offset in the data.
numBytes - the number of bytes to write.
Throws:
IOException - if an I/O error occurs.
asInputStream
public java.io.InputStream asInputStream()
Returns:
A java.io.InputStream view on the data structure.
asOutputStream
public java.io.OutputStream asOutputStream()
Returns:
mark
public void mark()
throws java.io.IOException
Mark the current offset into the data in a stack like manner.
reset
public void reset()
throws java.io.IOException
de.intarsys.tools.randomaccess
Class PACKAGE
java.lang.Object
|
+-de.intarsys.tools.randomaccess.PACKAGE
Field Summary
public static final Log
Constructor Summary
public PACKAGE()
Fields
Log
public static final java.util.logging.Logger Log
Constructors
PACKAGE
public PACKAGE()
de.intarsys.tools.randomaccess
Class RandomAccessByteArray
java.lang.Object
|
+-de.intarsys.tools.randomaccess.AbstractRandomAccess
|
+-de.intarsys.tools.randomaccess.RandomAccessByteArray
All Implemented Interfaces:
IRandomAccess
Constructor Summary
public RandomAccessByteArray(byte[] buffer)
Method Summary
void close()
void flush()
long getLength()
long getOffset()
boolean isReadOnly()
int read()
byte[] toByteArray()
void write(int b)
Constructors
RandomAccessByteArray
public RandomAccessByteArray(byte[] buffer)
Methods
seek
public void seek(long pOffset)
throws java.io.IOException
seekBy
public void seekBy(long delta)
throws java.io.IOException
read
public int read()
getOffset
public long getOffset()
getLength
public long getLength()
throws java.io.IOException
read
public int read(byte[] buffer)
read
public int read(byte[] buffer,
int bufferOffset,
int numBytes)
close
public void close()
throws java.io.IOException
flush
public void flush()
throws java.io.IOException
isReadOnly
public boolean isReadOnly()
setLength
public void setLength(long newLength)
write
public void write(int b)
write
public void write(byte[] buffer)
write
public void write(byte[] buffer,
int start,
int numBytes)
toByteArray
public byte[] toByteArray()
de.intarsys.tools.randomaccess
Class RandomAccessFile
java.lang.Object
|
+-de.intarsys.tools.randomaccess.AbstractRandomAccess
|
+-de.intarsys.tools.randomaccess.RandomAccessFile
All Implemented Interfaces:
IRandomAccess
Constructor Summary
public RandomAccessFile(java.io.File file)
Method Summary
void close()
void flush()
long getLength()
long getOffset()
boolean isReadOnly()
int read()
void write(int b)
Constructors
RandomAccessFile
public RandomAccessFile(java.io.File file)
Parameters:
file - to open for random access
Throws:
FileNotFoundException - if file was not found or the file is locked by a different process
RandomAccessFile
public RandomAccessFile(java.io.File file,
boolean create)
Parameters:
file - to open for random access
Throws:
FileNotFoundException - if file was not found or the file is locked by a different process
Methods
seek
public void seek(long offset)
throws java.io.IOException
seekBy
public void seekBy(long delta)
throws java.io.IOException
read
public int read()
throws java.io.IOException
getOffset
public long getOffset()
throws java.io.IOException
getLength
public long getLength()
throws java.io.IOException
read
public int read(byte[] buffer)
throws java.io.IOException
read
public int read(byte[] buffer,
int start,
int numBytes)
throws java.io.IOException
close
public void close()
throws java.io.IOException
flush
public void flush()
throws java.io.IOException
isReadOnly
public boolean isReadOnly()
write
public void write(int b)
throws java.io.IOException
write
public void write(byte[] buffer)
throws java.io.IOException
write
public void write(byte[] buffer,
int start,
int numBytes)
throws java.io.IOException
setLength
public void setLength(long newLength)
throws java.io.IOException
de.intarsys.tools.randomaccess
Class RandomAccessFilter
java.lang.Object
|
+-de.intarsys.tools.randomaccess.AbstractRandomAccess
|
+-de.intarsys.tools.randomaccess.RandomAccessFilter
All Implemented Interfaces:
IRandomAccess
Constructor Summary
public RandomAccessFilter(IRandomAccess random)
Method Summary
void close()
void flush()
long getLength()
long getOffset()
boolean isReadOnly()
int read()
void write(int b)
Constructors
RandomAccessFilter
public RandomAccessFilter(IRandomAccess random)
Methods
seek
public void seek(long offset)
throws java.io.IOException
seekBy
public void seekBy(long delta)
throws java.io.IOException
read
public int read()
throws java.io.IOException
getOffset
public long getOffset()
throws java.io.IOException
getLength
public long getLength()
throws java.io.IOException
setLength
public void setLength(long newLength)
throws java.io.IOException
read
public int read(byte[] buffer)
throws java.io.IOException
read
public int read(byte[] buffer,
int start,
int numBytes)
throws java.io.IOException
close
public void close()
throws java.io.IOException
flush
public void flush()
throws java.io.IOException
isReadOnly
public boolean isReadOnly()
write
public void write(int b)
throws java.io.IOException
write
public void write(byte[] buffer)
throws java.io.IOException
write
public void write(byte[] buffer,
int start,
int numBytes)
throws java.io.IOException
de.intarsys.tools.randomaccess
Class RandomAccessViewport
java.lang.Object
|
+-de.intarsys.tools.randomaccess.AbstractRandomAccess
|
+-de.intarsys.tools.randomaccess.RandomAccessFilter
|
+-de.intarsys.tools.randomaccess.RandomAccessViewport
All Implemented Interfaces:
IRandomAccess
Constructor Summary
public RandomAccessViewport(IRandomAccess ra, long offset, long length)
Create a viewport to the existing IRandomAccess ra.
Method Summary
long getLength()
long getOffset()
boolean isReadOnly()
int read()
void write(int b)
Constructors
RandomAccessViewport
public RandomAccessViewport(IRandomAccess ra,
long offset,
long length)
ATTENTION: This will not seek to offset in ra. This means after creation before initial use you have to position the
IRandomAccess yourself using seek.
Parameters:
ra
offset
length
Throws:
IOException
Methods
getLength
public long getLength()
throws java.io.IOException
getOffset
public long getOffset()
throws java.io.IOException
isReadOnly
public boolean isReadOnly()
read
public int read()
throws java.io.IOException
read
public int read(byte[] buffer,
int start,
int numBytes)
throws java.io.IOException
read
public int read(byte[] buffer)
throws java.io.IOException
seek
public void seek(long offset)
throws java.io.IOException
seekBy
public void seekBy(long delta)
throws java.io.IOException
setLength
public void setLength(long newLength)
throws java.io.IOException
write
public void write(byte[] buffer,
int start,
int numBytes)
throws java.io.IOException
write
public void write(byte[] buffer)
throws java.io.IOException
write
public void write(int b)
throws java.io.IOException
Appendix A: Examples
Examples
Overview
There are some examples in the "examples" directory along with the distribution. We hope some day we will find the chance to
give you an intro here.
Appendix B: License
License
/*
* Copyright (c) 2007, intarsys consulting GmbH
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of intarsys nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
CN_trigger_PV 874 copy 84, 99, 163, 196, 212, 813, 905, 1347, 1350, 1353, 1355
CN_trigger_U 874 COPY_SUFFIX 1123
CN_trigger_V 875 copyDecodeFirst 340
CN_trigger_WC 875 copyDeep 233, 256, 262, 272, 313, 322, 331, 340, 1008, 1332
CN_trigger_WP 875 copyOptional 314
CN_trigger_WS 875 copyShallow 231, 262, 314, 322, 341
CN_trigger_X 873 copySubGraph 314
CN_Type_Action 833 cosAddContents 1125
CN_Type_Alt_Filespec 1039 cosAddField 525
CN_Type_Annot 904 cosAddKid 531
CN_Type_Border 944 cosAddResource 1164
CN_Type_Catalog 250 cosCreateResource 1164
CN_Type_EmbeddedFile 1018 COSDocumentFactory 281
CN_Type_ExtGState 1031 COSDocumentParser 745
CN_Type_Filespec 1039 cosExtractJPEGStream 1074
CN_Type_Font 663 cosGetActionType 833
CN_Type_FontDescriptor 675 cosGetArray 237
CN_Type_ObjStm 1320 cosGetByteRange 1186
CN_Type_Outlines 1104 cosGetCharProcs 723
CN_Type_Page 1133 cosGetCIDToGIDMap 608
CN_Type_Pattern 1145 cosGetColor 1110
CN_Type_Sig 1184 cosGetColorSpace 1074
CN_Type_SigRef 1192 cosGetContents 1125
CN_Type_TransformParams 1221 cosGetData 937
CN_Type_XObject 1231 cosGetDecode 1171
CN_Type_XRef 1341 cosGetDefaultValue 813
CN_V2 440 cosGetDests 250
CN_Version_1_4 250 cosGetDict 237, 1019, 1155, 1171, 1231, 1341, 1344, 1358
CN_WinAnsiEncoding 462 cosGetDoc 238, 521, 1008
collectLeafFields 829 cosGetDomain 1058
COMMENT 1378 cosGetDownIcon 930
CommonLocator 1413 cosGetEncode 1172
compareTo 347, 1346 cosGetEncryption 357, 1359
compatibilityBegin 116, 173, 212 cosGetExpectedActionType 833, 838, 841, 844, 848, 851, 854,
compatibilityEnd 116, 173, 212 858, 862, 869
composeString 566 cosGetExpectedFieldType 814, 879, 884, 889, 892, 896
compress 664, 706 cosGetFDF 251
computeResultRowSize 581 cosGetField 238
computeSourceRowSize 575, 581 cosGetFieldDescendant 1100
constant 303 cosGetFieldInheritable 1100
CONSTANT_CONTAINER 312 cosGetFieldInherited 1100
containable 256, 271, 279, 292, 313, 364 cosGetFieldType 814
contains 90, 98, 640, 1358 cosGetID 357
containsKey 261 cosGetMask 1074
containsValue 261 cosGetName 855
XREF 1371
XRefEntryVisitorException 1364
XRefFallbackParser 1365
XRefStreamParser 1366
XRefStreamWriter 1367
XRefTrailerParser 1369
XRefTrailerWriter 1371