Options
All
  • Public
  • Public/Protected
  • All
Menu

It represents a TXT file that will be printed at the client side.

Hierarchy

Index

Constructors

  • Creates an instance of the PrintFileTXT class with the specified info.

    Parameters

    • fileContent: string

      The string content itself or the file depending on the source type of the TXT file.

    • fileName: string

      The file name that will be created at the client side.

    • Optional copies: number

      The number of printing copies.

    • Optional fileContentType: FileSourceType

      The source type of the file.

    Returns PrintFileTXT

Properties

fileContent: any

Gets or sets the content of the file depending on the source type.

fileContentType: FileSourceType

Gets or sets the source type of the file.

fileName: string = ""

Gets or sets the file name that will be created at the client side. It must include the file extension like .pdf, .txt, .doc, .xls, etc.

fontBold: boolean = false

Gets or sets whether the text is bold.

fontColor: string = '#000000'

Gets or sets the Color for the printed text. Color must be specified in Hex notation for RGB channels respectively e.g. #rgb or #rrggbb.

fontItalic: boolean = false

Gets or sets whether the text has the italic style applied.

fontName: string = ''

Gets or sets the font name.

fontSize: number = 10

Gets or sets the font size in Points unit.

fontStrikethrough: boolean = false

Gets or sets whether the text is printed with a horizontal line through it.

fontUnderline: boolean = false

Gets or sets whether the text is underlined.

manualDuplex: boolean = false
manualDuplexMessage: string = ""
marginBottom: number = 0.5

Gets or sets the bottom margin for the printed text. Value must be specified in Inch unit.

marginLeft: number = 0.5

Gets or sets the left margin for the printed text. Value must be specified in Inch unit.

marginRight: number = 0.5

Gets or sets the right margin for the printed text. Value must be specified in Inch unit.

marginTop: number = 0.5

Gets or sets the top margin for the printed text. Value must be specified in Inch unit.

printInReverseOrder: boolean = false

Gets or sets whether pages are printed in reverse order.

printOrientation: PrintOrientation = PrintOrientation.Portrait

Gets or sets the print orientation.

printRange: string = ''

Gets or sets the print range.

textAligment: TextAlignment = TextAlignment.Left

Gets or sets the alignment of the text content.

textContent: string = ''

Gets or sets the Text content to be printed.

Accessors

  • get copies(): number
  • set copies(value: number): void
  • Gets or sets the number of printing copies for this file. Default is 1.

    Returns number

  • Gets or sets the number of printing copies for this file. Default is 1.

    Parameters

    • value: number

    Returns void

Methods

  • getContent(): Promise<Blob>
  • getProperties(): IPrintFileTXTProperties