Closed pedromcunha closed 3 years ago
@pedromcunha if you use styleAlignment just before the QR Code it should center it.
var builder = new StarXpandCommand.StarXpandCommandBuilder();
builder.addDocument(new StarXpandCommand.DocumentBuilder()
.addPrinter(new StarXpandCommand.PrinterBuilder()
.styleAlignment(StarXpandCommand.Printer.Alignment.Center)
.actionPrintQRCode(new StarXpandCommand.Printer.QRCodeParameter("https://google.com")
.setModel(StarXpandCommand.Printer.QRCodeModel.Model2)
.setLevel(StarXpandCommand.Printer.QRCodeLevel.M)
.setCellSize(8))
The only exception to this rule would be for the TSP100III series since they do not support Alignment.
Ok, great. I'll do that, it shouldn't crash if I try to set the styleAlignment for the TSP100III right? Worst case scenario is that it just doesn't center it, right?
Exactly; if the printer doesn't support a command it will just ignore it. The app definitely will not crash.
Amazing, thank you!
Is there any way to center the QR code? My print command looks like this: