Skip to content

Instantly share code, notes, and snippets.

@EricADockery
Created February 10, 2018 15:42
Show Gist options
  • Save EricADockery/3b33bf1a95b712066dcc1e872247c849 to your computer and use it in GitHub Desktop.
Save EricADockery/3b33bf1a95b712066dcc1e872247c849 to your computer and use it in GitHub Desktop.
private func printerTextField(font:Int, size: Int, x:Int, y: Int, content: String) -> String {
return “TEXT \(font) \(size) \(x) \(y) \(content)”
}
private func printMultiLineTextField(linesHeight: Int, font:Int, size: Int, x:Int, y: Int, content: String) -> String {
return “ML \(linesHeight)\nTEXT \(font) \(size) \(x) \(y) \n\(content)\nENDML\nENDML”
}
private func printerBarCodeFormat(width: Int, ratio: Int, height: Int, x: Int, y:Int, content: String) -> String {
return “BARCODE 128 \(width) \(ratio) \(height) \(x) \(y) \(content)”
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment