Index

A B C D E F H I J L M N O P Q R S T U V W 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form

A

agent() - Method in record class io.github.chkrishnatej.rp3200.health.PrinterHealthReport
Returns the value of the agent record component.
AgentStatus - Record Class in io.github.chkrishnatej.rp3200.health
The health of one shop PC's print agent, as returned by the agent's GET /status endpoint and forwarded to your server by rp3200-print.js.
AgentStatus(boolean, String, String, String, Instant, long, String, String, boolean, String, int, long, long, Instant, String, Instant, List<String>) - Constructor for record class io.github.chkrishnatej.rp3200.health.AgentStatus
Creates an instance of a AgentStatus record class.
align(Align) - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Sets the alignment for this and all following lines.
Align - Enum Class in io.github.chkrishnatej.rp3200
Horizontal alignment of a printed line (ESC/POS command ESC a n).
allowedOrigins() - Method in record class io.github.chkrishnatej.rp3200.health.AgentStatus
Returns the value of the allowedOrigins record component.

B

barcode(String) - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Prints a CODE128 barcode at the default height (80 dots) with the text below it.
barcode(String, int) - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Prints a CODE128 barcode (the most compact 1D code for bill numbers) at the current alignment, with the human-readable text below it.
Behaviour - Search tag in class io.github.chkrishnatej.rp3200.EscPosBuilder
Section
bold() - Method in record class io.github.chkrishnatej.rp3200.Style
Returns the value of the bold record component.
bold(boolean) - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Switches bold (emphasised) printing on or off for the following text.
Browser side - Search tag in package io.github.chkrishnatej.rp3200
Section
build() - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Returns the ESC/POS bytes to send to the printer, e.g. as the body of an application/octet-stream HTTP response.

C

center() - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Shortcut for align(Align.CENTER).
CENTER - Enum constant in enum class io.github.chkrishnatej.rp3200.Align
Centred - typical for the shop name, QR codes and footers.
Character set - Search tag in record class io.github.chkrishnatej.rp3200.PrinterProfile
Section
charset() - Method in record class io.github.chkrishnatej.rp3200.PrinterProfile
Returns the value of the charset record component.
charsPerLine() - Method in record class io.github.chkrishnatej.rp3200.PrinterProfile
Returns the value of the charsPerLine record component.
codePage() - Method in record class io.github.chkrishnatej.rp3200.PrinterProfile
Returns the value of the codePage record component.
Columns - Class in io.github.chkrishnatej.rp3200
A column layout for table-like rows such as Item | Qty | Amount.
compile(String) - Static method in class io.github.chkrishnatej.rp3200.template.ReceiptTemplate
Compiles a template from a string.
cut() - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Feeds the paper up to the cutter and makes a full cut.

D

DEFAULT_BARCODE_HEIGHT - Static variable in class io.github.chkrishnatej.rp3200.EscPosBuilder
Barcode height used when none is given (dots; 8 dots = 1 mm).
DEFAULT_QR_SIZE - Static variable in class io.github.chkrishnatej.rp3200.EscPosBuilder
QR module size used when none is given (1..16; 6 gives a ~25 mm code for a UPI link).
DOUBLE - Enum constant in enum class io.github.chkrishnatej.rp3200.TextSize
Double width and double height - typical for the shop name.

E

equals(Object) - Method in record class io.github.chkrishnatej.rp3200.health.AgentStatus
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class io.github.chkrishnatej.rp3200.health.PrinterHealthReport
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class io.github.chkrishnatej.rp3200.PrinterProfile
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class io.github.chkrishnatej.rp3200.Style
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class io.github.chkrishnatej.rp3200.Style.Segment
Indicates whether some other object is "equal to" this one.
errorCode() - Method in record class io.github.chkrishnatej.rp3200.health.PrinterHealthReport
Returns the value of the errorCode record component.
errorMessage() - Method in record class io.github.chkrishnatej.rp3200.health.PrinterHealthReport
Returns the value of the errorMessage record component.
EscPosBuilder - Class in io.github.chkrishnatej.rp3200
Fluent builder that produces the raw ESC/POS bytes for one receipt.
EscPosBuilder(PrinterProfile) - Constructor for class io.github.chkrishnatej.rp3200.EscPosBuilder
Starts a new receipt.
event() - Method in record class io.github.chkrishnatej.rp3200.health.PrinterHealthReport
Returns the value of the event record component.
Example - Search tag in class io.github.chkrishnatej.rp3200.EscPosBuilder
Section
expand(Object) - Method in class io.github.chkrishnatej.rp3200.template.ReceiptTemplate
Runs only the placeholder pass and returns the intermediate markup text.

F

feed(int) - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Feeds blank lines.
fromClasspath(String) - Static method in class io.github.chkrishnatej.rp3200.template.ReceiptTemplate
Loads and compiles a UTF-8 template from the classpath, e.g.
fromFile(Path) - Static method in class io.github.chkrishnatej.rp3200.template.ReceiptTemplate
Loads and compiles a UTF-8 template file from disk - useful when shops customise templates without rebuilding the application.

H

hashCode() - Method in record class io.github.chkrishnatej.rp3200.health.AgentStatus
Returns a hash code value for this object.
hashCode() - Method in record class io.github.chkrishnatej.rp3200.health.PrinterHealthReport
Returns a hash code value for this object.
hashCode() - Method in record class io.github.chkrishnatej.rp3200.PrinterProfile
Returns a hash code value for this object.
hashCode() - Method in record class io.github.chkrishnatej.rp3200.Style
Returns a hash code value for this object.
hashCode() - Method in record class io.github.chkrishnatej.rp3200.Style.Segment
Returns a hash code value for this object.
healthy() - Method in record class io.github.chkrishnatej.rp3200.health.PrinterHealthReport
Returns whether printing should work: the agent answered, its printer is ready and the report is not about a failed print.
hostname() - Method in record class io.github.chkrishnatej.rp3200.health.AgentStatus
Returns the value of the hostname record component.
How rendering works - Search tag in class io.github.chkrishnatej.rp3200.template.ReceiptTemplate
Section

I

invert() - Method in record class io.github.chkrishnatej.rp3200.Style
Returns the value of the invert record component.
invert(boolean) - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Switches reverse printing (white text on a black background) on or off.
io.github.chkrishnatej.rp3200 - module io.github.chkrishnatej.rp3200
 
io.github.chkrishnatej.rp3200 - package io.github.chkrishnatej.rp3200
Receipt printing for the TVS RP 3200 Lite (and other ESC/POS thermal printers) from a Java server - typically a Spring Boot web application.
io.github.chkrishnatej.rp3200.health - package io.github.chkrishnatej.rp3200.health
Types for remote printer monitoring: what a shop PC's print agent reports about itself.
io.github.chkrishnatej.rp3200.template - package io.github.chkrishnatej.rp3200.template
Text templates for receipts: {{placeholders}} for data plus [markup] for formatting, compiled once and rendered to ESC/POS bytes.

J

jobsFailed() - Method in record class io.github.chkrishnatej.rp3200.health.AgentStatus
Returns the value of the jobsFailed record component.
jobsPrinted() - Method in record class io.github.chkrishnatej.rp3200.health.AgentStatus
Returns the value of the jobsPrinted record component.

L

lastError() - Method in record class io.github.chkrishnatej.rp3200.health.AgentStatus
Returns the value of the lastError record component.
lastErrorAt() - Method in record class io.github.chkrishnatej.rp3200.health.AgentStatus
Returns the value of the lastErrorAt record component.
lastJobAt() - Method in record class io.github.chkrishnatej.rp3200.health.AgentStatus
Returns the value of the lastJobAt record component.
left() - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Shortcut for align(Align.LEFT).
LEFT - Enum constant in enum class io.github.chkrishnatej.rp3200.Align
Left aligned - the default for every line.
line(String) - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Prints text in the current style and ends the line.
lineWidth() - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Returns how many characters of the current text size fit on one line, e.g. 48 for normal and 24 for TextSize.DOUBLE text on 80 mm paper.

M

Markup syntax - Search tag in class io.github.chkrishnatej.rp3200.template.ReceiptTemplate
Section

N

newline() - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Ends the current line (LF).
NORMAL - Enum constant in enum class io.github.chkrishnatej.rp3200.TextSize
Normal width and height.

O

ok() - Method in record class io.github.chkrishnatej.rp3200.health.AgentStatus
Returns the value of the ok record component.
openDrawer() - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Opens the cash drawer connected to the printer's RJ11 port, using pin 2 (the usual wiring).
openDrawer(int) - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Opens the cash drawer using connector pin 2 or pin 5.
os() - Method in record class io.github.chkrishnatej.rp3200.health.AgentStatus
Returns the value of the os record component.

P

page() - Method in record class io.github.chkrishnatej.rp3200.health.PrinterHealthReport
Returns the value of the page record component.
parse(String) - Static method in class io.github.chkrishnatej.rp3200.Columns
Parses a column spec such as "*,4r,10r".
partialCut() - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Feeds the paper up to the cutter and makes a partial cut: the receipt stays attached by a small hinge and is torn off by hand.
Placeholder syntax - Search tag in class io.github.chkrishnatej.rp3200.template.ReceiptTemplate
Section
PLAIN - Static variable in record class io.github.chkrishnatej.rp3200.Style
Plain, normal-size text - the printer's power-on state.
preview() - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Returns a plain-text picture of the receipt, one line per printed line.
preview(Object) - Method in class io.github.chkrishnatej.rp3200.template.ReceiptTemplate
Preview for 80 mm paper.
preview(Object, PrinterProfile) - Method in class io.github.chkrishnatej.rp3200.template.ReceiptTemplate
Returns a plain-text picture of what would be printed - ideal for logs and unit tests of templates without a printer.
printer() - Method in record class io.github.chkrishnatej.rp3200.health.AgentStatus
Returns the value of the printer record component.
printerError() - Method in record class io.github.chkrishnatej.rp3200.health.AgentStatus
Returns the value of the printerError record component.
PrinterHealthReport - Record Class in io.github.chkrishnatej.rp3200.health
A health report posted by rp3200-print.js to your server, so you can see the state of every shop's printer without remote access to the PC.
PrinterHealthReport(String, boolean, String, String, AgentStatus, String, String, Instant) - Constructor for record class io.github.chkrishnatej.rp3200.health.PrinterHealthReport
Creates an instance of a PrinterHealthReport record class.
PrinterProfile - Record Class in io.github.chkrishnatej.rp3200
Describes the physical printer: how many characters fit on a line and how text is encoded.
PrinterProfile(int, int, Charset, Map<String, String>) - Constructor for record class io.github.chkrishnatej.rp3200.PrinterProfile
Creates a profile.
printerReady() - Method in record class io.github.chkrishnatej.rp3200.health.AgentStatus
Returns the value of the printerReady record component.
printerState() - Method in record class io.github.chkrishnatej.rp3200.health.AgentStatus
Returns the value of the printerState record component.
problem() - Method in record class io.github.chkrishnatej.rp3200.health.PrinterHealthReport
Returns a one-line description of the problem, for logs and admin pages.
profile() - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Returns the profile this builder was created with.

Q

qr(String) - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Prints a QR code with the default module size (6) at the current alignment.
qr(String, int) - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Prints a QR code (model 2, error correction level M) at the current alignment.
queuedJobs() - Method in record class io.github.chkrishnatej.rp3200.health.AgentStatus
Returns the value of the queuedJobs record component.
Quick start - Search tag in package io.github.chkrishnatej.rp3200
Section

R

raw(byte...) - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Appends bytes exactly as given, for printer features this builder does not cover.
reachable() - Method in record class io.github.chkrishnatej.rp3200.health.PrinterHealthReport
Returns the value of the reachable record component.
ReceiptTemplate - Class in io.github.chkrishnatej.rp3200.template
A compiled receipt template: plain text with {{placeholders}} and [markup].
Remote monitoring - Search tag in package io.github.chkrishnatej.rp3200
Section
render(Object) - Method in class io.github.chkrishnatej.rp3200.template.ReceiptTemplate
Renders for 80 mm paper.
render(Object, PrinterProfile) - Method in class io.github.chkrishnatej.rp3200.template.ReceiptTemplate
Renders the template to ESC/POS bytes ready to send to the printer (for example as an application/octet-stream response that the browser forwards to rp3200-agent).
renderInto(EscPosBuilder, Object) - Method in class io.github.chkrishnatej.rp3200.template.ReceiptTemplate
Appends this template to an existing builder, so templates and Java code can be mixed:
replacements() - Method in record class io.github.chkrishnatej.rp3200.PrinterProfile
Returns the value of the replacements record component.
reportedAt() - Method in record class io.github.chkrishnatej.rp3200.health.PrinterHealthReport
Returns the value of the reportedAt record component.
resetStyle() - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Returns to plain, normal-size text.
right() - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Shortcut for align(Align.RIGHT).
RIGHT - Enum constant in enum class io.github.chkrishnatej.rp3200.Align
Right aligned.
row(Columns, String...) - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Prints one table row using the current style.
row(Columns, List<List<Style.Segment>>) - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Like EscPosBuilder.row(Columns, String...), but each cell is a list of styled segments, so a cell can mix styles - e.g. a bold total next to a normal label.
RP3200_58MM - Static variable in record class io.github.chkrishnatej.rp3200.PrinterProfile
TVS RP 3200 Lite with 58 mm paper: 32 characters per line, code page PC437, default replacements.
RP3200_80MM - Static variable in record class io.github.chkrishnatej.rp3200.PrinterProfile
TVS RP 3200 Lite with 80 mm paper: 48 characters per line, code page PC437, default replacements.

S

Segment(String, Style) - Constructor for record class io.github.chkrishnatej.rp3200.Style.Segment
Creates a segment.
separator() - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Prints a full-width line of dashes in the current style.
separator(char) - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Prints a full-width line of the given character, e.g.
size() - Method in class io.github.chkrishnatej.rp3200.Columns
Returns the number of columns.
size() - Method in record class io.github.chkrishnatej.rp3200.Style
Returns the value of the size record component.
size(TextSize) - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Sets the character size for the following text.
startedAt() - Method in record class io.github.chkrishnatej.rp3200.health.AgentStatus
Returns the value of the startedAt record component.
style() - Method in record class io.github.chkrishnatej.rp3200.Style.Segment
Returns the value of the style record component.
style(Style) - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Sets bold, underline, invert and size in one call.
Style - Record Class in io.github.chkrishnatej.rp3200
Character style: bold, underline, reverse (white on black) and size.
Style(boolean, boolean, boolean, TextSize) - Constructor for record class io.github.chkrishnatej.rp3200.Style
Creates a style.
Style.Segment - Record Class in io.github.chkrishnatej.rp3200
A run of text printed in one style - the building block of mixed-style table cells.

T

TALL - Enum constant in enum class io.github.chkrishnatej.rp3200.TextSize
Double height, normal width - good for totals without losing line width.
Template example - Search tag in class io.github.chkrishnatej.rp3200.template.ReceiptTemplate
Section
TemplateException - Exception Class in io.github.chkrishnatej.rp3200.template
Thrown when a receipt template cannot be compiled or rendered.
TemplateException(String) - Constructor for exception class io.github.chkrishnatej.rp3200.template.TemplateException
Creates an exception with a message.
TemplateException(String, Throwable) - Constructor for exception class io.github.chkrishnatej.rp3200.template.TemplateException
Creates an exception with a message and the underlying cause.
text() - Method in record class io.github.chkrishnatej.rp3200.Style.Segment
Returns the value of the text record component.
text(String) - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Prints text in the current style without ending the line.
TextSize - Enum Class in io.github.chkrishnatej.rp3200
Character magnification (ESC/POS command GS ! n).
toString() - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Returns a short description of the builder (line width and bytes written so far).
toString() - Method in record class io.github.chkrishnatej.rp3200.health.AgentStatus
Returns a string representation of this record class.
toString() - Method in record class io.github.chkrishnatej.rp3200.health.PrinterHealthReport
Returns a string representation of this record class.
toString() - Method in record class io.github.chkrishnatej.rp3200.PrinterProfile
Returns a string representation of this record class.
toString() - Method in record class io.github.chkrishnatej.rp3200.Style.Segment
Returns a string representation of this record class.
toString() - Method in record class io.github.chkrishnatej.rp3200.Style
Returns a string representation of this record class.
Two ways to describe a receipt - Search tag in package io.github.chkrishnatej.rp3200
Section
Types in this package - Search tag in package io.github.chkrishnatej.rp3200
Section
Typical use in Spring Boot - Search tag in class io.github.chkrishnatej.rp3200.template.ReceiptTemplate
Section

U

underline() - Method in record class io.github.chkrishnatej.rp3200.Style
Returns the value of the underline record component.
underline(boolean) - Method in class io.github.chkrishnatej.rp3200.EscPosBuilder
Switches underlining on or off for the following text.
uptimeSeconds() - Method in record class io.github.chkrishnatej.rp3200.health.AgentStatus
Returns the value of the uptimeSeconds record component.
userAgent() - Method in record class io.github.chkrishnatej.rp3200.health.PrinterHealthReport
Returns the value of the userAgent record component.

V

valueOf(String) - Static method in enum class io.github.chkrishnatej.rp3200.Align
Returns the enum constant of this class with the specified name.
valueOf(String) - Static method in enum class io.github.chkrishnatej.rp3200.TextSize
Returns the enum constant of this class with the specified name.
values() - Static method in enum class io.github.chkrishnatej.rp3200.Align
Returns an array containing the constants of this enum class, in the order they are declared.
values() - Static method in enum class io.github.chkrishnatej.rp3200.TextSize
Returns an array containing the constants of this enum class, in the order they are declared.
version() - Method in record class io.github.chkrishnatej.rp3200.health.AgentStatus
Returns the value of the version record component.

W

WIDE - Enum constant in enum class io.github.chkrishnatej.rp3200.TextSize
Double width, normal height.
withBold(boolean) - Method in record class io.github.chkrishnatej.rp3200.Style
Returns a copy with bold switched on or off.
withCharsPerLine(int) - Method in record class io.github.chkrishnatej.rp3200.PrinterProfile
Returns a copy with a different line width, e.g. 64 when the printer is set to the smaller Font B.
withCodePage(int, Charset) - Method in record class io.github.chkrishnatej.rp3200.PrinterProfile
Returns a copy that uses another code page.
withGap(int) - Method in class io.github.chkrishnatej.rp3200.Columns
Returns a copy with a different number of spaces between columns (default 1).
withInvert(boolean) - Method in record class io.github.chkrishnatej.rp3200.Style
Returns a copy with reverse printing (white on black) switched on or off.
withReplacement(String, String) - Method in record class io.github.chkrishnatej.rp3200.PrinterProfile
Returns a copy with one extra (or overridden) text replacement, e.g.
withSize(TextSize) - Method in record class io.github.chkrishnatej.rp3200.Style
Returns a copy with another character size.
withUnderline(boolean) - Method in record class io.github.chkrishnatej.rp3200.Style
Returns a copy with underline switched on or off.
A B C D E F H I J L M N O P Q R S T U V W 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form