|
Gnostice PDFOne
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gnostice.pdfone.PdfNode
com.gnostice.pdfone.PdfStdPage
com.gnostice.pdfone.PdfProPage
com.gnostice.pdfone.PdfPage
Field Summary | |
static int |
COLORSPACE_CMYK
|
static int |
COLORSPACE_RGB
|
static int |
HP_LEFT
Constant to specify horizontal alignment to the left (inside header, footer and watermarks) |
static int |
HP_MIDDLE
Constant to specify horizontal alignment to the middle (inside header, footer and watermarks) |
static int |
HP_RIGHT
Constant to specify horizontal alignment to the right (inside header, footer and watermarks) |
static boolean |
OVERLAY
Constant to specify z-order overlay |
static boolean |
UNDERLAY
Constant to specify z-order underlay |
static int |
VP_BOTTOM
Constant to specify vertical alignment to the bottom (inside header, footer and watermarks) |
static int |
VP_CENTRE
Constant to specify vertical alignment to the center (inside header, footer and watermarks) |
static int |
VP_TOP
Constant to specify vertical alignment to the top (inside header, footer and watermarks) |
Constructor Summary | |
PdfPage()
|
|
PdfPage(double width,
double height)
|
|
PdfPage(double width,
double height,
double pageHeaderHeight,
double pageFooterHeight,
double pageLeftMargin,
double pageTopMargin,
double pageRightMargin,
double pageBottomMargin,
int measurementUnit)
|
|
PdfPage(double width,
double height,
double pageLeftMargin,
double pageTopMargin,
double pageRightMargin,
double pageBottomMargin,
int measurementUnit)
|
|
PdfPage(double width,
double height,
int measurementUnit)
|
|
PdfPage(int pageSize)
|
|
PdfPage(int pageSize,
double pageHeaderHeight,
double pageFooterHeight,
double pageLeftMargin,
double pageTopMargin,
double pageRightMargin,
double pageBottomMargin,
int measurementUnit)
|
|
PdfPage(int pageSize,
double pageLeftMargin,
double pageTopMargin,
double pageRightMargin,
double pageBottomMargin,
int measurementUnit)
|
Method Summary | |
void |
addAction(int event,
int namedAction)
Adds specified named action for specified trigger event. |
void |
addAction(int event,
int actionType,
String javascriptOrURI)
Adds action of resolving specified Uniform Resource Identifier URI) or executing a JavaScript script for the specified event. |
void |
addAction(int event,
int actionType,
String applicationToLaunch,
boolean isPrint)
Adds action of launching specified application, or displaying or printing specified file for the specified event. |
void |
addAnnotation(PdfAnnot annotation)
Adds specified annotation to this PdfPage . |
void |
addAnnotationList(List annotList)
|
void |
addAnnotationList(List annotList,
boolean removeExistingAnnots)
|
void |
addFooterImage(PdfImage img,
int position,
boolean underlay)
Adds PdfImage object to footer. |
void |
addFooterImage(String path,
int position,
boolean underlay)
Adds image, specified by its pathname, to footer. |
void |
addFooterText(String text,
PdfFont font,
int position,
boolean underlay)
Adds specified text to footer. |
void |
addFormField(PdfFormField f)
|
void |
addFormFieldList(List formFieldList)
|
void |
addHeaderImage(PdfImage img,
int position,
boolean underlay)
Adds PdfImage object to the header. |
void |
addHeaderImage(String path,
int position,
boolean underlay)
Adds image, specified by its pathname, to header. |
void |
addHeaderText(String text,
PdfFont font,
int position,
boolean underlay)
Adds specified text to header. |
void |
addTable(PdfTable table,
double x,
double y)
|
void |
addThumbnailImage(String path)
|
void |
addWatermarkImage(PdfImage image,
int position,
boolean applyMargins,
double angle,
boolean underlay)
Adds PdfImage object as watermark image with its
exact position determined by position and
applyMargins . |
void |
addWatermarkImage(PdfImage image,
int position,
double angle,
boolean underlay)
Adds PdfImage object as watermark image. |
void |
addWatermarkImage(String path,
int position,
boolean applyMargins,
double angle,
boolean underlay)
Adds image, specified by its pathname, as watermark image with its exact position determined by position
and applyMargins . |
void |
addWatermarkImage(String path,
int position,
double angle,
boolean underlay)
Adds image, specified by its pathname, as watermark image. |
void |
addWatermarkText(String text,
PdfFont font,
int position,
boolean applyMargins,
double angle,
boolean underlay)
Adds specified text as watermark with its exact position determined by position and
applyMargins . |
void |
addWatermarkText(String text,
PdfFont font,
int position,
double angle,
boolean underlay)
Adds specified text as watermark. |
Object |
clone()
|
void |
deleteFormFields()
|
void |
deleteFormFields(int type)
|
void |
deleteFormFields(String name)
|
void |
disableAllMargins()
Disables all margins on this PdfPage . |
void |
drawArc(PdfRect rect,
double startAngle,
double sweepAngle)
Draws an arc. |
void |
drawBezierCurve(double startX,
double startY,
double ctrlX,
double ctrlY,
double endX,
double endY,
boolean isFill,
boolean isStroke)
Draws a Bézier curve with a control point specified by ( ctrlX , ctrlY ). |
void |
drawBezierCurve(double startX,
double startY,
double ctrlX1,
double ctrlY1,
double ctrlX2,
double ctrlY2,
double endX,
double endY,
boolean isFill,
boolean isStroke)
Draws a Bézier curve with control points at ( ctrlX1 , ctrlY1 ) and
(ctrlX2 , ctrlY2 ). |
void |
drawBezierCurve(PdfPoint start,
PdfPoint control,
PdfPoint end,
boolean isFill,
boolean isStroke)
Draws a Bézier curve with a single control point. |
void |
drawBezierCurve(PdfPoint start,
PdfPoint controlPoint1,
PdfPoint controlPoint2,
PdfPoint end,
boolean isFill,
boolean isStroke)
Draws a Bézier curve with two control points. |
void |
drawCircle(double x,
double y,
double radius,
boolean isFill,
boolean isStroke)
Draws a circle with its center at position ( x , y ). |
void |
drawCircle(PdfPoint center,
double radius,
boolean isFill,
boolean isStroke)
Draws a circle with its center at the specified point. |
void |
drawEllipse(double x1,
double y1,
double x2,
double y2,
boolean isFill,
boolean isStroke)
Draws an ellipse whose bounding box has its top-left corner at ( x1 , y1 ) and its bottom-right
corner at (x2 , y2 ). |
void |
drawEllipse(PdfPoint p1,
PdfPoint p2,
boolean isFill,
boolean isStroke)
Draws an ellipse whose bounding box has its top-left corner at point1 and its bottom-right corner at
point2 . |
void |
drawImage(PdfImage img,
double x,
double y)
Draws specified image at position ( x ,
y ). |
void |
drawImage(PdfImage img,
double x,
double y,
double rotation)
Draws specified image, rotated by rotation
degrees, at position (x , y ). |
void |
drawImage(PdfImage img,
double x,
double y,
double width,
double height)
Draws specified image at position ( x ,
y ) with specified width and height. |
void |
drawImage(PdfImage img,
double x,
double y,
double width,
double height,
double rotation)
Draw specified image, rotated by rotation
degrees, at position (x , y )
with specified height and width. |
void |
drawImage(PdfImage img,
PdfPoint p)
Draws specified image at specified point. |
void |
drawImage(PdfImage img,
PdfPoint p,
double rotation)
Draws specified image, rotated by rotation
degrees, at point p . |
void |
drawImage(PdfImage img,
PdfPoint p,
double width,
double height)
Draws specified image at point p with specified
width and height. |
void |
drawImage(PdfImage img,
PdfPoint p,
double width,
double height,
double rotation)
Draws specified image, rotated by rotation
degrees, at point p with specified width and
height. |
void |
drawImage(PdfImage img,
PdfRect rect)
Draws specified image on specified rectangle. |
void |
drawImage(PdfImage img,
PdfRect rect,
double rotation)
Draws specified image, rotated by rotation
degrees, on specified rectangle. |
void |
drawImage(String path,
double x,
double y)
Draws image, specified by its pathname, at position ( x , y ). |
void |
drawImage(String path,
double x,
double y,
double rotation)
Draw image, specified by its pathname and rotated by rotation degrees, at position (x ,
y ). |
void |
drawImage(String path,
double x,
double y,
double width,
double height)
Draws image, specified by its pathname, at position ( x ,
y ) with specified width and height. |
void |
drawImage(String path,
double x,
double y,
double width,
double height,
double rotation)
Draws image, specified by its pathname and rotated by rotation degrees, at position (x ,
y ) with specified width and height. |
void |
drawImage(String path,
PdfPoint p)
Draws image, specified by its pathname, at point p . |
void |
drawImage(String path,
PdfPoint p,
double rotation)
Draws image, specified by its pathname and rotated by rotation degrees, at point p . |
void |
drawImage(String path,
PdfPoint p,
double width,
double height)
Draws image, specified by its pathname, at point p with specified width and height. |
void |
drawImage(String path,
PdfPoint p,
double width,
double height,
double rotation)
Draws image, specified by its pathname and rotated by rotation degrees, at point p with
specified width and height. |
void |
drawImage(String path,
PdfRect rect)
Draws image, specified by its pathname, on rectangle rect . |
void |
drawImage(String path,
PdfRect rect,
double rotation)
Draws image, specified by its pathname and rotated by rotation degrees, on rectangle
rect . |
void |
drawLine(double startx,
double starty,
double endx,
double endy)
Draws a line between positions ( startx , starty ) and
(endx , endy ). |
void |
drawLine(PdfPoint start,
PdfPoint end)
Draws a line between points start and
end . |
void |
drawPie(double x,
double y,
double width,
double height,
double startAngle,
double sweepAngle,
boolean isFill,
boolean isStroke)
Draws a pie segment. |
void |
drawPolygon(double[] xPoints,
double[] yPoints,
int nPoints,
boolean isFill,
boolean isStroke)
Draws a polygon. |
void |
drawPolyline(double[] xPoints,
double[] yPoints,
int nPoints)
Draws a polyline. |
void |
drawRect(double x,
double y,
double width,
double height)
Draws a rectangle at position ( x , y )
with specified width and height. |
void |
drawRect(double x,
double y,
double width,
double height,
boolean isFill,
boolean isStroke)
Draws a rectangle at position ( x , y )
with specified width, height, brush, and pen settings. |
void |
drawRect(PdfPoint p,
double width,
double height)
Draws a rectangle at specified point with specified width and height. |
void |
drawRect(PdfPoint p,
double width,
double height,
boolean isFill,
boolean isStroke)
Draws a rectangle at specified point with specified width, height, brush, and pen settings. |
void |
drawRect(PdfRect r)
Draws a rectangle. |
void |
drawRect(Rectangle r)
|
void |
drawRoundRect(double x,
double y,
double width,
double height,
double arcWidth,
double arcHeight,
boolean isFill,
boolean isStroke)
Draws a rectangle with rounded corners. |
void |
drawRoundRect(PdfRect rect,
double arcWidth,
double arcHeight,
boolean isFill,
boolean isStroke)
Draws rectangle rect with specified rounded
corners. |
void |
drawSquare(double x,
double y,
double length)
Draws a square at position ( x , y ). |
void |
drawSquare(double x,
double y,
double length,
boolean isFill,
boolean isStroke)
Draws a square at position ( x , y )
with specified fill and stroke settings. |
void |
drawSquare(PdfPoint p,
double length)
Draws a square at point p . |
void |
drawSquare(PdfPoint p,
double length,
boolean isFill,
boolean isStroke)
Draws a square at point p with specified fill
and stroke settings. |
void |
enableAllMargins()
Enables all margins on this PdfPage . |
void |
flattenFormFields()
|
void |
flattenFormFields(boolean flattenWithNewValue)
|
void |
flattenFormFields(int type)
|
void |
flattenFormFields(int type,
boolean flattenWithNewValue)
|
void |
flattenFormFields(String name)
|
void |
flattenFormFields(String name,
boolean flattenWithNewValue)
|
List |
getAllAnnotations()
|
List |
getAllAnnotations(int type)
|
void |
getAllAnnotations(int type,
List listToPopulate)
|
void |
getAllAnnotations(List listToPopulate)
|
List |
getAllFormFields()
|
List |
getAllFormFields(int type)
|
List |
getAllFormFields(String name)
|
double |
getBottomMargin()
Returns size of this page's bottom margin. |
PdfBrush |
getBrush()
Returns default brush used on this page. |
int |
getColorSpace()
|
double |
getCropBottom()
Returns difference between bottom boundaries of this page's media box and crop box. |
double |
getCropLeft()
Returns difference between left boundaries of this page's media box and crop box. |
double |
getCropRight()
Returns difference between right boundaries of this page's media box and crop box. |
double |
getCropTop()
Returns difference between top boundaries of this page's media box and crop box. |
double |
getDisplayDuration()
|
double |
getFooterHeight()
Returns height of this page's footer. |
double |
getHeaderHeight()
Returns height of this page's footer. |
double |
getHeight()
Returns height of this page. |
double |
getLeftMargin()
Returns size of this page's left margin. |
int |
getMeasurementUnit()
Returns default measurement unit currently used for this PdfPage . |
PdfPen |
getPen()
Returns a PdfPen object representing this page's
pen. |
PdfPagePresentation |
getPresentation()
|
double |
getRightMargin()
Returns size of this page's right margin. |
int |
getRotation()
Returns angle of rotation for contents of this page. |
PdfTextFormatter |
getTextFormatter()
Retrieves PdfTextFormatter object contained by
this PdfPage . |
double |
getTopMargin()
Returns the size of this page's top margin. |
double |
getWidth()
Returns width of this page. |
void |
removeThumbnailImage()
|
void |
setBrushColor(Color c)
Specifies default color for this page's brush. |
void |
setColorSpace(int colorspace)
|
void |
setCph(PdfCustomPlaceholderHandler cph)
|
void |
setDisplayDuration(double displayDuration)
|
void |
setHeight(double height,
int unit)
|
void |
setMeasurementUnit(int mu)
Specifies default measurement unit to be used for this PdfPage . |
void |
setPen(PdfPen pen)
Sets specified PdfPen object as this page's pen. |
void |
setPenCapStyle(int capStyle)
Specifies default shape of endpoints of paths in this page. |
void |
setPenColor(Color color)
Specifies default color for this page's pen. |
void |
setPenDashGap(double gap)
Specifies length of gaps in default dash pattern of this page's pen. |
void |
setPenDashLength(double length)
Specifies length of dashes in default dash pattern of this PdfDocument's pen. |
void |
setPenDashPhase(double phase)
Specifies length of phase of default dash pattern of this page's pen. |
void |
setPenJoinStyle(int joinStyle)
Specifies default shape of joints of paths that connect at an angle for this pages's pen. |
void |
setPenMiterLimit(int limit)
Specifies default miter limit for this page's pen. |
void |
setPenWidth(double width)
Specifies default width for this page's pen. |
void |
setPresentation(PdfPagePresentation presentation)
|
void |
setTextFormatter(PdfTextFormatter tf)
Specifies new text formatting settings. |
void |
setWidth(double width,
int unit)
|
void |
writeText(String str)
Writes specified text on this PdfPage . |
void |
writeText(String str,
boolean wrap)
Writes text str with specified wrap setting on
this |
void |
writeText(String str,
double x,
double y)
Writes text str at position (x ,
y ). |
void |
writeText(String str,
double x,
double y,
boolean wrap)
Writes text str at position
(x , y ) with specified wrap setting. |
void |
writeText(String str,
double x,
double y,
double rotation)
Writes text str , rotated by
rotation degrees, at position (x ,
y ). |
void |
writeText(String str,
double x,
double y,
int alignment)
Writes text str at position (x ,
y ) with specified alignment. |
void |
writeText(String str,
double x,
double y,
int alignment,
boolean wrap)
Writes str at position (x ,
y ) with specified alignment and wrap setting. |
void |
writeText(String str,
int alignment)
Writes str with specified alignment. |
void |
writeText(String str,
int alignment,
boolean wrap)
Writes text str with specified alignment and
wrap setting. |
void |
writeText(String str,
PdfFont f)
Writes specified text with specified font. |
void |
writeText(String str,
PdfFont f,
boolean wrap)
Writes text str with specified font and wrap
setting. |
void |
writeText(String str,
PdfFont f,
double x,
double y)
Writes text str at position
(x , y ) with specified font. |
void |
writeText(String str,
PdfFont f,
double x,
double y,
boolean wrap)
Writes text str at position (x ,
y ) with specified font and wrap setting. |
void |
writeText(String str,
PdfFont f,
double x,
double y,
double rotation)
Writes text str , rotated by
rotation degrees, at specified position with
specified font. |
void |
writeText(String str,
PdfFont f,
int alignment)
Writes text str with specified font and
alignment. |
void |
writeText(String str,
PdfFont f,
int alignment,
boolean wrap)
Writes text str with specified font, alignment,
and wrap setting. |
void |
writeText(String str,
PdfFont f,
int alignment,
double x,
double y)
Writes text str at position (x ,
y ) with specified font and alignement |
void |
writeText(String str,
PdfFont f,
int alignment,
double x,
double y,
boolean wrap)
Writes text str at position (x ,
y ) with specified font, alignment, and wrap
setting. |
void |
writeText(String str,
PdfFont f,
int alignment,
PdfPoint p)
Writes text str with specified font and
alignment at specified point. |
void |
writeText(String str,
PdfFont f,
int alignment,
PdfPoint p,
boolean wrap)
Writes text str with specified font, alignment,
and wrap setting at specified point. |
void |
writeText(String str,
PdfFont f,
PdfPoint p)
Writes text str with specified font at specified
point. |
void |
writeText(String str,
PdfFont f,
PdfPoint p,
boolean wrap)
Writes text str with specified font and wrap
setting at specified point. |
void |
writeText(String str,
PdfFont f,
PdfPoint p,
double rotation)
Writes text str , rotated by
rotation degrees, at specified point with
specified font. |
void |
writeText(String str,
PdfFont f,
PdfRect rect)
Writes text str with specified font inside
specified rectangle. |
void |
writeText(String str,
PdfFont f,
PdfRect rect,
double rotation,
double firstLinePosition)
Writes text str , rotated by
rotation degrees, with specified font and
first-line position inside specified rectangle. |
void |
writeText(String str,
PdfFont f,
PdfRect rect,
int alignment)
Writes text str with specified font and
alignment inside specified rectangle. |
void |
writeText(String str,
PdfFont f,
PdfRect rect,
int alignment,
double rotation,
double firstLinePosition)
Writes text str , rotated by
rotation degrees, with specified font,
alignment, and first-line position inside specified rectangle. |
void |
writeText(String str,
PdfPoint p)
Writes specified text at specified point. |
void |
writeText(String str,
PdfPoint p,
boolean wrap)
Writes text str with specified wrap setting at
specified point. |
void |
writeText(String str,
PdfPoint p,
double rotation)
Writes text str , rotated by
rotation degrees, at specified point. |
void |
writeText(String str,
PdfPoint p,
int alignment)
Writes text str with specified alignment at specified point. |
void |
writeText(String str,
PdfPoint p,
int alignment,
boolean wrap)
Writes text str with specified alignment and
wrap setting at specified point. |
void |
writeText(String str,
PdfRect rect)
Writes specified text inside specified rectanlge. |
void |
writeText(String str,
PdfRect rect,
double rotation,
double firstLinePosition)
Writes text str , rotated by
rotation degrees, with specified first-line
position inside specified rectangle. |
void |
writeText(String str,
PdfRect rect,
int alignment)
Writes text str with specified alignment inside
specified rectangle. |
void |
writeText(String str,
PdfRect rect,
int alignment,
double rotation,
double firstLinePosition)
Writes text str , rotated by
rotation degrees, with specified alignment and
first-line position inside specified rectangle. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int HP_LEFT
public static final int HP_MIDDLE
public static final int HP_RIGHT
public static final int VP_TOP
public static final int VP_CENTRE
public static final int VP_BOTTOM
public static final boolean UNDERLAY
public static final boolean OVERLAY
public static final int COLORSPACE_RGB
public static final int COLORSPACE_CMYK
Constructor Detail |
public PdfPage()
public PdfPage(int pageSize)
public PdfPage(double width, double height)
public PdfPage(double width, double height, int measurementUnit)
public PdfPage(int pageSize, double pageLeftMargin, double pageTopMargin, double pageRightMargin, double pageBottomMargin, int measurementUnit)
public PdfPage(double width, double height, double pageLeftMargin, double pageTopMargin, double pageRightMargin, double pageBottomMargin, int measurementUnit)
public PdfPage(int pageSize, double pageHeaderHeight, double pageFooterHeight, double pageLeftMargin, double pageTopMargin, double pageRightMargin, double pageBottomMargin, int measurementUnit)
public PdfPage(double width, double height, double pageHeaderHeight, double pageFooterHeight, double pageLeftMargin, double pageTopMargin, double pageRightMargin, double pageBottomMargin, int measurementUnit)
Method Detail |
public Object clone()
public double getDisplayDuration()
public void setDisplayDuration(double displayDuration)
public PdfPagePresentation getPresentation()
public void setPresentation(PdfPagePresentation presentation)
public void addTable(PdfTable table, double x, double y) throws PdfException, IOException
PdfException
IOException
public void setWidth(double width, int unit)
public void setHeight(double height, int unit) throws IOException, PdfException
IOException
PdfException
public void flattenFormFields(boolean flattenWithNewValue) throws IOException, PdfException
IOException
PdfException
public void flattenFormFields(int type, boolean flattenWithNewValue) throws IOException, PdfException
IOException
PdfException
public void flattenFormFields(String name, boolean flattenWithNewValue) throws IOException, PdfException
IOException
PdfException
public void flattenFormFields() throws IOException, PdfException
IOException
PdfException
public void flattenFormFields(int type) throws IOException, PdfException
IOException
PdfException
public void flattenFormFields(String name) throws IOException, PdfException
IOException
PdfException
public void deleteFormFields() throws IOException, PdfException
IOException
PdfException
public void deleteFormFields(int type) throws IOException, PdfException
IOException
PdfException
public void deleteFormFields(String name) throws IOException, PdfException
IOException
PdfException
public void getAllAnnotations(List listToPopulate) throws IOException, PdfException
IOException
PdfException
public void getAllAnnotations(int type, List listToPopulate) throws PdfException, IOException
PdfException
IOException
public List getAllAnnotations(int type) throws PdfException, IOException
PdfException
IOException
public List getAllAnnotations() throws PdfException, IOException
PdfException
IOException
public List getAllFormFields() throws PdfException, IOException
PdfException
IOException
public List getAllFormFields(String name) throws PdfException, IOException
PdfException
IOException
public List getAllFormFields(int type) throws PdfException, IOException
PdfException
IOException
public void addAnnotation(PdfAnnot annotation) throws PdfException
com.gnostice.pdfone.PdfStdPage
PdfPage
.
annotation
- a link or text annotation
PdfException
- if an illegal argument is supplied.public void addAnnotationList(List annotList) throws PdfException
PdfException
public void addAnnotationList(List annotList, boolean removeExistingAnnots) throws PdfException
PdfException
public void addFormField(PdfFormField f)
public void addFormFieldList(List formFieldList)
public void addThumbnailImage(String path) throws IOException, PdfException
IOException
PdfException
public void removeThumbnailImage()
public void setMeasurementUnit(int mu)
PdfPage
.
mu
- constant specifying the new default measurement unitPdfStdPage.getMeasurementUnit()
public int getMeasurementUnit()
PdfPage
.
PdfStdPage.setMeasurementUnit(int)
public void setPenWidth(double width)
width
- default width for the page's penpublic void setPenColor(Color color)
color
- default color for the page's penpublic void setPenDashLength(double length)
length
- length of dashes in the default dash patternPdfStdPage.setPenDashGap(double)
,
PdfStdPage.setPenDashPhase(double)
public void setPenDashGap(double gap)
gap
- length of gaps in the default dash patternPdfStdPage.setPenDashLength(double)
,
PdfStdPage.setPenDashPhase(double)
public void setPenDashPhase(double phase)
phase
- length of phase of the default dash patternPdfStdPage.setPenDashGap(double)
,
PdfStdPage.setPenDashLength(double)
public void setPenCapStyle(int capStyle)
capStyle
- constant specifying the default shapePdfPen
public void setPenJoinStyle(int joinStyle)
joinStyle
- constant specifying the default shapePdfPen
,
PdfStdPage.setPenCapStyle(int)
public void setPenMiterLimit(int limit)
limit
- default miter limit for the page's penpublic void setBrushColor(Color c)
c
- default color for the page's brushpublic PdfTextFormatter getTextFormatter()
PdfTextFormatter
object contained by
this PdfPage
.
PdfTextFormatter
object contained by the
PdfPage
PdfStdPage.setTextFormatter(PdfTextFormatter)
public void setTextFormatter(PdfTextFormatter tf)
tf
- new text formatting settingsPdfStdPage.getTextFormatter()
public void disableAllMargins()
PdfPage
.
PdfStdPage.enableAllMargins()
public void enableAllMargins()
PdfPage
.
PdfStdPage.disableAllMargins()
public double getBottomMargin()
public double getFooterHeight()
public double getHeaderHeight()
public double getLeftMargin()
public double getRightMargin()
public double getTopMargin()
public PdfBrush getBrush()
public double getCropBottom()
public double getCropLeft()
public double getCropRight()
public double getCropTop()
public double getHeight()
public double getWidth()
public PdfPen getPen()
PdfPen
object representing this page's
pen.
PdfPen
object representing the page's
pen.PdfStdPage.setPen(PdfPen)
public void setPen(PdfPen pen)
PdfPen
object as this page's pen.
pen
- PdfPen
object to be set as this
page's penPdfStdPage.getPen()
public int getRotation()
public void setCph(PdfCustomPlaceholderHandler cph)
public void setColorSpace(int colorspace) throws PdfException
PdfException
public int getColorSpace()
public void addAction(int event, int actionType, String javascriptOrURI) throws PdfException
event
- constant specifying trigger event for executing the
actionactionType
- constant specifying resolution of URI or execution
of JavaScript scriptjavascriptOrURI
- specified URI or Javascript script
PdfException
- if an illegal argument is supplied.PdfAction
,
PdfAction.PdfEvent
public void addAction(int event, int actionType, String applicationToLaunch, boolean isPrint) throws PdfException
event
- constant specifying the trigger event for executing
the named actionactionType
- constant specifying action of launching an
application, or displaying or printing a fileapplicationToLaunch
- pathname of the application that needs to be
launched or the file that needs to be displayed or
printedisPrint
- whether to file needs to be printed instead of
being displayed
PdfException
- if an illegal argument is supplied.PdfAction
,
PdfAction.PdfEvent
public void addAction(int event, int namedAction) throws PdfException
event
- constant specifying the trigger event for executing
the named actionnamedAction
- constant specifying the named action that needs to
be executed when the trigger event occurs
PdfException
- if an illegal argument is supplied.PdfAction
,
PdfAction.PdfEvent
public void addWatermarkText(String text, PdfFont font, int position, boolean applyMargins, double angle, boolean underlay) throws IOException, PdfException
position
and
applyMargins
.
The text is rotated on center of its bounding box by
angle
degrees in anti-clockwise direction.
text
- text that needs to be added as the watermarkfont
- font with which the watermark needs to be writtenposition
- constant specifying the combination of vertical and
horizontal alignment of the textapplyMargins
- whether page margins need to be considered when
positioning the textangle
- (measured in anti-clockwise direction and expressed
in degrees) tilt of the text with reference to
center of its bounding boxunderlay
- whether the text needs to be placed underneath other
page contents
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void addWatermarkText(String text, PdfFont font, int position, double angle, boolean underlay) throws IOException, PdfException
The text is rotated on center of its bounding box by
angle
degrees in anti-clockwise direction.
text
- text that needs to be added as the watermarkfont
- font with which the watermark needs to be writtenposition
- constant specifying the combination of vertical and
horizontal alignment of the textangle
- (measured in anti-clockwise direction and expressed
in degrees) tilt of the text with reference to
center of its bounding boxunderlay
- whether the text needs to be placed underneath
other page contents
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void addWatermarkImage(PdfImage image, int position, boolean applyMargins, double angle, boolean underlay) throws IOException, PdfException
PdfImage
object as watermark image with its
exact position determined by position
and
applyMargins
.
The image is rotated on center of its bounding box by
angle
degrees in anti-clockwise direction.
image
- PdfImage
object that needs to be used
as the watermark imageposition
- constant specifying the combination of vertical and
horizontal alignment of the imageapplyMargins
- whether page margins need to be considered when
positioning the imageangle
- (measured in anti-clockwise direction and expressed
in degrees) tilt of the image with reference to
center of its bounding boxunderlay
- whether the image needs to be placed underneath
other page contents
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void addWatermarkImage(PdfImage image, int position, double angle, boolean underlay) throws IOException, PdfException
PdfImage
object as watermark image.
The image is rotated on center of its bounding box by
angle
degrees in anti-clockwise direction.
image
- PdfImage
object that needs to be used
as the watermark imageposition
- constant specifying the combination of vertical and
horizontal alignment of the imageangle
- (measured in anti-clockwise direction and expressed
in degrees) tilt of the image with reference to
center of its bounding boxunderlay
- whether the image needs to be placed underneath
other page contents
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void addWatermarkImage(String path, int position, boolean applyMargins, double angle, boolean underlay) throws IOException, PdfException
position
and applyMargins
.
The image is rotated on center of its bounding box by
angle
degrees in anti-clockwise direction.
path
- pathname of the watermark imageposition
- constant specifying the combination of vertical and
horizontal alignment of the imageapplyMargins
- whether page margins need to be considered when
positioning the imageangle
- (measured in anti-clockwise direction and expressed
in degrees) tilt of the image with reference to
center of its bounding boxunderlay
- whether the image needs to be placed underneath
other page contents
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void addWatermarkImage(String path, int position, double angle, boolean underlay) throws IOException, PdfException
The image is rotated on center of its bounding box by
angle
degrees in anti-clockwise direction.
path
- pathname of the watermark imageposition
- constant specifying the combination of vertical and
horizontal alignment of the imageangle
- (measured in anti-clockwise direction and expressed
in degrees) tilt of the image with reference to
center of its bounding boxunderlay
- whether the image needs to be placed underneath
other page contents
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void addHeaderText(String text, PdfFont font, int position, boolean underlay) throws IOException, PdfException
text
- text that needs to be added to the headerfont
- font with which the text needs to be writtenposition
- constant specifying the combination of vertical and
horizontal alignment of the text within the headerunderlay
- whether the text needs to be placed underneath other
content in the header
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void addHeaderImage(PdfImage img, int position, boolean underlay) throws IOException, PdfException
PdfImage
object to the header.
img
- PdfImage
object that needs to be
added to the headerposition
- constant specifying the combination of vertical and
horizontal alignment of the image within the headerunderlay
- whether the image needs to be placed underneath
other content in the header
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void addHeaderImage(String path, int position, boolean underlay) throws IOException, PdfException
path
- pathname of the image, which needs to be added to
the headerposition
- constant specifying the combination of vertical and
horizontal alignment of the image within the headerunderlay
- whether the image needs to be placed underneath
other content in the header
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void addFooterText(String text, PdfFont font, int position, boolean underlay) throws IOException, PdfException
text
- text that needs to be added to the footerfont
- font with which the text next needs to be writtenposition
- constant specifying the combination of vertical and
horizontal alignment of the text within the footerunderlay
- whether the text needs to be placed underneath other
content in the footer
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void addFooterImage(PdfImage img, int position, boolean underlay) throws IOException, PdfException
PdfImage
object to footer.
img
- PdfImage
object that needs to be
added to the footerposition
- constant specifying the combination of vertical and
horizontal alignment of the image within the footerunderlay
- whether the image needs to be placed underneath
other content in the footer
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void addFooterImage(String path, int position, boolean underlay) throws IOException, PdfException
path
- pathname of the image, which needs to be added to
the footerposition
- constant specifying the combination of vertical and
horizontal alignment of the image within the footerunderlay
- whether the image needs to be placed underneath
other content in the footer
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void writeText(String str) throws IOException, PdfException
PdfPage
.
str
- text that needs to be written
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void writeText(String str, int alignment, boolean wrap) throws IOException, PdfException
str
with specified alignment and
wrap setting.
str
- text that needs to be writtenalignment
- constant specifying how the text needs to be alignedwrap
- constant specifying how the text needs to be aligned
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void writeText(String str, boolean wrap) throws IOException, PdfException
str
with specified wrap setting on
this
str
- text that needs to be writtenwrap
- constant specifying whether the text needs to be
wrapped
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.PdfTextFormatter
public void writeText(String str, int alignment) throws IOException, PdfException
str
with specified alignment.
str
- text that needs to be writtenalignment
- constant specifying how the text needs to be
aligned
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.PdfTextFormatter
public void writeText(String str, PdfFont f) throws IOException, PdfException
str
- text that needs to be writtenf
- font with which the text needs to be written
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void writeText(String str, PdfFont f, int alignment, boolean wrap) throws IOException, PdfException
str
with specified font, alignment,
and wrap setting.
str
- text that needs to be writtenf
- font with which the text needs to be writtenalignment
- constant specifying how the text needs to be alignedwrap
- constant specifying whether the text needs to be
wrapped
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void writeText(String str, PdfFont f, boolean wrap) throws IOException, PdfException
str
with specified font and wrap
setting.
str
- text that needs to be writtenf
- font with which the text needs to be writtenwrap
- constant specifying whether the text needs to be
wrapped
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.PdfTextFormatter
public void writeText(String str, PdfFont f, int alignment) throws IOException, PdfException
str
with specified font and
alignment.
str
- text that needs to be writtenf
- font with which the text needs to be writtenalignment
- constant specifying how the text needs to be aligned
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.PdfTextFormatter
public void writeText(String str, double x, double y) throws IOException, PdfException
str
at position (x
,
y
).
str
- text that needs to be writtenx
- x-coordinate of the position where the text needs to
be writteny
- y-coordinate of the position where the text needs to
be written
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void writeText(String str, PdfPoint p) throws IOException, PdfException
str
- text that needs to be writtenp
- PdfPoint
where the text needs to be
written
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void writeText(String str, double x, double y, int alignment) throws IOException, PdfException
str
at position (x
,
y
) with specified alignment.
str
- text that needs to be writtenx
- x-coordinate of the position where the text needs to
be writteny
- y-coordinate of the position where the text needs to
be writtenalignment
- constant specifying how the text needs to be aligned
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.PdfTextFormatter
public void writeText(String str, PdfPoint p, int alignment) throws IOException, PdfException
str
with specified alignment at specified point.
str
- text that needs to be writtenp
- PdfPoint
where the text needs to be
writtenalignment
- constant specifying how the text needs to be aligned
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.PdfTextFormatter
public void writeText(String str, PdfFont f, double x, double y) throws IOException, PdfException
str
at position
(x
, y
) with specified font.
str
- text that needs to be writtenf
- font with which the text needs to be writtenx
- x-coordinate of the position where the text needs to
be writteny
- y-coordinate of the position where the text needs to
be written
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void writeText(String str, PdfFont f, PdfPoint p) throws IOException, PdfException
str
with specified font at specified
point.
str
- text that needs to be writtenf
- font with which the text needs to be writtenp
- PdfPoint
where the text needs to be
written
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void writeText(String str, PdfFont f, int alignment, double x, double y) throws IOException, PdfException
str
at position (x
,
y
) with specified font and alignement
str
- text that needs to be writtenf
- font with which the text needs to be writtenalignment
- constant specifying how the text needs to be alignedx
- x-coordinate of the position where the text needs to
be writteny
- y-coordinate of the position where the text needs to
be written
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.PdfTextFormatter
public void writeText(String str, PdfFont f, int alignment, PdfPoint p) throws IOException, PdfException
str
with specified font and
alignment at specified point.
str
- text that needs to be writtenf
- font with which the text needs to be writtenalignment
- constant specifying how the text needs to be alignedp
- PdfPoint
where the text needs to be
written
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void writeText(String str, PdfFont f, double x, double y, boolean wrap) throws IOException, PdfException
str
at position (x
,
y
) with specified font and wrap setting.
str
- text that needs to be writtenf
- font with which the text needs to be writtenx
- x-coordinate of the position where the text needs to
be writteny
- y-coordinate of the position where the text needs to
be writtenwrap
- constant specifying whether the text needs to be
wrapped
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.PdfTextFormatter
public void writeText(String str, PdfFont f, PdfPoint p, boolean wrap) throws IOException, PdfException
str
with specified font and wrap
setting at specified point.
str
- text that needs to be writtenf
- font with which the text needs to be writtenp
- PdfPoint
where the text needs to be
writtenwrap
- constant specifying whether the text needs to be
wrapped
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.PdfTextFormatter
public void writeText(String str, PdfFont f, int alignment, double x, double y, boolean wrap) throws IOException, PdfException
str
at position (x
,
y
) with specified font, alignment, and wrap
setting.
str
- text that needs to be writtenf
- font with which the text needs to be writtenalignment
- constant specifying how the text needs to be alignedx
- x-coordinate of the position where the text needs to
be writteny
- y-coordinate of the position where the text needs to
be writtenwrap
- constant specifying whether the text needs to be
wrapped
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.PdfTextFormatter
public void writeText(String str, PdfFont f, int alignment, PdfPoint p, boolean wrap) throws IOException, PdfException
str
with specified font, alignment,
and wrap setting at specified point.
str
- text that needs to be writtenf
- font with which the text needs to be writtenalignment
- constant specifying how the text needs to be alignedp
- PdfPoint
where the text needs to be
writtenwrap
- constant specifying whether the text needs to be
wrapped
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.PdfTextFormatter
public void writeText(String str, double x, double y, boolean wrap) throws IOException, PdfException
str
at position
(x
, y
) with specified wrap setting.
str
- text that needs to be writtenx
- x-coordinate of the position where the text needs to
be writteny
- y-coordinate of the position where the text needs to
be writtenwrap
- constant specifying how the text needs to be aligned
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.PdfTextFormatter
public void writeText(String str, PdfPoint p, boolean wrap) throws IOException, PdfException
str
with specified wrap setting at
specified point.
str
- text that needs to be writtenp
- PdfPoint
where the text needs to be
writtenwrap
- constant specifying whether the text needs to be
wrapped
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.PdfTextFormatter
public void writeText(String str, double x, double y, int alignment, boolean wrap) throws IOException, PdfException
str
at position (x
,
y
) with specified alignment and wrap setting.
str
- text that needs to be writtenx
- x-coordinate of the position where the text needs to
be writteny
- y-coordinate of the position where the text needs to
be writtenalignment
- constant specifying how the text needs to be alignedwrap
- constant specifying whether the text needs to be
wrapped
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void writeText(String str, PdfPoint p, int alignment, boolean wrap) throws IOException, PdfException
str
with specified alignment and
wrap setting at specified point.
str
- text that needs to be writtenp
- PdfPoint
where the text needs to be
writtenalignment
- constant specifying how the text needs to be alignedwrap
- constant specifying whether the text needs to be
wrapped
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void writeText(String str, PdfPoint p, double rotation) throws IOException, PdfException
str
, rotated by
rotation
degrees, at specified point.
The text is rotated on center of its bounding box by
rotation
degrees in anti-clockwise direction.
This method is recommended only for writing rotated
single-line text. For writing rotated multi-line
text, the PdfStdPage.writeText(String, PdfRect, double, double)
method is preferred.
str
- text that needs to be writtenp
- PdfPoint
where the text needs to be
writtenrotation
- (measured in anti-clockwise direction and expressed
in degrees) tilt of the text with reference to
center of its bounding box
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void writeText(String str, double x, double y, double rotation) throws IOException, PdfException
str
, rotated by
rotation
degrees, at position (x
,
y
).
The text is rotated on center of its bounding box by
rotation
degrees in anti-clockwise direction.
str
- text that needs to be writtenx
- x-coordinate of the position where the text needs to
be writteny
- y-coordinate of the position where the text needs to
be writtenrotation
- (measured in anti-clockwise direction and expressed
in degrees) tilt of the text with reference to
center of its bounding box
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void writeText(String str, PdfFont f, PdfPoint p, double rotation) throws IOException, PdfException
str
, rotated by
rotation
degrees, at specified point with
specified font.
The text is rotated on center of its bounding box by
rotation
degrees in anti-clockwise direction.
This method is recommended only for writing
rotated single-line text. For writing rotated
multi-line text, the
PdfStdPage.writeText(String, PdfFont, PdfRect, double, double)
method is preferred over this.
str
- text that needs to be writtenf
- font with which the text needs to be writtenp
- PdfPoint
where the text needs to be
writtenrotation
- (measured in anti-clockwise direction and expressed
in degrees) tilt of the text with reference to
center of its bounding box
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void writeText(String str, PdfFont f, double x, double y, double rotation) throws IOException, PdfException
str
, rotated by
rotation
degrees, at specified position with
specified font.
The text is rotated on center of its bounding box by
rotation
degrees in anti-clockwise direction.
str
- text that needs to be writtenf
- font with which the text needs to be writtenx
- x-coordinate of the position where the text needs to
be writteny
- y-coordinate of the position where the text needs to
be writtenrotation
- (measured in anti-clockwise direction and expressed
in degrees) tilt of the text with reference to
center of its bounding box
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void writeText(String str, PdfRect rect) throws IOException, PdfException
str
- text that needs to be writtenrect
- rectangle inside which the text needs to be written
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void writeText(String str, PdfRect rect, double rotation, double firstLinePosition) throws IOException, PdfException
str
, rotated by
rotation
degrees, with specified first-line
position inside specified rectangle.
The text is rotated on center of its bounding box by
rotation
degrees in anti-clockwise direction.
str
- text that needs to be writtenrect
- rectangle inside which the text needs to be writtenrotation
- (measured in anti-clockwise direction and expressed
in degrees) tilt of the text with reference to
center of its bounding boxfirstLinePosition
- position inside the rectangle where the first line
of text should begin
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void writeText(String str, PdfRect rect, int alignment) throws IOException, PdfException
str
with specified alignment inside
specified rectangle.
str
- text that needs to be writtenrect
- rectangle inside which the text needs to be writtenalignment
- constant specifying how the text needs to be
aligned inside the rectangle
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.PdfTextFormatter
public void writeText(String str, PdfRect rect, int alignment, double rotation, double firstLinePosition) throws IOException, PdfException
str
, rotated by
rotation
degrees, with specified alignment and
first-line position inside specified rectangle.
The text is rotated on center of its bounding box by
rotation
degrees in anti-clockwise direction.
str
- text that needs to be writtenrect
- rectangle inside which the text needs to be writtenalignment
- constant specifying how the text needs to be aligned
inside the rectanglerotation
- (measured in anti-clockwise direction and expressed
in degrees) tilt of the text with reference to
center of its bounding boxfirstLinePosition
- position inside the rectangle where the first line
of text should begin
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void writeText(String str, PdfFont f, PdfRect rect) throws IOException, PdfException
str
with specified font inside
specified rectangle.
str
- text that needs to be writtenf
- font with which the text needs to be writtenrect
- rectangle inside which the text needs to be written
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void writeText(String str, PdfFont f, PdfRect rect, double rotation, double firstLinePosition) throws IOException, PdfException
str
, rotated by
rotation
degrees, with specified font and
first-line position inside specified rectangle.
The text is rotated on center of its bounding box by
rotation
degrees in anti-clockwise direction.
str
- text that needs to be writtenf
- font with which the text needs to be writtenrect
- rectangle inside which the text needs to be writtenrotation
- (measured in anti-clockwise direction and expressed
in degrees) tilt of the text with reference to
center of its bounding boxfirstLinePosition
- position inside the rectangle where the first line
of text should begin
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void writeText(String str, PdfFont f, PdfRect rect, int alignment) throws IOException, PdfException
str
with specified font and
alignment inside specified rectangle.
str
- text that needs to be writtenf
- font with which the text needs to be writtenrect
- rectangle inside which the text needs to be writtenalignment
- constant specifying how the text needs to be aligned
inside the rectangle
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.PdfTextFormatter
public void writeText(String str, PdfFont f, PdfRect rect, int alignment, double rotation, double firstLinePosition) throws IOException, PdfException
str
, rotated by
rotation
degrees, with specified font,
alignment, and first-line position inside specified rectangle.
The text is rotated on center of its bounding box by
rotation
degrees in anti-clockwise direction.
str
- text that needs to be writtenf
- font with which the text needs to be writtenrect
- rectangle inside which the text needs to be writtenalignment
- constant specifying how the text needs to be aligned
inside the rectanglerotation
- (measured in anti-clockwise direction and expressed
in degrees) tilt of the text with reference to
center of its bounding boxfirstLinePosition
- position inside the rectangle where the first line
of text should begin
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void drawImage(String path, double x, double y) throws IOException, PdfException
x
, y
).
path
- pathname of the image filex
- x-coordinate of the position where the image needs
to be drawny
- y-coordinate of the position where the image needs
to be drawn
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void drawImage(String path, double x, double y, double width, double height) throws IOException, PdfException
x
,
y
) with specified width and height.
path
- pathname of the image filex
- x-coordinate of the position where the image needs
to be drawny
- y-coordinate of the position where the image needs
to be drawnwidth
- width of the imageheight
- height of the image
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void drawImage(String path, PdfPoint p) throws IOException, PdfException
p
.
path
- pathname of the image filep
- point where the image needs to be drawn
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void drawImage(String path, PdfPoint p, double width, double height) throws IOException, PdfException
p
with specified width and height.
path
- pathname of the image filep
- point where the image needs to be drawnwidth
- width of the imageheight
- height of the image
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void drawImage(String path, PdfRect rect) throws IOException, PdfException
rect
.
path
- pathname of the image filerect
- rectangle on which the image needs to be drawn
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void drawImage(PdfImage img, double x, double y) throws IOException, PdfException
x
,
y
).
img
- image that needs to be drawnx
- x-coordinate of the position where the image needs
to be drawny
- y-coordinate of the position where the image needs
to be drawn
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void drawImage(PdfImage img, double x, double y, double width, double height) throws IOException, PdfException
x
,
y
) with specified width and height.
img
- image that needs to be drawnx
- x-coordinate of the position where the image needs
to be drawny
- y-coordinate of the position where the image needs
to be drawnwidth
- width of the imageheight
- height of the image
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void drawImage(PdfImage img, PdfPoint p) throws IOException, PdfException
img
- image that needs to be drawnp
- point where the image needs to be drawn
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void drawImage(PdfImage img, PdfPoint p, double width, double height) throws IOException, PdfException
p
with specified
width and height.
img
- image that needs to be drawnp
- point where the image needs to be drawnwidth
- width of the imageheight
- height of the image
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void drawImage(PdfImage img, PdfRect rect) throws IOException, PdfException
img
- image that needs to be drawnrect
- rectangle on which the image needs to be drawn
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void drawImage(String path, double x, double y, double rotation) throws IOException, PdfException
rotation
degrees, at position (x
,
y
).
The image is rotated on center of its bounding box by
rotation
degrees in anti-clockwise direction.
path
- pathname of the image filex
- x-coordinate of the position where the image needs
to be drawny
- y-coordinate of the position where the image needs
to be drawnrotation
- (measured in anti-clockwise direction and expressed
in degrees) tilt of the image with reference to
center of its bounding box
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void drawImage(String path, double x, double y, double width, double height, double rotation) throws IOException, PdfException
rotation
degrees, at position (x
,
y
) with specified width and height.
The image is rotated on center of its bounding box by
rotation
degrees in anti-clockwise direction.
path
- pathname of the image filex
- x-coordinate of the position where the image needs
to be drawny
- y-coordinate of the position where the image needs
to be drawnwidth
- width of the imageheight
- height of the imagerotation
- (measured in anti-clockwise direction and expressed
in degrees) tilt of the image with reference to
center of its bounding box
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void drawImage(String path, PdfPoint p, double rotation) throws IOException, PdfException
rotation
degrees, at point p
.
The image is rotated on center of its bounding box by
rotation
degrees in anti-clockwise direction.
path
- pathname of the image filep
- point where the image needs to be drawnrotation
- (measured in anti-clockwise direction and expressed
in degrees) tilt of the image with reference to
center of its bounding box
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void drawImage(String path, PdfPoint p, double width, double height, double rotation) throws IOException, PdfException
rotation
degrees, at point p
with
specified width and height.
The image is rotated on center of its bounding box by
rotation
degrees in anti-clockwise direction.
path
- pathname of the image filep
- point where the image needs to be drawnwidth
- width of the imageheight
- height of the imagerotation
- (measured in anti-clockwise direction and expressed
in degrees) tilt of the image with reference to
center of its bounding box
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void drawImage(String path, PdfRect rect, double rotation) throws IOException, PdfException
rotation
degrees, on rectangle
rect
.
The image is rotated on center of its bounding box by
rotation
degrees in anti-clockwise direction.
path
- pathname of the image filerect
- rectangle on which the image needs to be drawnrotation
- (measured in anti-clockwise direction and expressed
in degrees) tilt of the image with reference to
center of its bounding box
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void drawImage(PdfImage img, double x, double y, double rotation) throws IOException, PdfException
rotation
degrees, at position (x
, y
).
The image is rotated on center of its bounding box by
rotation
degrees in anti-clockwise direction.
img
- image that needs to be drawnx
- x-coordinate of the position where the image needs
to be drawny
- y-coordinate of the position where the image needs
to be drawnrotation
- (measured in anti-clockwise direction and expressed
in degrees) tilt of the image with reference to
center of its bounding box
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void drawImage(PdfImage img, double x, double y, double width, double height, double rotation) throws IOException, PdfException
rotation
degrees, at position (x
, y
)
with specified height and width.
The image is rotated on center of its bounding box by
rotation
degrees in anti-clockwise direction.
img
- image that needs to be drawnx
- x-coordinate of the position where the image needs
to be drawny
- y-coordinate of the position where the image needs
to be drawnwidth
- width of the imageheight
- height of the imagerotation
- (measured in anti-clockwise direction and expressed
in degrees) tilt of the image with reference to
center of its bounding box
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void drawImage(PdfImage img, PdfPoint p, double rotation) throws IOException, PdfException
rotation
degrees, at point p
.
The image is rotated on center of its bounding box by
rotation
degrees in anti-clockwise direction.
img
- image that needs to be drawnp
- point where the image needs to be drawnrotation
- (measured in anti-clockwise direction and expressed
in degrees) tilt of the image with reference to
center of its bounding box
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void drawImage(PdfImage img, PdfPoint p, double width, double height, double rotation) throws IOException, PdfException
rotation
degrees, at point p
with specified width and
height.
The image is rotated on center of its bounding box by
rotation
degrees in anti-clockwise direction.
img
- image that needs to be drawnp
- point where the image needs to be drawnwidth
- width of the imageheight
- height of the imagerotation
- (measured in anti-clockwise direction and expressed
in degrees) tilt of the image with reference to
center of its bounding box
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void drawImage(PdfImage img, PdfRect rect, double rotation) throws IOException, PdfException
rotation
degrees, on specified rectangle.
The image is rotated on center of its bounding box by
rotation
degrees in anti-clockwise direction.
img
- image that needs to be drawnrect
- rectangle on which the image needs to be drawnrotation
- (measured in anti-clockwise direction and expressed
in degrees) tilt of the image with reference to
center of its bounding box
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void drawLine(double startx, double starty, double endx, double endy) throws IOException
startx
, starty
) and
(endx
, endy
).
startx
- x-coordinate of the starting position of the linestarty
- y-coordinate of the starting position of the lineendx
- x-coordinate of the ending position of the lineendy
- y-coordinate of the ending position of the line
IOException
- if an I/O error occurs.public void drawLine(PdfPoint start, PdfPoint end) throws IOException
start
and
end
.
start
- starting point of the lineend
- ending point of the line
IOException
- if an I/O error occurs.public void drawRect(PdfPoint p, double width, double height, boolean isFill, boolean isStroke) throws IOException
p
- position of the top-left corner of the rectanglewidth
- width of the rectangleheight
- height of the rectangleisFill
- whether the rectangle needs to be filledisStroke
- whether the rectangle needs to be stroked
IOException
- if an I/O error occurs.public void drawRect(double x, double y, double width, double height, boolean isFill, boolean isStroke) throws IOException
x
, y
)
with specified width, height, brush, and pen settings.
x
- x-coordinate of top-left corner of the rectangley
- y-coordinate of top-left corner of the rectanglewidth
- width of the rectangleheight
- height of the rectangleisFill
- whether the rectangle needs to be filledisStroke
- whether the rectangle needs to be stroked
IOException
- if an I/O error occurs.public void drawRect(Rectangle r) throws IOException
IOException
public void drawRect(PdfRect r) throws IOException
r
- rectangle that needs to be drawn
IOException
- if an I/O error occurs.public void drawRect(double x, double y, double width, double height) throws IOException
x
, y
)
with specified width and height.
x
- x-coordinate of top-left corner of the rectangley
- y-coordinate of top-left corner of the rectanglewidth
- width of the rectangleheight
- height of the rectangle
IOException
- if an I/O error occurs.public void drawRect(PdfPoint p, double width, double height) throws IOException
p
- position of the top-left corner of the rectanglewidth
- width of the rectangleheight
- height of the rectangle
IOException
- if an I/O error occurs.public void drawSquare(double x, double y, double length, boolean isFill, boolean isStroke) throws IOException
x
, y
)
with specified fill and stroke settings.
x
- x-coordinate of the top-left corner of the squarey
- y-coordinate of the top-left corner of the squarelength
- length of a side of the squareisFill
- whether the square needs to be filledisStroke
- whether the square needs to be stroked
IOException
- if an I/O error occurs.public void drawSquare(double x, double y, double length) throws IOException
x
, y
).
x
- x-coordinate of the top-left corner of the squarey
- y-coordinate of the top-left corner of the squarelength
- length of a side of the square
IOException
- if an I/O error occurs.public void drawSquare(PdfPoint p, double length, boolean isFill, boolean isStroke) throws IOException
p
with specified fill
and stroke settings.
p
- position of top-left corner of the rectanglelength
- length of a side of the squareisFill
- whether the square needs to be filledisStroke
- whether the square needs to be stroked
IOException
- if an I/O error occurs.public void drawSquare(PdfPoint p, double length) throws IOException
p
.
p
- position of top-left corner of the rectanglelength
- length of a side of the square
IOException
- if an I/O error occurs.public void drawBezierCurve(PdfPoint start, PdfPoint controlPoint1, PdfPoint controlPoint2, PdfPoint end, boolean isFill, boolean isStroke) throws IOException
start
- starting point of the curvecontrolPoint1
- first control point of the curvecontrolPoint2
- second control point of the curveend
- end point of the curveisFill
- whether the curve needs to be filledisStroke
- whether the curve needs to be stroked
IOException
- if an I/O error occurs.public void drawBezierCurve(double startX, double startY, double ctrlX1, double ctrlY1, double ctrlX2, double ctrlY2, double endX, double endY, boolean isFill, boolean isStroke) throws IOException
ctrlX1
, ctrlY1
) and
(ctrlX2
, ctrlY2
).
startX
- x-coordinate of starting point of the curvestartY
- y-coordinate of starting point of the curvectrlX1
- x-coordinate of first control point of the curvectrlY1
- y-coordinate of first control point of the curvectrlX2
- x-coordinate of second control point of the curvectrlY2
- y-coordinate of second control point of the curveendX
- x-coordinate of end point of the curveendY
- y-coordinate of end point of the curveisFill
- whether the curve needs to be filledisStroke
- whether the curve needs to be stroked
IOException
- if an I/O error occurs.public void drawBezierCurve(PdfPoint start, PdfPoint control, PdfPoint end, boolean isFill, boolean isStroke) throws IOException
start
- starting point of the curvecontrol
- control point of the curveend
- end point of the curveisFill
- whether the curve needs to be filledisStroke
- whether the curve needs to be stroked
IOException
- if an I/O error occurs.public void drawBezierCurve(double startX, double startY, double ctrlX, double ctrlY, double endX, double endY, boolean isFill, boolean isStroke) throws IOException
ctrlX
, ctrlY
).
startX
- x-coordinate of starting point of the curvestartY
- y-coordinate of starting point of the curvectrlX
- x-coordinate of control point of the curvectrlY
- y-coordinate of control point of the curveendX
- x-coordinate of end point of the curveendY
- y-coordinate of end point of the curveisFill
- whether the curve needs to be filledisStroke
- whether the curve needs to be stroked
IOException
- if an I/O error occurs.public void drawEllipse(double x1, double y1, double x2, double y2, boolean isFill, boolean isStroke) throws IOException
x1
, y1
) and its bottom-right
corner at (x2
, y2
).
x1
- x-coordinate of the top-left corner of the
ellipse's bounding boxy1
- y-coordinate of the top-left corner of the
ellipse's bounding boxx2
- x-coordinate of the bottom-right corner of the
ellipse's bounding boxy2
- y-coordinate of the bottom-right corner of the
ellipse's bounding boxisFill
- whether the ellipse needs to be filledisStroke
- whether the ellipse needs to be stroked
IOException
- if an I/O error occurs.public void drawEllipse(PdfPoint p1, PdfPoint p2, boolean isFill, boolean isStroke) throws IOException
point1
and its bottom-right corner at
point2
.
p1
- top-left corner of the ellipse's bounding boxp2
- bottom-right corner of the ellipse's bounding boxisFill
- whether the ellipse needs to be filledisStroke
- whether the ellipse needs to be stroked
IOException
- if an I/O error occurs.public void drawCircle(double x, double y, double radius, boolean isFill, boolean isStroke) throws IOException
x
, y
).
x
- x-coordinate of the center of the circley
- y-coordinate of the center of the circleradius
- radius of the circleisFill
- whether the circle needs to be filledisStroke
- whether the circle needs to be stroked
IOException
- if an I/O error occurs.public void drawCircle(PdfPoint center, double radius, boolean isFill, boolean isStroke) throws IOException
center
- position of the center of the circleradius
- radius of the circleisFill
- whether the circle needs to be filledisStroke
- whether the circle needs to be stroked
IOException
- if an I/O error occurs.public void drawPolyline(double[] xPoints, double[] yPoints, int nPoints) throws IOException, PdfException
xPoints
- array containing x-coordinates of the kinks in the
polylineyPoints
- array containing y-coordinates of the kinks in the
polylinenPoints
- number of kinks in the polyline
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void drawPolygon(double[] xPoints, double[] yPoints, int nPoints, boolean isFill, boolean isStroke) throws IOException, PdfException
xPoints
- array containing x-coordinates of the corners of
the polygonyPoints
- array containing y-coordinates of the corners of
the polygonnPoints
- number of sides of the polygonisFill
- whether the polygon needs to be filledisStroke
- whether the polygon needs to be stroked
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public void drawArc(PdfRect rect, double startAngle, double sweepAngle) throws IOException
rect
specifies bounding
box of an imaginary circle, which completes the arc. The arc
begins at startAngle
degrees and spans for
sweepAngle
degrees. startAngle
is
measured in anti-clockwise direction.
rect
- bounding box of the imaginary circle that completes
the arcstartAngle
- (measured in anti-clockwise direction and expressed
in degrees) angle from which the arc needs to beginsweepAngle
- (expressed in degrees) angle for which the arc needs
to span
IOException
- if an I/O error occurs.public void drawPie(double x, double y, double width, double height, double startAngle, double sweepAngle, boolean isFill, boolean isStroke) throws IOException
x
, y
) represents the top-left
corner of the bounding box of an imaginary ellipse, which
the pie segment can neatly fit into.
x
- x-coordinate of top-left corner of the bounding box
of the imaginary ellipse that contains the pie
segmenty
- x-coordinate of top-left corner of the bounding box
of the imaginary ellipse that contains the pie
segmentwidth
- width of the bounding box of the imaginary ellipse
that contains the pie segmentheight
- height of the bounding box of the imaginary ellipse
that contains the pie segmentstartAngle
- (measured in anti-clockwise direction and expressed
in degrees) angle from which the pie segment needs
to startsweepAngle
- (expressed in degrees) angle for which the pie
segment needs to spanisFill
- whether the pie segment needs to be filledisStroke
- whether the pie segment needs to be stroked
IOException
- if an I/O error occurs.public void drawRoundRect(PdfRect rect, double arcWidth, double arcHeight, boolean isFill, boolean isStroke) throws IOException
rect
with specified rounded
corners.
rect
- rectangle that needs to be drawnarcWidth
- width of the rounded cornersarcHeight
- height of the rounded cornersisFill
- whether the rectangle needs to be filledisStroke
- whether the rectangle needs to be stroked
IOException
- if an I/O error occurs.public void drawRoundRect(double x, double y, double width, double height, double arcWidth, double arcHeight, boolean isFill, boolean isStroke) throws IOException
arcWidth
and arcHeight
. The
dimensions of the whole rectangle are specified by
width
and height
.
x
- x-coordinate of top-left corner of the rectangley
- y-coordinate of top-left corner of the rectanglewidth
- width of the rectangleheight
- height of the rectanglearcWidth
- width of the rounded cornersarcHeight
- height of the rounded cornersisFill
- whether the rectangle needs to be filledisStroke
- whether the rectangle needs to be stroked
IOException
|
Pro. Ed. v1.41 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |