Home » pdfbox-1.1.0-src » org.apache.pdfbox.pdmodel » [javadoc | source]
org.apache.pdfbox.pdmodel
public class: PDPage [javadoc | source]
java.lang.Object
   org.apache.pdfbox.pdmodel.PDPage

All Implemented Interfaces:
    Printable, COSObjectable

This represents a single page in a PDF document.
Field Summary
public static final  PDRectangle PAGE_SIZE_LETTER    A page size of LETTER or 8.5x11. 
public static final  PDRectangle PAGE_SIZE_A0    A page size of A0 Paper. 
public static final  PDRectangle PAGE_SIZE_A1    A page size of A1 Paper. 
public static final  PDRectangle PAGE_SIZE_A2    A page size of A2 Paper. 
public static final  PDRectangle PAGE_SIZE_A3    A page size of A3 Paper. 
public static final  PDRectangle PAGE_SIZE_A4    A page size of A4 Paper. 
public static final  PDRectangle PAGE_SIZE_A5    A page size of A5 Paper. 
public static final  PDRectangle PAGE_SIZE_A6    A page size of A6 Paper. 
Constructor:
 public PDPage() 
 public PDPage(COSDictionary pageDic) 
    Creates a new instance of PDPage.
    Parameters:
    pageDic - The existing page dictionary.
Method from org.apache.pdfbox.pdmodel.PDPage Summary:
convertToImage,   convertToImage,   equals,   findCropBox,   findMediaBox,   findResources,   findRotation,   getActions,   getAnnotations,   getArtBox,   getBleedBox,   getCOSDictionary,   getCOSObject,   getContents,   getCropBox,   getLastModified,   getMediaBox,   getMetadata,   getParent,   getResources,   getRotation,   getThreadBeads,   getTrimBox,   hashCode,   print,   setActions,   setAnnotations,   setArtBox,   setBleedBox,   setContents,   setCropBox,   setMediaBox,   setMetadata,   setParent,   setResources,   setRotation,   setThreadBeads,   setTrimBox,   updateLastModified
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.pdfbox.pdmodel.PDPage Detail:
 public BufferedImage convertToImage() throws IOException 
    Convert this page to an output image with 8 bits per pixel and the double default screen resolution.
 public BufferedImage convertToImage(int imageType,
    int resolution) throws IOException 
    Convert this page to an output image.
 public boolean equals(Object other) 
    {@inheritDoc}
 public PDRectangle findCropBox() 
    This will find the CropBox for this page by looking up the hierarchy until it finds them.
 public PDRectangle findMediaBox() 
    This will find the MediaBox for this page by looking up the hierarchy until it finds them.
 public PDResources findResources() 
    This will find the resources for this page by looking up the hierarchy until it finds them.
 public int findRotation() 
    This will find the rotation for this page by looking up the hierarchy until it finds them.
 public PDPageAdditionalActions getActions() 
    Get the page actions.
 public List getAnnotations() throws IOException 
    This will return a list of the Annotations for this page.
 public PDRectangle getArtBox() 
    A rectangle, expressed in default user space units, defining the extent of the page's meaningful content (including potential white space) as intended by the page's creator The default isthe CropBox.
 public PDRectangle getBleedBox() 
    A rectangle, expressed in default user space units, defining the region to which the contents of the page should be clipped when output in a production environment. The default is the CropBox.
 public COSDictionary getCOSDictionary() 
    This will get the underlying dictionary that this class acts on.
 public COSBase getCOSObject() 
    Convert this standard java object to a COS object.
 public PDStream getContents() throws IOException 
    This will get the contents of the PDF Page, in the case that the contents of the page is an array then then the entire array of streams will be be wrapped and appear as a single stream.
 public PDRectangle getCropBox() 
    A rectangle, expressed in default user space units, defining the visible region of default user space. When the page is displayed or printed, its contents are to be clipped (cropped) to this rectangle and then imposed on the output medium in some implementationdefined manner This will get the CropBox at this page and not look up the hierarchy. This attribute is inheritable, and findCropBox() should probably used. This will return null if no CropBox is available at this level.
 public Calendar getLastModified() throws IOException 
    This will get the date that the content stream was last modified. This may return null.
 public PDRectangle getMediaBox() 
    A rectangle, expressed in default user space units, defining the boundaries of the physical medium on which the page is intended to be displayed or printed This will get the MediaBox at this page and not look up the hierarchy. This attribute is inheritable, and findMediaBox() should probably used. This will return null if no MediaBox are available at this level.
 public PDMetadata getMetadata() 
    Get the metadata that is part of the document catalog. This will return null if there is no meta data for this object.
 public PDPageNode getParent() 
    This is the parent page node. The parent is a required element of the page. This will be null until this page is added to the document.
 public PDResources getResources() 
    This will get the resources at this page and not look up the hierarchy. This attribute is inheritable, and findResources() should probably used. This will return null if no resources are available at this level.
 public Integer getRotation() 
    A value representing the rotation. This will be null if not set at this level The number of degrees by which the page should be rotated clockwise when displayed or printed. The value must be a multiple of 90. This will get the rotation at this page and not look up the hierarchy. This attribute is inheritable, and findRotation() should probably used. This will return null if no rotation is available at this level.
 public List getThreadBeads() 
    This will get a list of PDThreadBead objects, which are article threads in the document. This will return an empty list of there are no thread beads.
 public PDRectangle getTrimBox() 
    A rectangle, expressed in default user space units, defining the intended dimensions of the finished page after trimming. The default is the CropBox.
 public int hashCode() 
    {@inheritDoc}
 public int print(Graphics graphics,
    PageFormat pageFormat,
    int pageIndex) throws PrinterException 
    {@inheritDoc}
 public  void setActions(PDPageAdditionalActions actions) 
    Set the page actions.
 public  void setAnnotations(List annots) 
    This will set the list of annotations.
 public  void setArtBox(PDRectangle artBox) 
    This will set the ArtBox for this page.
 public  void setBleedBox(PDRectangle bleedBox) 
    This will set the BleedBox for this page.
 public  void setContents(PDStream contents) 
    This will set the contents of this page.
 public  void setCropBox(PDRectangle cropBox) 
    This will set the CropBox for this page.
 public  void setMediaBox(PDRectangle mediaBox) 
    This will set the mediaBox for this page.
 public  void setMetadata(PDMetadata meta) 
    Set the metadata for this object. This can be null.
 public  void setParent(PDPageNode parent) 
    This will set the parent of this page.
 public  void setResources(PDResources resources) 
    This will set the resources for this page.
 public  void setRotation(int rotation) 
    This will set the rotation for this page.
 public  void setThreadBeads(List beads) 
    This will set the list of thread beads.
 public  void setTrimBox(PDRectangle trimBox) 
    This will set the TrimBox for this page.
 public  void updateLastModified() 
    This will update the last modified time for the page object.