Change font size programmatically on thermal Bluetooth Printer

Change font size programmatically on thermal Bluetooth Printer

Content Index :

Change font size programmatically on thermal Bluetooth Printer
Tag : swift , By : user185751
Date : November 28 2020, 04:01 AM

Hope that helps Resolved: After finding ESC/POS commands and this StackOverflow post I was able to change the print size on the printer known as M58-LL or ZJ-5805 using the following function which takes an array of hexcodes, transform them into UnicodeScalar, then to Character and appends them to a String which is sent to the printer same as a text printout.
let hexs = [0x1b,0x21,0x20] //doubleWide
var hexString = String() 
for all in hexs {
    if let scalar = UnicodeScalar(all) {
let theData = hexString.data(using: .utf8)!
myPrinter.writeValue(theData, for: printCharacteristic, type: .withoutResponse)

//printCharacteristic corresponds with Service/Characteristic B

[0x1b,0x21,0x00] //default
[0x1b,0x21,0x01] //small font
[0x1b,0x21,0x08] //bold
[0x1b,0x21,0x10] //doubleHeight
[0x1b,0x21,0x20] //doubleWidth
[0x1b,0x21,0x20] //doubleHeightAndWidth

No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

PHP adjusting font size printing to network thermal printer

Tag : php , By : Brian Drum
Date : March 29 2020, 07:55 AM
Any of those help This is more a task for you to understand the manual. Not sure how you have done the rest before.
On page C3 of the manual you get a command overview. ESC E is the command to select a bold font (details on page C110). You want to change the font size so you need ESC P, ESC M or ESC g.

How can i print to thermal bluetooth printer?

Tag : android , By : Noah
Date : March 29 2020, 07:55 AM
it fixes the issue I finally created my own plugin

Printing barcodes on a bluetooth thermal printer

Tag : android , By : Anna
Date : March 29 2020, 07:55 AM
it should still fix some issue You need to tell the printer that you are sending an image to print and specify how to print it.
Typically this is done with ESC/POS codes. Most printers like this use ESC/POS codes.

Flutter Bluetooth thermal POS printer

Tag : flutter , By : ArdentRogue
Date : March 29 2020, 07:55 AM
around this issue Currently you need to write your own logic using Bluetooth packages. There is package available which currently supports WiFi POS printer. Take a look https://pub.flutter-io.cn/packages/esc_pos_printer

How to connect Thermal Bluetooth Printer to iOS devices

Tag : swift , By : Allen
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further Short story: A bluetooth thermal printer can work with iOS only if it uses the Bluetooth 4.0 LE version or if the manufacturer registered in the Mfi Program.
Bluetooth LE 4.0 devices aren't listed in the Settings => Bluetooth on iOS anyway.
Related Posts Related QUESTIONS :
  • How does my teacher know how many parameters to put in her closures and how does she know what type Swift will infer?
  • Custom Index for Linked List in Swift
  • Swift WKWebView continuous spell checking
  • Swift - Merging 2 arrays of objects with a key
  • Change frame of Live View in Swift playgrounds
  • Swift: Maintaining atomicity in a block-based execution using weak self
  • Why memory address is not changed for different instances of struct?
  • Filling a List in SwiftUI with CoreData
  • Kotlin Property Initialization (Like swift using closures)
  • Call a function from a separate class not working
  • Explanation of zip, reduce and combine in Swift
  • How to add a delay between loops when playing a tone in AVAudioPlayer?
  • How to add storyboard canvas orientation in git ignore in Xcode
  • How to execute different implementation of a method of a generic struct based on the generic type?
  • How to handle Errors on never ending chain with materialize?
  • RxSwift convert Observable<String> into String
  • Alamofire sending a request to an API 'NSInvalidArgumentException'
  • SwiftUI Conditional List - Unable to infer complex closure return type
  • Result values in '? :' expression have mismatching types 'String.SubSequence' (aka 'Substring') and 'String'
  • SwiftUI - Align contents of Button to the left
  • Swift handle did select on multiple annotations on same location
  • How to use NSPredicate for whether a List of Int contains a Int number?
  • SetNeedsDisplay having no effect
  • Can't initialize class with "if"
  • SKPaymentQueue.default().add(payment) ignored
  • How to share UIImage to Camera Roll using UIActivityViewController
  • Play Sound From String Arrays Swift
  • Runtime error using Combine: dyld: Symbol not found: _$s7Combine9PublishedV9PublisherCyx_GAadAMc
  • addPeriodicTimeObserver generate a escaping closure error
  • Since iOS 13 Beta 3, my app only displays a black window
  • showing uiview controller as a pop up
  • SwiftUI Beta 3 Black Screen
  • What is Content in SwiftUI?
  • How do I access the underlying key of a SymmetricKey in CryptoKit?
  • How to get dynamic Text height for a ScrollView with SwiftUI
  • SwiftUI: NavigationButton initializer gives error
  • How to limit character for username in Swift
  • How do I use UserDefaults with SwiftUI?
  • I'm an absolute beginner in swift. I don't what's wrong with the output of my code, This is based on mutating methods
  • How to reload data in UITableView when popping view controller
  • Cannot hook into another RxSwift stream based on a check
  • SwiftUI Change View with Button
  • SwiftUI: How to draw filled and stroked shape?
  • How to access inner object's properties from superclass without boilerplate
  • SwiftUI Table Custom Swipe?
  • Unwrapping optional inside map closure in Swift
  • What is the best way to wrap `purchaserInfo` for easy comparisons throughout your code using RevenueCat
  • How to shuffle multidimensional array?
  • Can you use a Publisher directly as an @ObjectBinding property in SwiftUI?
  • Changing certain words' colour in SCNText
  • Limit frequency with which firestore retrieves data
  • SwiftUI - Half modal?
  • Call a function multiple times and get a list of results in swift?
  • Open multiple preview same time in SwiftUI
  • What is simdTransform in SceneKit and ARKit?
  • How can I fill only part of the custom UIView rectangle?
  • Type of expression is ambiguous without more context in Xcode 11
  • How to setup Horizontal UICollectionView with paging, but items per page arrange from left to right & top to bottom
  • Why does this method with an optional parameter not override the base class method?
  • Implement a collection view SwiftUI
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com