|
ElegantJ PDF Library Java API Specification v1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.elegantj.pdf.PDFObject
com.elegantj.pdf.Page
A Page object that describes a single page of PDF document containing text, graphics and images
| Field Summary | |
static int |
ROTATE_0
Specifies that the page is in Default Rotation |
static int |
ROTATE_180
Specifies that the page is in 180 degree clock wise rotation |
static int |
ROTATE_270
Specifies that the page is in 270 degree clock wise rotation |
static int |
ROTATE_90
Specifies that the page is in 90 degree clock wise rotation |
| Constructor Summary | |
Page(Pages pages)
This constructs a Page object with default media size of A4 |
|
Page(Pages pages,
int rotate)
Constructs a Page object using default A4 size media box, and using the specified rotation |
|
Page(Pages pages,
MediaBox mediabox)
Constructs a page, using the specified media size. |
|
Page(Pages pages,
MediaBox mediabox,
int rotate)
Constructs a page using the specified media size and rotation |
|
| Method Summary | |
void |
addAnnotation(PDFAnnotation ob)
Method which adds the PDFAnnotation objects to this page The two types of PDFAnnotation objects are PDFTextAnnotation, PDFLinkAnnotation |
void |
addGraphics(PDFGraphicsObject ob)
Method which adds the PDFGraphicsObject object to this page The graphics objects include PDFText, PDFRectangle, PDFLine, PDFCircle, PDFArc, PDFOval, PDFPolygon |
void |
addImage(PDFImage pImage)
Method which adds the PDFImage object to this page |
void |
addTable(PDFTable pdfTable)
Method which adds the PDFTable object to this page |
java.lang.String |
addText(PDFText text)
Adds the PDFText to the Page |
java.awt.Shape |
getClip()
Returns the clip shape |
MediaBox |
getMedia()
Method which returns this page's media box |
int |
getPageIndex()
Returns the page no associated with this page |
Pages |
getParent()
Method which returns the parent of this page |
int |
getRotation()
Returns this page's rotation angle |
void |
setClip(int x,
int y,
int width,
int height)
Sets the current clip to the rectangle specified by the given coordinates |
void |
setClip(java.awt.Shape clip)
Sets the current clipping area to an arbitrary clip shape |
void |
setMedia(MediaBox mediabox)
Method which sets the media box for this page This should be done when the page is created |
void |
setRotation(int rotate)
Sets this page's rotation angle |
| Methods inherited from class com.elegantj.pdf.PDFObject |
getPDFObjectID, getPDFObjectRefStr, getPDFObjectType, setPDFObjectID, setPDFObjectType |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int ROTATE_0
public static final int ROTATE_90
public static final int ROTATE_180
public static final int ROTATE_270
| Constructor Detail |
public Page(Pages pages)
public Page(Pages pages,
MediaBox mediabox)
mediabox - The media box describing the page size
public Page(Pages pages,
int rotate)
rotate - The rotation angle, possible values are 0, 90, 180 or 270
public Page(Pages pages,
MediaBox mediabox,
int rotate)
mediabox - The media box describing the page sizerotate - The rotation angle, possible values are 0, 90, 180 or 270| Method Detail |
public void setMedia(MediaBox mediabox)
mediabox - The media box describing the page sizepublic Pages getParent()
public MediaBox getMedia()
public void setRotation(int rotate)
rotate - The rotation angle, Possible values are : 0, 90, 180 or 270public int getRotation()
public void addTable(PDFTable pdfTable)
throws java.io.IOException
pdfTable - The PDFTable object which will be added to this page
java.io.IOException
public void addGraphics(PDFGraphicsObject ob)
throws java.io.IOException
ob - The specified PDFGraphicsObject
java.io.IOException
public java.lang.String addText(PDFText text)
throws java.io.IOException
text - The PDFText
java.io.IOExceptionpublic void addImage(PDFImage pImage)
pImage - The specified imagepublic void addAnnotation(PDFAnnotation ob)
ob - The PDFAnnotation object to add to this page
public void setClip(int x,
int y,
int width,
int height)
x - The x coordinate of the new clip rectangley - The y coordinate of the new clip rectanglewidth - The width of the new clip rectangleheight - The height of the new clip rectanglepublic void setClip(java.awt.Shape clip)
clip - The Shape to use to set the clippublic java.awt.Shape getClip()
public int getPageIndex()
|
ElegantJ PDF Library Java API Specification v1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||