PdfRunningTitle Class

File
wijmo.pdf.js
Module
wijmo.pdf
Base Class
PdfPageArea
Show
   

Represents a running title of the page, like header and footer.

This class is not intended to be instantiated in your code.

Constructor

Properties

Methods

Constructor

constructor

constructor(options?: any): PdfRunningTitle

Initializes a new instance of the PdfRunningTitle class.

Parameters
Returns
PdfRunningTitle

Properties

declarative

Gets or sets an object that provides the ability to setup the running title content declaratively.

Type
PdfRunningTitleDeclarativeContent

height

Gets or sets the height of the running title, in points. To hide the running title, set this property to 0. Changing this property has no effect on previous drawings; they will not be resized or clipped.

The default value is 24.

Type
number

lineGap

Gets or sets the spacing between each line of text, in points.

The default value is 0.

Inherited From
PdfPageArea
Type
number

paths

Gets an object that provides ability to draw paths.

Inherited From
PdfPageArea
Type
PdfPaths

width

Gets the width of the area, in points.

Inherited From
PdfPageArea
Type
number

x

Gets or sets the X-coordinate (in points) of the current point in the text flow used to draw a text or an image.

Inherited From
PdfPageArea
Type
number

y

Gets or sets the Y-coordinate (in points) of the current point in the text flow used to draw a text or an image.

Inherited From
PdfPageArea
Type
number

Methods

drawImage

drawImage(url: string, x?: number, y?: number, options?: IPdfImageDrawSettings): PdfPageArea

Draws an image in JPG or PNG format with the given options.

If x and y are not defined, then @see:x and @see:y are used instead.

Finally, if the image was drawn in the text flow, the method updates @see:y. Hence, any subsequent text or image starts below this point.

Parameters
Inherited From
PdfPageArea
Returns
PdfPageArea

drawSvg

drawSvg(url: string, x?: number, y?: number, options?: IPdfSvgDrawSettings): PdfPageArea

Draws a SVG image with the given options.

If x and y are not defined, then @see:x and @see:y are used instead.

The method uses the values of the width and height attributes of the outermost svg element to determine the scale factor according to the options.width and options.height properties. If any of these attributes are omitted then scaling is not performed and the image will be rendered in its original size.

Finally, if the image was drawn in the text flow, the method updates @see:y. Hence, any subsequent text or image starts below this point. The increment value is defined by the options.height property or by the outermost svg element's height attribute, which comes first. If none of them is provided then @see:y will stay unchanged.

The method supports a limited set of SVG features and provided primarily for rendering wijmo 5 chart controls.

Parameters
Inherited From
PdfPageArea
Returns
PdfPageArea

drawText

drawText(text: string, x?: number, y?: number, options?: IPdfTextDrawSettings): IPdfTextMeasurementInfo

Draws a string with the given options and returns the measurement information.

If options.pen, options.brush or options.font are omitted, the current document's pen, brush or font are used (see setPen, setBrush, and setFont).

The string is drawn within the rectangular area for which top-left corner, width and height are defined by the x, y, options.width and options.height values. If x and y are not provided, the x and y properties are used instead.

The text is wrapped and clipped automatically within the area. If options.height is not provided and the text exceeds the bottom body edge, then a new page will be added to accommodate the text.

Finally, the method updates the value of the x and y properties. Hence, any subsequent text or image starts below this point (depending on the value of options.continued).

The measurement result doesn't reflect the fact that text can be split into multiple pages or columns; the text is treated as a single block.

Parameters
Inherited From
PdfPageArea
Returns
IPdfTextMeasurementInfo

lineHeight

lineHeight(font?: PdfFont): number

Gets the line height with a given font.

If font is not specified, then font used in the current document is used.

Parameters
Inherited From
PdfPageArea
Returns
number

measureText

measureText(text: string, font?: PdfFont, options?: IPdfTextSettings): IPdfTextMeasurementInfo

Measures a text with the given font and text drawing options without rendering it.

If font is not specified, then the font used in the current document is used.

The method uses the same text rendering engine as drawText, so it is tied up in the same way to @see:x and the right page margin, if options.width is not provided. The measurement result doesn't reflect the fact that text can be split into multiple pages or columns; the text is treated as a single block.

Parameters
Inherited From
PdfPageArea
Returns
IPdfTextMeasurementInfo

moveDown

moveDown(lines?: number, font?: PdfFont): PdfPageArea

Moves down the @see:y by a given number of lines using the given font or, using the font of current document, if not specified.

Parameters
Inherited From
PdfPageArea
Returns
PdfPageArea

moveUp

moveUp(lines?: number, font?: PdfFont): PdfPageArea

Moves up the @see:y by a given number of lines using the given font or, using the font of current document, if not specified.

Parameters
Inherited From
PdfPageArea
Returns
PdfPageArea

rotate

rotate(angle: number, origin?: Point): PdfPageArea

Rotates the graphic context clockwise by a specified angle.

Parameters
Inherited From
PdfPageArea
Returns
PdfPageArea

scale

scale(xFactor: number, yFactor?: number, origin?: Point): PdfPageArea

Scales the graphic context by a specified scaling factor.

The scaling factor value within the range [0, 1] indicates that the size will be decreased. The scaling factor value greater than 1 indicates that the size will be increased.

Parameters
Inherited From
PdfPageArea
Returns
PdfPageArea

transform

transform(a: number, b: number, c: number, d: number, e: number, f: number): PdfPageArea

Transforms the graphic context with given six numbers which represents a 3x3 transformation matrix.

A transformation matrix is written as follows:
ab0
cd0
ef1

Parameters
Inherited From
PdfPageArea
Returns
PdfPageArea

translate

translate(x: number, y: number): PdfPageArea

Translates the graphic context with a given distance.

Parameters
Inherited From
PdfPageArea
Returns
PdfPageArea