added line feed

This commit is contained in:
Djeeberjr 2022-02-19 14:06:07 +01:00
parent ceee567981
commit 6cd67cf00f
2 changed files with 15 additions and 0 deletions

View File

@ -47,6 +47,9 @@ public class PrinterController : Controller
case "barcode": case "barcode":
parsedInstruction = instruction.Deserialize<BarcodeInstruction>(); parsedInstruction = instruction.Deserialize<BarcodeInstruction>();
break; break;
case "feed":
parsedInstruction = instruction.Deserialize<FeedInstruction>();
break;
default: default:
return BadRequest(); return BadRequest();
} }

View File

@ -0,0 +1,12 @@
public class FeedInstruction : BaseInstruction
{
public int lines {get; set; } = 1;
public override List<byte[]> GetInstructions()
{
var commands = new List<byte[]>();
commands.Add(e.FeedLines(lines));
return commands;
}
}