Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| PDF Clown 0.1.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.pdfclown.documents
Class Page

    java.lang.Object
      org.pdfclown.objects.PdfObjectWrapper<PdfDictionary>
          org.pdfclown.documents.Page

All Implemented Interfaces:
  Printable, Cloneable, IContentContext, IContentEntity, IPdfObjectWrapper

    @PDF(value=PDF10)
    public final class Page

extends PdfObjectWrapper<PdfDictionary>
implements IContentContext, Printable

Document page [PDF:1.6:3.6.2].

Since:
  0.0.0
Version:
  0.1.2, 12/28/12
Author:
  Stefano Chizzolini (http://www.stefanochizzolini.it)

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

### InheritableAttributeKeys

    public static final Set<PdfName> InheritableAttributeKeys

Constructor Detail

### Page

    public Page(Document context)

  Creates a new page within the specified document context, using the default size.

  Parameters:
    `context` - Document where to place this page.

### Page

    public Page(Document context,
                Dimension2D size)

  Creates a new page within the specified document context.

  Parameters:
    `context` - Document where to place this page.
    `size` - Page size. In case of `null`, uses the default size.

Method Detail

### getInheritableAttribute

    public 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.

  Parameters:
    `pageObject` - Page object.
    `key` - Attribute key.

### wrap

    public static Page wrap(PdfDirectObject baseObject)

### clone

    public Page clone(Document context)

  Description copied from class: `PdfObjectWrapper`
  Gets a clone of the object, registered inside the given document context.

  Overrides:
    `clone` in class `PdfObjectWrapper<PdfDictionary>`
  Parameters:
    `context` - Which document the clone has to be registered in.

### getActions

    @PDF(value=PDF12)
    public PageActions getActions()

  Gets the page's behavior in response to trigger events.

### getAnnotations

    public PageAnnotations getAnnotations()

  Gets the annotations associated to the page.

### getArtBox

    @PDF(value=PDF13)
    public 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].

  See Also:
    `getCropBox()`

### getArticleElements

    public PageArticleElements getArticleElements()

  Gets the page article beads.

### getBleedBox

    @PDF(value=PDF13)
    public 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].

  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.

  See Also:
    `getCropBox()`

### getCropBox

    public 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].

  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.

  See Also:
    `getBox()`

### getDuration

    @PDF(value=PDF11)
    public double getDuration()

  Gets the page's display duration.

  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.

### getIndex

    public int getIndex()

  Gets the index of the page.

### getSize

    public Dimension2D getSize()

  Gets the page size.

### getTabOrder

    @PDF(value=PDF15)
    public Page.TabOrderEnum getTabOrder()

  Gets the tab order to be used for annotations on the page.

### getTransition

    @PDF(value=PDF11)
    public Transition getTransition()

  Gets the transition effect to be used when displaying the page during presentations.

### getTrimBox

    @PDF(value=PDF13)
    public Rectangle2D getTrimBox()

  Gets the intended dimensions of the finished page after trimming [PDF:1.7:10.10.1].

  It may be smaller than the media box to allow for production-related content, such as printing instructions, cut marks, or color bars.

  See Also:
    `getCropBox()`

### setActions

    public void setActions(PageActions value)

  See Also:
    `getActions()`

### setAnnotations

    public void setAnnotations(PageAnnotations value)

  See Also:
    `getAnnotations()`

### setArtBox

    public void setArtBox(Rectangle2D value)

  See Also:
    `getArtBox()`

### setBleedBox

    public void setBleedBox(Rectangle2D value)

  See Also:
    `getBleedBox()`

### setBox

    public void setBox(Rectangle2D value)

  See Also:
    `getBox()`

### setCropBox

    public void setCropBox(Rectangle2D value)

  See Also:
    `getCropBox()`

### setDuration

    public void setDuration(double value)

  See Also:
    `getDuration()`

### setRotation

    public void setRotation(RotationEnum value)

  See Also:
    `getRotation()`

### setSize

    public void setSize(Dimension2D value)

  See Also:
    `getSize()`

### setTabOrder

    public void setTabOrder(Page.TabOrderEnum value)

  See Also:
    `getTabOrder()`

### setTransition

    public void setTransition(Transition value)

  See Also:
    `getTransition()`

### setTrimBox

    public void setTrimBox(Rectangle2D value)

  See Also:
    `getTrimBox()`

### getBox

    public Rectangle2D getBox()

  Description copied from interface: `IContentContext`
  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.

  Specified by:
    `getBox` in interface `IContentContext`

### getContents

    public Contents getContents()

  Description copied from interface: `IContentContext`
  Gets the contents collection representing the content stream associated with this content context.

  Specified by:
    `getContents` in interface `IContentContext`

### getResources

    public Resources getResources()

  Description copied from interface: `IContentContext`
  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).

  The implementing class MUST ensure that the returned object isn't `null`.

  Specified by:
    `getResources` in interface `IContentContext`

### getRotation

    public RotationEnum getRotation()

  Description copied from interface: `IContentContext`
  Gets the rendering rotation of this content context.

  Specified by:
    `getRotation` in interface `IContentContext`

### render

    public void render(Graphics2D context,
                       Dimension2D size)

  Description copied from interface: `IContentContext`
  Renders this content context into the specified rendering context.

  Specified by:
    `render` in interface `IContentContext`
  Parameters:
    `context` - Rendering context.
    `size` - Rendering canvas size.

### toInlineObject

    public ContentObject toInlineObject(PrimitiveComposer composer)

  Description copied from interface: `IContentEntity`
  Converts this entity to its equivalent inline (dependent) object representation [PDF:1.6:4.8.6].

  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.

  Specified by:
    `toInlineObject` in interface `IContentEntity`
  Parameters:
    `composer` - Target content composer.
  Returns:
    The inline object representing the entity.

### toXObject

    public XObject toXObject(Document context)

  Description copied from interface: `IContentEntity`
  Converts this entity to its equivalent external (independent) object representation [PDF:1.6:4.7].

  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).

  Specified by:
    `toXObject` in interface `IContentEntity`
  Parameters:
    `context` - Target document.
  Returns:
    The external object representing the entity.

### print

    public int print(Graphics graphics,
                     PageFormat pageFormat,
                     int pageIndex)
              throws PrinterException

  Specified by:
    `print` in interface `Printable`
  Throws:
    `PrinterException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| PDF Clown 0.1.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Project home page
Copyright © 2006-2013 Stefano Chizzolini. Some Rights Reserved.
This documentation is available under the terms of the GNU Free Documentation License.