Page

The Page class.

The Page class is used to manipulate an individual page. To create new pages use addPage() or insertPage() methods of Doc class

class Page : IHaruObject {}

Constructors

this
this(HPDF_Page page)
Undocumented in source.

Members

Functions

arc
HPDF_STATUS arc(float x, float y, float ray, float ang1, float ang2)

Appends a circle arc to the current path.

beginText
HPDF_STATUS beginText()

Begins a text object and sets the text position to (0, 0).

circle
HPDF_STATUS circle(float x, float y, float ray)

Appends a circle to the current path.

clip
HPDF_STATUS clip()

Modifies the current clipping path by intersecting it with the current path using the nonzero winding number rule.

closePath
HPDF_STATUS closePath()

Appends a straight line from the current point to the start point of sub path. The current point is moved to the start point of sub path

closePathFillStroke
HPDF_STATUS closePathFillStroke()

Closes the current path, fills the current path using the nonzero winding number rule, then paints the path.

closePathStroke
HPDF_STATUS closePathStroke()

Closes the current path. Then, it paints the path.

concat
HPDF_STATUS concat(float a, float b, float c, float d, float x, float y)

Concatenates the page's current transformation matrix and specified matrix.

createDestination
Destination createDestination()

Creates a new Destination instance for the page

createLinkAnnot
Annotation createLinkAnnot(Rect rect, Destination dst)

Creates a new link Annotation instance object for the page.

createTextAnnot
Annotation createTextAnnot(Rect rect, string text, Encoder encoder)

Creates a new Annotation instance for the page.

createURILinkAnnot
Annotation createURILinkAnnot(Rect rect, string uri)

Creates a new web link Annotation instance object for the page.

curveTo
HPDF_STATUS curveTo(float x1, float y1, float x2, float y2, float x3, float y3)

Appends a Bézier curve to the current path using the control points (x1, y1) and (x2, y2) and (x3, y3), then sets the current point to (x3, y3).

curveTo2
HPDF_STATUS curveTo2(float x2, float y2, float x3, float y3)

Appends a Bézier curve to the current path using the current point and (x2, y2) and (x3, y3) as control points. Then, the current point is set to (x3, y3).

curveTo3
HPDF_STATUS curveTo3(float x1, float y1, float x3, float y3)

Appends a Bézier curve to the current path using two spesified points.

drawImage
HPDF_STATUS drawImage(Image image, float x, float y, float width, float height)

Shows an image in one operation.

ellipse
HPDF_STATUS ellipse(float x, float y, float xray, float yray)

Appends an ellipse to the current path.

endPath
HPDF_STATUS endPath()

Ends the path object without filling or painting.

endText
HPDF_STATUS endText()

Ends a text object.

eoclip
HPDF_STATUS eoclip()
Undocumented in source. Be warned that the author may not have intended to support it.
eofill
HPDF_STATUS eofill()

Fills the current path using the even-odd rule.

eofillStroke
HPDF_STATUS eofillStroke()

Fills the current path using the even-odd rule, then paints the path.

executeXObject
HPDF_STATUS executeXObject(Image image)
Undocumented in source. Be warned that the author may not have intended to support it.
fill
HPDF_STATUS fill()

Fills the current path using the nonzero winding number rule.

fillStroke
HPDF_STATUS fillStroke()

Fills the current path using the nonzero winding number rule, then paints the path.

getCMYKFill
HaruCMYKColor getCMYKFill()

Gets the current value of the page's filling color.

getCMYKStroke
HaruCMYKColor getCMYKStroke()

Gets the current value of the page's stroking color.

getCharSpace
float getCharSpace()

Gets the current value of the page's character spacing.

getCurrentFont
Font getCurrentFont()

Gets a Font instance of the page's current font.

getCurrentFontSize
float getCurrentFontSize()

Gets the size of the page's current font.

getCurrentPos
Point getCurrentPos()

Gets the current position for path painting.

getCurrentTextPos
Point getCurrentTextPos()

Gets the current position for text showing.

getDash
DashMode getDash()

Gets the current pattern of the page.

getFillingColorSpace
ColorSpace getFillingColorSpace()

Gets the current value of the page's stroking color space.

getFlat
float getFlat()

Gets the current value of the page's flatness.

getGMode
GMode getGMode()

Gets the current graphics mode.

getGStateDepth
uint getGStateDepth()

Gets the number of the page's graphics state stack.

getGrayFill
float getGrayFill()

Gets the current value of the page's filling color.

getGrayStroke
float getGrayStroke()

Gets the current value of the page's stroking color.

getHandle
HPDF_HANDLE getHandle()
Undocumented in source. Be warned that the author may not have intended to support it.
getHeight
float getHeight()

Gets the height of a page.

getHorizontalScalling
float getHorizontalScalling()

Gets the current value of the page's horizontal scalling for text showing.

getLineCap
HaruLineCap getLineCap()

Gets the current line cap style of the page.

getLineJoin
HaruLineJoin getLineJoin()

Gets the current line join style of the page.

getLineWidth
float getLineWidth()

Gets the current line width of the page.

getMiterLimit
float getMiterLimit()

Gets the current value of the page's miter limit.

getRGBFill
HaruRGBColor getRGBFill()

Gets the current value of the page's filling color.

getRGBStroke
HaruRGBColor getRGBStroke()

Gets the current value of the page's stroking color.

getStrokingColorSpace
ColorSpace getStrokingColorSpace()

Gets the current value of the page's stroking color space.

getTextLeading
float getTextLeading()

Gets the current value of the page's line spacing.

getTextMatrix
TransMatrix getTextMatrix()

Gets the current text transformation matrix of the page.

getTextRenderingMode
HaruTextRenderingMode getTextRenderingMode()

Gets the current value of the page's text rendering mode.

getTextRise
float getTextRise()

Gets the current value of the page's text rising.

getTextWidth
float getTextWidth(string text)

Gets the width of the text in current fontsize, character spacing and word spacing.

getTransMatrix
TransMatrix getTransMatrix()

Gets the current transformation matrix of the page.

getWidth
float getWidth()

Gets the width of a page.

getWordSpace
float getWordSpace()

Get the current value of the page's word spacing.

graphicRestore
HPDF_STATUS graphicRestore()

Restore (pop) the graphics state which is saved by graphicSave.

graphicSave
HPDF_STATUS graphicSave()

Saves (push) the page's current graphics parameter to the stack. An application can invoke gSave() up to 28 (???) and can restore the saved parameter by invoking gRestore().

lineTo
HPDF_STATUS lineTo(float x, float y)

Appends a path from the current point to the specified point.

measureText
uint measureText(string text, float width, bool wordWrap, float* realWidth)

Calculates the byte length which can be included within the specified width.

moveTextPos
HPDF_STATUS moveTextPos(float x, float y, bool setLeading)

Changes the current text position, using the specified offset values. If the current text position is (x1, y1), the new text position will be (x1 + x, y1 + y).

moveTo
HPDF_STATUS moveTo(float x, float y)

Starts a new subpath and move the current point for drawing path, moveTo() sets the start point for the path to the point (x, y).

moveToNextLine
HPDF_STATUS moveToNextLine()

Moves to the next line.

rectangle
HPDF_STATUS rectangle(float x, float y, float width, float height)

Appends a rectangle to the current path.

setCMYKFill
HPDF_STATUS setCMYKFill(float c, float m, float y, float k)

Sets the filling color.

setCMYKStroke
HPDF_STATUS setCMYKStroke(float c, float m, float y, float k)

Sets the stroking color.

setCharSpace
void setCharSpace(float value)

Sets the character spacing for text.

setDash
HPDF_STATUS setDash(ushort[] dashPattern, uint phase)

Sets the dash pattern for lines in the page.

setDashDashDot
HPDF_STATUS setDashDashDot()

Sets the dash pattern to dash-dash-dot line

setDashDot
HPDF_STATUS setDashDot()

Sets the dash pattern to dash-dot line

setDashed
HPDF_STATUS setDashed()

Sets the dash pattern to dashed line

setDotted
HPDF_STATUS setDotted()

Sets the dash pattern to dotted line

setExtGState
HPDF_STATUS setExtGState(HPDF_ExtGState ext_gstate)

Applyies the graphics state to the page.

setFontAndSize
HPDF_STATUS setFontAndSize(Font font, float size)

Sets the type of font and size leading.

setGrayFill
void setGrayFill(float gray)

Sets the filling color.

setGrayStroke
void setGrayStroke(float gray)

Sets the stroking color.

setHeight
void setHeight(float value)

Changes the height of a page

setHorizontalScalling
void setHorizontalScalling(float value)

Sets the horizontal scalling (scaling) for text showing.

setLineCap
void setLineCap(HaruLineCap lineCap)

Sets the shape to be used at the ends of lines.

setLineJoin
void setLineJoin(HaruLineJoin join)

Sets the line join style in the page.

setLineWidth
void setLineWidth(float lineWidth)

Sets the width of the line used to stroke a path.

setMiterLimit
void setMiterLimit(float miterLim)

Sets the miter limit

setRGBFill
HPDF_STATUS setRGBFill(float r, float g, float b)

Sets the filling color.

setRGBStroke
HPDF_STATUS setRGBStroke(float r, float g, float b)

Sets the stroking color.

setRotate
HPDF_STATUS setRotate(ushort angle)

Sets rotation angle of the page.

setSize
HPDF_STATUS setSize(PageSizes size, PageDirection direction)

Changes the size and direction of a page to a predefined size

setSlideShow
HPDF_STATUS setSlideShow(HaruTransitionStyle type, float disp_time, float trans_time)

Configures the setting for slide transition of the page.

setSolid
HPDF_STATUS setSolid()

Sets the dash pattern to solid line

setTextLeading
void setTextLeading(float value)

Sets the text leading (line spacing) for text showing.

setTextMatrix
HPDF_STATUS setTextMatrix(float a, float b, float c, float d, float x, float y)

Sets the text matrix

setTextRenderingMode
void setTextRenderingMode(HaruTextRenderingMode mode)

Sets the text rendering mode. The initial value of text rendering mode is HPDF_FILL.

setTextRise
void setTextRise(float value)

Moves the text position in vertical direction by the amount of value. Useful for making subscripts or superscripts.

setWidth
void setWidth(float value)

Changes the width of a page

setWordSpace
void setWordSpace(float value)

Sets the word spacing for text.

showText
HPDF_STATUS showText(string text)

Prints the text at the current position on the page.

showTextNextLine
HPDF_STATUS showTextNextLine(string text, float wordSpace, float charSpace)

Moves the current text position to the start of the next line, then prints the text at the current position on the page.

stroke
HPDF_STATUS stroke()

Paints the current path.

textOut
HPDF_STATUS textOut(float xpos, float ypos, string text)

Prints the text on the specified position.

textRect
HPDF_STATUS textRect(float left, float top, float right, float bottom, string text, HaruTextAlignment alignment, uint* len)

Prints the text inside the specified region.

Variables

_page
HPDF_Page _page;
Undocumented in source.

Inherited Members

From IHaruObject

getHandle
HPDF_HANDLE getHandle()
Undocumented in source.

Meta