|
PDF Clown 0.1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pdfclown.objects.PdfObjectWrapper<PdfDictionary> org.pdfclown.documents.Page
@PDF(value=PDF10) public final class Page
Document page [PDF:1.6:3.6.2].
Nested Class Summary | |
---|---|
static class |
Page.TabOrderEnum
Annotations tab order [PDF:1.6:3.6.2]. |
Field Summary | |
---|---|
static Set<PdfName> |
InheritableAttributeKeys
|
Fields inherited from interface java.awt.print.Printable |
---|
NO_SUCH_PAGE, PAGE_EXISTS |
Constructor Summary | |
---|---|
Page(Document context)
Creates a new page within the specified document context, using the default size. |
|
Page(Document context,
Dimension2D size)
Creates a new page within the specified document context. |
Method Summary | |
---|---|
Page |
clone(Document context)
Gets a clone of the object, registered inside the given document context. |
PageActions |
getActions()
Gets the page's behavior in response to trigger events. |
PageAnnotations |
getAnnotations()
Gets the annotations associated to the page. |
Rectangle2D |
getArtBox()
Gets the extent of the page's meaningful content (including potential white space) as intended by the page's creator [PDF:1.7:10.10.1]. |
PageArticleElements |
getArticleElements()
Gets the page article beads. |
Rectangle2D |
getBleedBox()
Gets the region to which the contents of the page should be clipped when output in a production environment [PDF:1.7:10.10.1]. |
Rectangle2D |
getBox()
Gets the bounding box associated with this content context either explicitly (directly associated to the object) or (if not explicitly available) implicitly (inherited from a higher level object), expressed in default user-space units. |
Contents |
getContents()
Gets the contents collection representing the content stream associated with this content context. |
Rectangle2D |
getCropBox()
Gets the region to which the contents of the page are to be clipped (cropped) when displayed or printed [PDF:1.7:10.10.1]. |
double |
getDuration()
Gets the page's display duration. |
int |
getIndex()
Gets the index of the page. |
static PdfDirectObject |
getInheritableAttribute(PdfDictionary pageObject,
PdfName key)
Gets the attribute value corresponding to the specified key, possibly recurring to its ancestor nodes in the page tree. |
Resources |
getResources()
Gets the resources associated with this content context either explicitly (directly associated to the object) or (if not explicitly available) implicitly (inherited from a higher-level object). |
RotationEnum |
getRotation()
Gets the rendering rotation of this content context. |
Dimension2D |
getSize()
Gets the page size. |
Page.TabOrderEnum |
getTabOrder()
Gets the tab order to be used for annotations on the page. |
Transition |
getTransition()
Gets the transition effect to be used when displaying the page during presentations. |
Rectangle2D |
getTrimBox()
Gets the intended dimensions of the finished page after trimming [PDF:1.7:10.10.1]. |
int |
print(Graphics graphics,
PageFormat pageFormat,
int pageIndex)
|
void |
render(Graphics2D context,
Dimension2D size)
Renders this content context into the specified rendering context. |
void |
setActions(PageActions value)
|
void |
setAnnotations(PageAnnotations value)
|
void |
setArtBox(Rectangle2D value)
|
void |
setBleedBox(Rectangle2D value)
|
void |
setBox(Rectangle2D value)
|
void |
setCropBox(Rectangle2D value)
|
void |
setDuration(double value)
|
void |
setRotation(RotationEnum value)
|
void |
setSize(Dimension2D value)
|
void |
setTabOrder(Page.TabOrderEnum value)
|
void |
setTransition(Transition value)
|
void |
setTrimBox(Rectangle2D value)
|
ContentObject |
toInlineObject(PrimitiveComposer composer)
Converts this entity to its equivalent inline (dependent) object representation [PDF:1.6:4.8.6]. |
XObject |
toXObject(Document context)
Converts this entity to its equivalent external (independent) object representation [PDF:1.6:4.7]. |
static Page |
wrap(PdfDirectObject baseObject)
|
Methods inherited from class org.pdfclown.objects.PdfObjectWrapper |
---|
checkCompatibility, delete, equals, exists, getBaseDataObject, getBaseObject, getBaseObject, getContainer, getDataContainer, getDocument, getFile, getMetadata, retrieveName, retrieveNamedBaseObject, setBaseObject, setMetadata |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Set<PdfName> InheritableAttributeKeys
Constructor Detail |
---|
public Page(Document context)
context
- Document where to place this page.public Page(Document context, Dimension2D size)
context
- Document where to place this page.size
- Page size. In case of null
, uses the default size.Method Detail |
---|
public static PdfDirectObject getInheritableAttribute(PdfDictionary pageObject, PdfName key)
pageObject
- Page object.key
- Attribute key.public static Page wrap(PdfDirectObject baseObject)
public Page clone(Document context)
PdfObjectWrapper
clone
in class PdfObjectWrapper<PdfDictionary>
context
- Which document the clone has to be registered in.@PDF(value=PDF12) public PageActions getActions()
public PageAnnotations getAnnotations()
@PDF(value=PDF13) public Rectangle2D getArtBox()
getCropBox()
public PageArticleElements getArticleElements()
@PDF(value=PDF13) public Rectangle2D getBleedBox()
This may include any extra bleed area needed to accommodate the physical limitations of cutting, folding, and trimming equipment. The actual printed page may include printing marks that fall outside the bleed box.
getCropBox()
public Rectangle2D getCropBox()
Unlike the other boxes, the crop box has no defined meaning in terms of physical page geometry or intended use; it merely imposes clipping on the page contents. However, in the absence of additional information, the crop box determines how the page's contents are to be positioned on the output medium.
getBox()
@PDF(value=PDF11) public double getDuration()
The page's display duration (also called its advance timing) is the maximum length of time, in seconds, that the page is displayed during presentations before the viewer application automatically advances to the next page.
By default, the viewer does not advance automatically.
public int getIndex()
public Dimension2D getSize()
@PDF(value=PDF15) public Page.TabOrderEnum getTabOrder()
@PDF(value=PDF11) public Transition getTransition()
@PDF(value=PDF13) public Rectangle2D getTrimBox()
It may be smaller than the media box to allow for production-related content, such as printing instructions, cut marks, or color bars.
getCropBox()
public void setActions(PageActions value)
getActions()
public void setAnnotations(PageAnnotations value)
getAnnotations()
public void setArtBox(Rectangle2D value)
getArtBox()
public void setBleedBox(Rectangle2D value)
getBleedBox()
public void setBox(Rectangle2D value)
getBox()
public void setCropBox(Rectangle2D value)
getCropBox()
public void setDuration(double value)
getDuration()
public void setRotation(RotationEnum value)
getRotation()
public void setSize(Dimension2D value)
getSize()
public void setTabOrder(Page.TabOrderEnum value)
getTabOrder()
public void setTransition(Transition value)
getTransition()
public void setTrimBox(Rectangle2D value)
getTrimBox()
public Rectangle2D getBox()
IContentContext
getBox
in interface IContentContext
public Contents getContents()
IContentContext
getContents
in interface IContentContext
public Resources getResources()
IContentContext
The implementing class MUST ensure that the returned object isn't null
.
getResources
in interface IContentContext
public RotationEnum getRotation()
IContentContext
getRotation
in interface IContentContext
public void render(Graphics2D context, Dimension2D size)
IContentContext
render
in interface IContentContext
context
- Rendering context.size
- Rendering canvas size.public ContentObject toInlineObject(PrimitiveComposer composer)
IContentEntity
This method creates and shows an inline object within the target content context, returning it.
Due to its direct-content nature (opposite to the indirect-content nature of
external objects (see IContentEntity.toXObject(Document)
)), the resulting object should be shown
only one time in order not to wastefully duplicate its data.
toInlineObject
in interface IContentEntity
composer
- Target content composer.
public XObject toXObject(Document context)
IContentEntity
This method creates an external object within the target document, returning it. To show it
in a content context (for example: a page), then it must be applied in an appropriate manner (see
PrimitiveComposer
object).
toXObject
in interface IContentEntity
context
- Target document.
public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException
print
in interface Printable
PrinterException
|
PDF Clown 0.1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |