class EposFeed
extends XMLElement

A <feed> element.

Feeds forward the roll without printing anything on it.

Examples

Separate 2 text elements by 20 units of feed

new EposPrint()
  .append(
    new EposText('Hello,'),
    new EposFeed().units(20),
    new EposText('World!'),
  )

Separate 2 text elements by a line feed (lf)

new EposPrint()
  .append(
    new EposText('Hello,'),
    EposFeed.lf(), // Shorthand for `new EposFeed().lf()`
    new EposText('World!'),
  )

Separate 2 text elements by 3 blank lines

new EposPrint()
  .append(
    new EposText('Hello,'),
    EposFeed.lines(3), // Shorthand for `new EposFeed().lines(3)`
    new EposText('World!'),
  )

Constructors

new
EposFeed()

Methods

lf(): this

Makes this feed into a blank <feed>, removing any unit= or lines=.

This, in practice, makes it into a simple line feed

lines(lines: number): this

Makes this <feed> feed forward lines lines.

units(units: number): this

Makes this <feed> feed forward units units.

Static Methods

Creates a new EposFeed, before calling EposFeed.lf on it.

lines(lines: number): EposFeed

Creates a new EposFeed, before calling EposFeed.lines on it.

unit(units: number): EposFeed

Creates a new EposFeed, before calling EposFeed.units on it.