Package org.apache.fop.pdf
Class PDFOutline
java.lang.Object
org.apache.fop.pdf.PDFObject
org.apache.fop.pdf.PDFOutline
- All Implemented Interfaces:
PDFWritable
This represents a single Outline object in a PDF, including the root Outlines object. Outlines provide the bookmark bar, usually rendered to the right of a PDF document in user agents such as Acrobat Reader.
This work was authored by Kelly A. Campbell.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate PDFReferenceprivate intprivate PDFOutlineprivate PDFOutlineprivate PDFOutlineprivate booleanprivate PDFOutlineparent outline object.private PDFOutlineprivate Listlist of sub-entries (outline objects)private Stringtitle to display for the bookmark entry -
Constructor Summary
ConstructorsConstructorDescriptionPDFOutline(String title, PDFReference action, boolean openItem) Create a PDF outline with the title and action. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOutline(PDFOutline outline) Add a sub element to this outline.voidgetChildren(Set<PDFObject> children) private voidIncrement the number of subentries and descendants.voidSet the title of this Outline object.protected byte[]toPDF()Encodes the object as a byte array for output to a PDF file.Methods inherited from class org.apache.fop.pdf.PDFObject
contentEquals, encode, encodeBinaryToHexString, encodeString, encodeText, formatObject, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, output, outputInline, referencePDF, setDocument, setObjectNumber, setObjectNumber, setObjectNumber, setParent, toPDFString
-
Field Details
-
subentries
list of sub-entries (outline objects) -
parent
parent outline object. Root Outlines parent is null -
prev
-
next
-
first
-
last
-
count
private int count -
openItem
private boolean openItem -
title
title to display for the bookmark entry -
actionRef
-
-
Constructor Details
-
PDFOutline
Create a PDF outline with the title and action.- Parameters:
title- the title of the outline entry (can only be null for root Outlines obj)action- the action for this outlineopenItem- indicator of whether child items are visible or not
-
-
Method Details
-
setTitle
Set the title of this Outline object.- Parameters:
t- the title of the outline
-
addOutline
Add a sub element to this outline.- Parameters:
outline- a sub outline
-
incrementCount
private void incrementCount()Increment the number of subentries and descendants. -
toPDF
protected byte[] toPDF()Encodes the object as a byte array for output to a PDF file. -
getChildren
- Overrides:
getChildrenin classPDFObject
-