Skip to content

Squarehead-Labs/qz-pos-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qz-pos-js

Builder class for QZ POS printer commands

Example Usage

<script src="./pos.js"></script>
<script>
    new PosReceipt()
        .text('Store Name\n', ['center', 'big', 'bold']) // Add modifiers as string
        .text('123 Main St.\n', ['center'])
        .breakLine(3) // Add 3 line breaks
        .leftAlign() // Explicitly set left alignment for following text
        .text('Item 1: $10.00\n')
        .text('Item 2: $15.00\n')
        .divider() 
        .text('Total: $25.00\n', ['right', PosReceipt.Styles.BOLD]) // Add modifiers as string and/or enum
        .breakLine(2)
        .cutPaper()
        .boldText('Thank you for your purchase!\n') // Bold text using dedicated method
        .openCashDrawer()
        .build();
</script>

About

Builder class for QZ POS printer commands

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Contributors