com.pdfjet
Class Page

java.lang.Object
  extended by com.pdfjet.Page

public class Page
extends java.lang.Object

Used to create PDF page objects. Please note:

  The coordinate (0f, 0f) is the top left corner of the page.
  The size of the pages are represented in points.
  1 point is 1/72 inches.
  


Constructor Summary
Page(PDF pdf, float[] pageSize)
          Creates page object and add it to the PDF document.
Page(PDF pdf, float[] pageSize, boolean addPageToPDF)
          Creates page object and add it to the PDF document.
Page(PDF pdf, java.util.Map<java.lang.Integer,PDFobj> objects, PDFobj pageObj)
           
 
Method Summary
 void addBMC(java.lang.String structure, java.lang.String altDescription, java.lang.String actualText)
           
 void addBMC(java.lang.String structure, java.lang.String language, java.lang.String altDescription, java.lang.String actualText)
           
 Destination addDestination(java.lang.String name, float yPosition)
          Adds destination to this page.
 void addEMC()
           
 Font addFontResource(CoreFont coreFont)
           
 void append(byte[] buffer)
          Appends the specified array of bytes to the page.
 void bezierCurveTo(Point p1, Point p2, Point p3)
          Draws a bezier curve starting from the current point.
 void clipPath()
          Clips the path.
 void clipRect(float x, float y, float w, float h)
           
 void closePath()
          Closes the path and draws it using the current pen color.
 void complete()
           
 void drawCircle(double x, double y, double r)
          Draws a circle on the page.
 void drawCircle(double x, double y, double r, char operation)
          Draws the specified circle on the page and fills it with the current brush color.
 void drawCircle(float x, float y, float r)
          Draws a circle on the page.
 void drawEllipse(double x, double y, double r1, double r2)
          Draws an ellipse on the page using the current pen color.
 void drawEllipse(float x, float y, float r1, float r2)
          Draws an ellipse on the page using the current pen color.
 void drawLine(double x1, double y1, double x2, double y2)
          Draws a line on the page, using the current color, between the points (x1, y1) and (x2, y2).
 void drawLine(float x1, float y1, float x2, float y2)
          Draws a line on the page, using the current color, between the points (x1, y1) and (x2, y2).
 void drawPath(java.util.List<Point> path, char operation)
          Draws or fills the specified path using the current pen or brush.
 void drawPoint(Point p)
          Draws a point on the page using the current pen color.
 void drawRect(double x, double y, double w, double h)
          Draws the outline of the specified rectangle on the page.
 void drawRect(float x, float y, float w, float h)
          Draws the outline of the specified rectangle on the page.
 void drawRectRoundCorners(float x, float y, float w, float h, float r1, float r2, char operation)
           
 void drawString(Font font1, Font font2, java.lang.String str, float x, float y)
          Draws the text given by the specified string, using the specified main font and the current brush color.
 void drawString(Font font, java.lang.String str, double x, double y)
          Draws the text given by the specified string, using the specified font and the current brush color.
 void drawString(Font font, java.lang.String str, float x, float y)
          Draws the text given by the specified string, using the specified font and the current brush color.
 void fillEllipse(double x, double y, double r1, double r2)
          Fills an ellipse on the page using the current pen color.
 void fillEllipse(float x, float y, float r1, float r2)
          Fills an ellipse on the page using the current pen color.
 void fillPath()
          Closes and fills the path with the current brush color.
 void fillRect(double x, double y, double w, double h)
          Fills the specified rectangle on the page.
 void fillRect(float x, float y, float w, float h)
          Fills the specified rectangle on the page.
 float[] getBrushColor()
          Returns the brush color.
 byte[] getContent()
           
 float getHeight()
          Returns the height of this page.
 float getWidth()
          Returns the width of this page.
 void lineTo(double x, double y)
          Draws a line from the current pen position to the point with coordinates (x, y), using the current pen width and stroke color.
 void lineTo(float x, float y)
          Draws a line from the current pen position to the point with coordinates (x, y), using the current pen width and stroke color.
 void moveTo(double x, double y)
          Moves the pen to the point with coordinates (x, y) on the page.
 void moveTo(float x, float y)
          Moves the pen to the point with coordinates (x, y) on the page.
 void print(java.lang.String str)
          Prints a line of text.
 void println()
          Move to the next line.
 void println(java.lang.String str)
          Prints a line of text and moves to the next line.
 void restore()
           
 void save()
           
 void setArtBox(float upperLeftX, float upperLeftY, float lowerRightX, float lowerRightY)
          Sets the page ArtBox.
 void setBleedBox(float upperLeftX, float upperLeftY, float lowerRightX, float lowerRightY)
          Sets the page BleedBox.
 void setBrushColor(double r, double g, double b)
          Sets the color for brush operations.
 void setBrushColor(float[] color)
          Sets the color for brush operations.
 void setBrushColor(float r, float g, float b)
          Sets the color for brush operations.
 void setBrushColor(int color)
          Sets the brush color.
 void setCharSpacing(float spacing)
           
 void setCropBox(float upperLeftX, float upperLeftY, float lowerRightX, float lowerRightY)
          Sets the page CropBox.
 void setDefaultLinePattern()
          Sets the default line dash pattern - solid line.
 void setDefaultLineWidth()
          Sets the line width to the default.
 void setLineCapStyle(int style)
          Sets the current line cap style.
 void setLineJoinStyle(int style)
          Sets the line join style.
 void setLinePattern(java.lang.String pattern)
          The line dash pattern controls the pattern of dashes and gaps used to stroke paths.
 void setPenColor(double r, double g, double b)
          Sets the color for stroking operations.
 void setPenColor(float r, float g, float b)
          Sets the color for stroking operations.
 void setPenColor(int color)
          Sets the pen color.
 void setPenWidth(double width)
          Sets the pen width that will be used to draw lines and splines on this page.
 void setPenWidth(float width)
          Sets the pen width that will be used to draw lines and splines on this page.
 void setTextBegin(float x, float y)
           
 void setTextDirection(int degrees)
          Sets the text direction.
 void setTextEnd()
          Sets the end of text block.
 void setTextFont(Font font)
           
 void setTextLeading(float leading)
          Sets the text leading.
 void setTextLocation(float x, float y)
          Sets the text location.
 void setTextRenderingMode(int mode)
          Sets the text rendering mode.
 void setTextRise(float rise)
           
 void setTextScaling(float scaling)
           
 void setTextStart()
          Sets the start of text block.
 void setTrimBox(float upperLeftX, float upperLeftY, float lowerRightX, float lowerRightY)
          Sets the page TrimBox.
 void setWordSpacing(float spacing)
           
 void strokePath()
          Draws the path using the current pen color.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Page

public Page(PDF pdf,
            float[] pageSize)
     throws java.lang.Exception
Creates page object and add it to the PDF document. Please note:
  The coordinate (0f, 0f) is the top left corner of the page.
  The size of the pages are represented in points.
  1 point is 1/72 inches.
  

Parameters:
pdf - the pdf object.
pageSize - the page size of this page.
Throws:
java.lang.Exception

Page

public Page(PDF pdf,
            float[] pageSize,
            boolean addPageToPDF)
     throws java.lang.Exception
Creates page object and add it to the PDF document. Please note:
  The coordinate (0f, 0f) is the top left corner of the page.
  The size of the pages are represented in points.
  1 point is 1/72 inches.
  

Parameters:
pdf - the pdf object.
pageSize - the page size of this page.
addPageToPDF - boolean flag.
Throws:
java.lang.Exception

Page

public Page(PDF pdf,
            java.util.Map<java.lang.Integer,PDFobj> objects,
            PDFobj pageObj)
     throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

addFontResource

public Font addFontResource(CoreFont coreFont)

complete

public void complete()

getContent

public byte[] getContent()

addDestination

public Destination addDestination(java.lang.String name,
                                  float yPosition)
Adds destination to this page.

Parameters:
name - The destination name.
yPosition - The vertical position of the destination on this page.
Returns:
the destination.

getWidth

public float getWidth()
Returns the width of this page.

Returns:
the width of the page.

getHeight

public float getHeight()
Returns the height of this page.

Returns:
the height of the page.

drawLine

public void drawLine(double x1,
                     double y1,
                     double x2,
                     double y2)
              throws java.io.IOException
Draws a line on the page, using the current color, between the points (x1, y1) and (x2, y2).

Parameters:
x1 - the first point's x coordinate.
y1 - the first point's y coordinate.
x2 - the second point's x coordinate.
y2 - the second point's y coordinate.
Throws:
java.io.IOException

drawLine

public void drawLine(float x1,
                     float y1,
                     float x2,
                     float y2)
              throws java.io.IOException
Draws a line on the page, using the current color, between the points (x1, y1) and (x2, y2).

Parameters:
x1 - the first point's x coordinate.
y1 - the first point's y coordinate.
x2 - the second point's x coordinate.
y2 - the second point's y coordinate.
Throws:
java.io.IOException

drawString

public void drawString(Font font1,
                       Font font2,
                       java.lang.String str,
                       float x,
                       float y)
                throws java.io.IOException
Draws the text given by the specified string, using the specified main font and the current brush color. If the main font is missing some glyphs - the fallback font is used. The baseline of the leftmost character is at position (x, y) on the page.

Parameters:
font1 - the main font.
font2 - the fallback font.
str - the string to be drawn.
x - the x coordinate.
y - the y coordinate.
Throws:
java.io.IOException

drawString

public void drawString(Font font,
                       java.lang.String str,
                       double x,
                       double y)
                throws java.io.IOException
Draws the text given by the specified string, using the specified font and the current brush color. The baseline of the leftmost character is at position (x, y) on the page.

Parameters:
font - the font to use.
str - the string to be drawn.
x - the x coordinate.
y - the y coordinate.
Throws:
java.io.IOException

drawString

public void drawString(Font font,
                       java.lang.String str,
                       float x,
                       float y)
                throws java.io.IOException
Draws the text given by the specified string, using the specified font and the current brush color. The baseline of the leftmost character is at position (x, y) on the page.

Parameters:
font - the font to use.
str - the string to be drawn.
x - the x coordinate.
y - the y coordinate.
Throws:
java.io.IOException

setPenColor

public void setPenColor(double r,
                        double g,
                        double b)
                 throws java.io.IOException
Sets the color for stroking operations. The pen color is used when drawing lines and splines.

Parameters:
r - the red component is float value from 0.0 to 1.0.
g - the green component is float value from 0.0 to 1.0.
b - the blue component is float value from 0.0 to 1.0.
Throws:
java.io.IOException

setPenColor

public void setPenColor(float r,
                        float g,
                        float b)
                 throws java.io.IOException
Sets the color for stroking operations. The pen color is used when drawing lines and splines.

Parameters:
r - the red component is float value from 0.0f to 1.0f.
g - the green component is float value from 0.0f to 1.0f.
b - the blue component is float value from 0.0f to 1.0f.
Throws:
java.io.IOException

setBrushColor

public void setBrushColor(double r,
                          double g,
                          double b)
                   throws java.io.IOException
Sets the color for brush operations. This is the color used when drawing regular text and filling shapes.

Parameters:
r - the red component is float value from 0.0 to 1.0.
g - the green component is float value from 0.0 to 1.0.
b - the blue component is float value from 0.0 to 1.0.
Throws:
java.io.IOException

setBrushColor

public void setBrushColor(float r,
                          float g,
                          float b)
                   throws java.io.IOException
Sets the color for brush operations. This is the color used when drawing regular text and filling shapes.

Parameters:
r - the red component is float value from 0.0f to 1.0f.
g - the green component is float value from 0.0f to 1.0f.
b - the blue component is float value from 0.0f to 1.0f.
Throws:
java.io.IOException

setBrushColor

public void setBrushColor(float[] color)
                   throws java.io.IOException
Sets the color for brush operations.

Parameters:
color - the color.
Throws:
java.io.IOException

getBrushColor

public float[] getBrushColor()
Returns the brush color.

Returns:
the brush color.

setPenColor

public void setPenColor(int color)
                 throws java.io.IOException
Sets the pen color.

Parameters:
color - the color. See the Color class for predefined values or define your own using 0x00RRGGBB packed integers.
Throws:
java.io.IOException

setBrushColor

public void setBrushColor(int color)
                   throws java.io.IOException
Sets the brush color.

Parameters:
color - the color. See the Color class for predefined values or define your own using 0x00RRGGBB packed integers.
Throws:
java.io.IOException

setDefaultLineWidth

public void setDefaultLineWidth()
                         throws java.io.IOException
Sets the line width to the default. The default is the finest line width.

Throws:
java.io.IOException

setLinePattern

public void setLinePattern(java.lang.String pattern)
                    throws java.io.IOException
The line dash pattern controls the pattern of dashes and gaps used to stroke paths. It is specified by a dash array and a dash phase. The elements of the dash array are positive numbers that specify the lengths of alternating dashes and gaps. The dash phase specifies the distance into the dash pattern at which to start the dash. The elements of both the dash array and the dash phase are expressed in user space units.
  Examples of line dash patterns:

      "[Array] Phase"     Appearance          Description
      _______________     _________________   ____________________________________

      "[] 0"              -----------------   Solid line
      "[3] 0"             ---   ---   ---     3 units on, 3 units off, ...
      "[2] 1"             -  --  --  --  --   1 on, 2 off, 2 on, 2 off, ...
      "[2 1] 0"           -- -- -- -- -- --   2 on, 1 off, 2 on, 1 off, ...
      "[3 5] 6"             ---     ---       2 off, 3 on, 5 off, 3 on, 5 off, ...
      "[2 3] 11"          -   --   --   --    1 on, 3 off, 2 on, 3 off, 2 on, ...
  

Parameters:
pattern - the line dash pattern.
Throws:
java.io.IOException

setDefaultLinePattern

public void setDefaultLinePattern()
                           throws java.io.IOException
Sets the default line dash pattern - solid line.

Throws:
java.io.IOException

setPenWidth

public void setPenWidth(double width)
                 throws java.io.IOException
Sets the pen width that will be used to draw lines and splines on this page.

Parameters:
width - the pen width.
Throws:
java.io.IOException

setPenWidth

public void setPenWidth(float width)
                 throws java.io.IOException
Sets the pen width that will be used to draw lines and splines on this page.

Parameters:
width - the pen width.
Throws:
java.io.IOException

setLineCapStyle

public void setLineCapStyle(int style)
                     throws java.io.IOException
Sets the current line cap style.

Parameters:
style - the cap style of the current line. Supported values: Cap.BUTT, Cap.ROUND and Cap.PROJECTING_SQUARE
Throws:
java.io.IOException

setLineJoinStyle

public void setLineJoinStyle(int style)
                      throws java.io.IOException
Sets the line join style.

Parameters:
style - the line join style code. Supported values: Join.MITER, Join.ROUND and Join.BEVEL
Throws:
java.io.IOException

moveTo

public void moveTo(double x,
                   double y)
            throws java.io.IOException
Moves the pen to the point with coordinates (x, y) on the page.

Parameters:
x - the x coordinate of new pen position.
y - the y coordinate of new pen position.
Throws:
java.io.IOException

moveTo

public void moveTo(float x,
                   float y)
            throws java.io.IOException
Moves the pen to the point with coordinates (x, y) on the page.

Parameters:
x - the x coordinate of new pen position.
y - the y coordinate of new pen position.
Throws:
java.io.IOException

lineTo

public void lineTo(double x,
                   double y)
            throws java.io.IOException
Draws a line from the current pen position to the point with coordinates (x, y), using the current pen width and stroke color. Make sure you call strokePath(), closePath() or fillPath() after the last call to this method.

Throws:
java.io.IOException

lineTo

public void lineTo(float x,
                   float y)
            throws java.io.IOException
Draws a line from the current pen position to the point with coordinates (x, y), using the current pen width and stroke color. Make sure you call strokePath(), closePath() or fillPath() after the last call to this method.

Throws:
java.io.IOException

strokePath

public void strokePath()
                throws java.io.IOException
Draws the path using the current pen color.

Throws:
java.io.IOException

closePath

public void closePath()
               throws java.io.IOException
Closes the path and draws it using the current pen color.

Throws:
java.io.IOException

fillPath

public void fillPath()
              throws java.io.IOException
Closes and fills the path with the current brush color.

Throws:
java.io.IOException

drawRect

public void drawRect(double x,
                     double y,
                     double w,
                     double h)
              throws java.io.IOException
Draws the outline of the specified rectangle on the page. The left and right edges of the rectangle are at x and x + w. The top and bottom edges are at y and y + h. The rectangle is drawn using the current pen color.

Parameters:
x - the x coordinate of the rectangle to be drawn.
y - the y coordinate of the rectangle to be drawn.
w - the width of the rectangle to be drawn.
h - the height of the rectangle to be drawn.
Throws:
java.io.IOException

drawRect

public void drawRect(float x,
                     float y,
                     float w,
                     float h)
              throws java.io.IOException
Draws the outline of the specified rectangle on the page. The left and right edges of the rectangle are at x and x + w. The top and bottom edges are at y and y + h. The rectangle is drawn using the current pen color.

Parameters:
x - the x coordinate of the rectangle to be drawn.
y - the y coordinate of the rectangle to be drawn.
w - the width of the rectangle to be drawn.
h - the height of the rectangle to be drawn.
Throws:
java.io.IOException

fillRect

public void fillRect(double x,
                     double y,
                     double w,
                     double h)
              throws java.io.IOException
Fills the specified rectangle on the page. The left and right edges of the rectangle are at x and x + w. The top and bottom edges are at y and y + h. The rectangle is drawn using the current pen color.

Parameters:
x - the x coordinate of the rectangle to be drawn.
y - the y coordinate of the rectangle to be drawn.
w - the width of the rectangle to be drawn.
h - the height of the rectangle to be drawn.
Throws:
java.io.IOException

fillRect

public void fillRect(float x,
                     float y,
                     float w,
                     float h)
              throws java.io.IOException
Fills the specified rectangle on the page. The left and right edges of the rectangle are at x and x + w. The top and bottom edges are at y and y + h. The rectangle is drawn using the current pen color.

Parameters:
x - the x coordinate of the rectangle to be drawn.
y - the y coordinate of the rectangle to be drawn.
w - the width of the rectangle to be drawn.
h - the height of the rectangle to be drawn.
Throws:
java.io.IOException

drawPath

public void drawPath(java.util.List<Point> path,
                     char operation)
              throws java.lang.Exception
Draws or fills the specified path using the current pen or brush.

Parameters:
path - the path.
operation - specifies 'stroke' or 'fill' operation.
Throws:
java.lang.Exception

drawCircle

public void drawCircle(double x,
                       double y,
                       double r)
                throws java.lang.Exception
Draws a circle on the page. The outline of the circle is drawn using the current pen color.

Parameters:
x - the x coordinate of the center of the circle to be drawn.
y - the y coordinate of the center of the circle to be drawn.
r - the radius of the circle to be drawn.
Throws:
java.lang.Exception

drawCircle

public void drawCircle(float x,
                       float y,
                       float r)
                throws java.lang.Exception
Draws a circle on the page. The outline of the circle is drawn using the current pen color.

Parameters:
x - the x coordinate of the center of the circle to be drawn.
y - the y coordinate of the center of the circle to be drawn.
r - the radius of the circle to be drawn.
Throws:
java.lang.Exception

drawCircle

public void drawCircle(double x,
                       double y,
                       double r,
                       char operation)
                throws java.lang.Exception
Draws the specified circle on the page and fills it with the current brush color.

Parameters:
x - the x coordinate of the center of the circle to be drawn.
y - the y coordinate of the center of the circle to be drawn.
r - the radius of the circle to be drawn.
operation - must be Operation.STROKE, Operation.CLOSE or Operation.FILL.
Throws:
java.lang.Exception

drawEllipse

public void drawEllipse(double x,
                        double y,
                        double r1,
                        double r2)
                 throws java.lang.Exception
Draws an ellipse on the page using the current pen color.

Parameters:
x - the x coordinate of the center of the ellipse to be drawn.
y - the y coordinate of the center of the ellipse to be drawn.
r1 - the horizontal radius of the ellipse to be drawn.
r2 - the vertical radius of the ellipse to be drawn.
Throws:
java.lang.Exception

drawEllipse

public void drawEllipse(float x,
                        float y,
                        float r1,
                        float r2)
                 throws java.lang.Exception
Draws an ellipse on the page using the current pen color.

Parameters:
x - the x coordinate of the center of the ellipse to be drawn.
y - the y coordinate of the center of the ellipse to be drawn.
r1 - the horizontal radius of the ellipse to be drawn.
r2 - the vertical radius of the ellipse to be drawn.
Throws:
java.lang.Exception

fillEllipse

public void fillEllipse(double x,
                        double y,
                        double r1,
                        double r2)
                 throws java.lang.Exception
Fills an ellipse on the page using the current pen color.

Parameters:
x - the x coordinate of the center of the ellipse to be drawn.
y - the y coordinate of the center of the ellipse to be drawn.
r1 - the horizontal radius of the ellipse to be drawn.
r2 - the vertical radius of the ellipse to be drawn.
Throws:
java.lang.Exception

fillEllipse

public void fillEllipse(float x,
                        float y,
                        float r1,
                        float r2)
                 throws java.lang.Exception
Fills an ellipse on the page using the current pen color.

Parameters:
x - the x coordinate of the center of the ellipse to be drawn.
y - the y coordinate of the center of the ellipse to be drawn.
r1 - the horizontal radius of the ellipse to be drawn.
r2 - the vertical radius of the ellipse to be drawn.
Throws:
java.lang.Exception

drawPoint

public void drawPoint(Point p)
               throws java.lang.Exception
Draws a point on the page using the current pen color.

Parameters:
p - the point.
Throws:
java.lang.Exception

setTextRenderingMode

public void setTextRenderingMode(int mode)
                          throws java.lang.Exception
Sets the text rendering mode.

Parameters:
mode - the rendering mode.
Throws:
java.lang.Exception

setTextDirection

public void setTextDirection(int degrees)
                      throws java.lang.Exception
Sets the text direction.

Parameters:
degrees - the angle.
Throws:
java.lang.Exception

bezierCurveTo

public void bezierCurveTo(Point p1,
                          Point p2,
                          Point p3)
                   throws java.io.IOException
Draws a bezier curve starting from the current point. Please note: You must call the fillPath, closePath or strokePath method after the last bezierCurveTo call.

Author: Pieter Libin, pieter@emweb.be

Parameters:
p1 - first control point
p2 - second control point
p3 - end point
Throws:
java.io.IOException

setTextStart

public void setTextStart()
                  throws java.io.IOException
Sets the start of text block. Please see Example_32. This method must have matching call to setTextEnd().

Throws:
java.io.IOException

setTextLocation

public void setTextLocation(float x,
                            float y)
                     throws java.io.IOException
Sets the text location. Please see Example_32.

Parameters:
x - the x coordinate of new text location.
y - the y coordinate of new text location.
Throws:
java.io.IOException

setTextBegin

public void setTextBegin(float x,
                         float y)
                  throws java.io.IOException
Throws:
java.io.IOException

setTextLeading

public void setTextLeading(float leading)
                    throws java.io.IOException
Sets the text leading. Please see Example_32.

Parameters:
leading - the leading.
Throws:
java.io.IOException

setCharSpacing

public void setCharSpacing(float spacing)
                    throws java.io.IOException
Throws:
java.io.IOException

setWordSpacing

public void setWordSpacing(float spacing)
                    throws java.io.IOException
Throws:
java.io.IOException

setTextScaling

public void setTextScaling(float scaling)
                    throws java.io.IOException
Throws:
java.io.IOException

setTextRise

public void setTextRise(float rise)
                 throws java.io.IOException
Throws:
java.io.IOException

setTextFont

public void setTextFont(Font font)
                 throws java.io.IOException
Throws:
java.io.IOException

println

public void println(java.lang.String str)
             throws java.io.IOException
Prints a line of text and moves to the next line. Please see Example_32.

Throws:
java.io.IOException

print

public void print(java.lang.String str)
           throws java.io.IOException
Prints a line of text. Please see Example_32.

Throws:
java.io.IOException

println

public void println()
             throws java.io.IOException
Move to the next line. Please see Example_32.

Throws:
java.io.IOException

setTextEnd

public void setTextEnd()
                throws java.io.IOException
Sets the end of text block. Please see Example_32.

Throws:
java.io.IOException

drawRectRoundCorners

public void drawRectRoundCorners(float x,
                                 float y,
                                 float w,
                                 float h,
                                 float r1,
                                 float r2,
                                 char operation)
                          throws java.lang.Exception
Throws:
java.lang.Exception

clipPath

public void clipPath()
              throws java.io.IOException
Clips the path.

Throws:
java.io.IOException

clipRect

public void clipRect(float x,
                     float y,
                     float w,
                     float h)
              throws java.io.IOException
Throws:
java.io.IOException

save

public void save()
          throws java.io.IOException
Throws:
java.io.IOException

restore

public void restore()
             throws java.io.IOException
Throws:
java.io.IOException

setCropBox

public void setCropBox(float upperLeftX,
                       float upperLeftY,
                       float lowerRightX,
                       float lowerRightY)
Sets the page CropBox. See page 77 of the PDF32000_2008.pdf specification.

Parameters:
upperLeftX - the top left X coordinate of the CropBox.
upperLeftY - the top left Y coordinate of the CropBox.
lowerRightX - the bottom right X coordinate of the CropBox.
lowerRightY - the bottom right Y coordinate of the CropBox.

setBleedBox

public void setBleedBox(float upperLeftX,
                        float upperLeftY,
                        float lowerRightX,
                        float lowerRightY)
Sets the page BleedBox. See page 77 of the PDF32000_2008.pdf specification.

Parameters:
upperLeftX - the top left X coordinate of the BleedBox.
upperLeftY - the top left Y coordinate of the BleedBox.
lowerRightX - the bottom right X coordinate of the BleedBox.
lowerRightY - the bottom right Y coordinate of the BleedBox.

setTrimBox

public void setTrimBox(float upperLeftX,
                       float upperLeftY,
                       float lowerRightX,
                       float lowerRightY)
Sets the page TrimBox. See page 77 of the PDF32000_2008.pdf specification.

Parameters:
upperLeftX - the top left X coordinate of the TrimBox.
upperLeftY - the top left Y coordinate of the TrimBox.
lowerRightX - the bottom right X coordinate of the TrimBox.
lowerRightY - the bottom right Y coordinate of the TrimBox.

setArtBox

public void setArtBox(float upperLeftX,
                      float upperLeftY,
                      float lowerRightX,
                      float lowerRightY)
Sets the page ArtBox. See page 77 of the PDF32000_2008.pdf specification.

Parameters:
upperLeftX - the top left X coordinate of the ArtBox.
upperLeftY - the top left Y coordinate of the ArtBox.
lowerRightX - the bottom right X coordinate of the ArtBox.
lowerRightY - the bottom right Y coordinate of the ArtBox.

append

public void append(byte[] buffer)
            throws java.io.IOException
Appends the specified array of bytes to the page.

Throws:
java.io.IOException

addBMC

public void addBMC(java.lang.String structure,
                   java.lang.String altDescription,
                   java.lang.String actualText)
            throws java.lang.Exception
Throws:
java.lang.Exception

addBMC

public void addBMC(java.lang.String structure,
                   java.lang.String language,
                   java.lang.String altDescription,
                   java.lang.String actualText)
            throws java.lang.Exception
Throws:
java.lang.Exception

addEMC

public void addEMC()
            throws java.lang.Exception
Throws:
java.lang.Exception