Open manojssas opened 1 year ago
public extension String {
struct ArabicEncoding {
public static let windowsArabic = String.Encoding(rawValue: CFStringConvertEncodingToNSStringEncoding(CFStringEncoding(CFStringEncodings.windowsArabic.rawValue)))
}
}
let receipt = Receipt(.🖨️58(String.ArabicEncoding.windowsArabic))
@KevinGong2013 When we using this. The Print comment Goes to blank [] block to print Like
extension String: ReceiptItem {
public func assemblePrintableData(_ profile: PrinterProfile) -> [UInt8] {
guard let data = self.data(using: profile.encoding) else {
return []
}
return Array<UInt8>(data) + Command.CursorPosition.lineFeed.value
}
}
I am using this code :
let receipt = Receipt(.🖨️58(String.ArabicEncoding.windowsArabic))
<<< "٥ حلواني"
<<< KV("٢ برجر", "٢ برجر")
if bluetoothPrinterManager.canPrint {
bluetoothPrinterManager.write(Data(receipt.data))
}
public extension String {
struct ArabicEncoding {
public static let windowsArabic = String.Encoding(rawValue: CFStringConvertEncodingToNSStringEncoding(CFStringEncoding(CFStringEncodings.windowsArabic.rawValue)))
}
}
But this is not working
@KevinGong2013 Can you check and update me? Thanks
You should confirm your device support Arabic
.
@KevinGong2013 Yes my device and printer both supports Arabic. App was live from previous 5 Years on App store which has support for Arabic language. And if we talk about the Printer. I am using X-Printer which supports Arabic language because in Android we are able to print Arabic language. Only iOS has issues.
@KevinGong2013 Hi is there any way to Print Arabic language. Thanks in Advance
Dear @KevinGong2013 Have you got any idea like how to print Arabic language? I do many changes inside Project but in Arabic mode this will print only blank.
Thanks
How can I print Arabic Language with Combination of English and Image?