Skip to content

Instantly share code, notes, and snippets.

@clafferty-powa
Last active August 29, 2015 14:15
Show Gist options
  • Select an option

  • Save clafferty-powa/25aa7e8a363ee247ae72 to your computer and use it in GitHub Desktop.

Select an option

Save clafferty-powa/25aa7e8a363ee247ae72 to your computer and use it in GitHub Desktop.
Font and Magnification print test
- (IBAction)printText:(id)sender
{
for (int i=0; i < 11; i++) {
for (int j =9; j < 13; j++) {
[self.powaPOS.printer resetPrinter];
[self.powaPOS.printer printText:[NSString stringWithFormat:@"Font: %d, MagNum %d\n", i, j]];
[self.powaPOS.printer setFont:i];
[self.powaPOS.printer setFormat:j];
NSMutableString *text = [NSMutableString stringWithString:@"\n"];
[text appendString:@"\n1234567890123456789012345678901234567890123456\n------\n"];
//[text appendString:@"\n12345678901234567890123456789012345678901234567890123456789012345678901234567890\n------\n"];
[self.powaPOS.printer printText:text];
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment