Options
All
  • Public
  • Public/Protected
  • All
Menu

Adds text to a PDF

Hierarchy

Index

Constructors

constructor

  • new PDFText(text: string, x: number, y: number, page?: string | number, rotation?: number, bold?: boolean, italic?: boolean, font?: string, fontColor?: string, fontSize?: number): PDFText
  • Parameters

    • text: string

      Text to insert.

    • x: number

      X component of this object's position.

    • y: number

      Y component of this object's position.

    • page: string | number = 'all'

      Page to include this object on. Either "all" or an integer. Defaults to "all".

    • Optional rotation: number

      Text rotation in degrees. Optional.

    • Optional bold: boolean

      Whether or not the text should be in bold. Optional.

    • Optional italic: boolean

      Whether or not the text should be in italic. Optional.

    • Optional font: string

      The text font name. Optional.

    • Optional fontColor: string

      The text font color, CSS notation. Optional.

    • Optional fontSize: number

      The text font size. Optional.

    Returns PDFText

Properties

bold

bold: undefined | boolean

font

font: undefined | string

fontColor

fontColor: undefined | string

fontSize

fontSize: undefined | number

italic

italic: undefined | boolean

page

page: string | number

rotation

rotation: undefined | number

text

text: string

x

x: number

y

y: number

Methods

asInnerDict

  • asInnerDict(): {}
  • Returns {}

    dict representation of this PDFInsertObject

    • [key: string]: string | number | boolean

Static identifier

  • identifier(): string

Generated using TypeDoc