Created
April 12, 2012 22:52
-
-
Save sagmor/2371615 to your computer and use it in GitHub Desktop.
Zebra Print Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This one gets locked | |
+ (void)print1WithAddress:(NSString *)printerAddress andPort:(NSInteger)printerPort | |
{ | |
NSError *error = nil; | |
TcpPrinterConnection *connection = [[TcpPrinterConnection alloc] initWithAddress:printerAddress andWithPort:printerPort]; | |
[connection open]; | |
NSString *file = | |
@"! 0 200 200 240 1\r\n" | |
@"LABEL\r\n" | |
@"CONTRAST 0\r\n" | |
@"TONE 0\r\n" | |
@"SPEED 5\r\n" | |
@"PAGE-WIDTH 380\r\n" | |
@"BAR-SENSE\r\n" | |
@"COUNTRY USA\r\n" | |
@";// PAGE 0000000003800240\r\n" | |
@"T SWI10PT.CPF 0 116 40 New Font Test Label\r\n" | |
@"FORM\r\n" | |
@"PRINT\r\n"; | |
[connection write:[file dataUsingEncoding:NSUTF8StringEncoding] error:&error]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment