Open AlejandroMarin95 opened 6 years ago
The following code is used to print with the said printer in an older software that we have, but the person that coded it is no longer around. It is in Delphi:
function TPrintBluetooth.PreparaText(T: string): string;
begin
LOGI('TPrintBluetooth.PreparaText');
T := AjustarAmpleText(T);
Result := #27 + '@'; // Esc@ to start printing
Result := Result + #27 + 'R' + #7; // Spanish characters
case FSetCaracters of
TscWPC1252 : Result := Result + #27 + 't' + #16; // wpc 1252 character set Spanish (Western Europe)
TscISO88591: Result := Result + #27 + 't' + #23; // ISO 8859-1 character set Spanish (Western Europe)
TscISO88592: Result := Result + #27 + 't' + #36; // ISO 8859-2 character set
else Result := Result + #27 + 't' + #23; // ISO 8859-1
end;
Result := Result + T; // The text to print
Result := Result + #13#10; // Line break to make sure it prints the last line
end;
Here is the printer programmer manual (it is a bit difficult to understand):
i think your printer has not set to the codepage you wanted to print, try trigger a printer self test, it should trigger a printing of current printer's detail showing which codepage been set.
If the current codepage doesn't support the character you want to print, you need to find the relevant printer's setting tool to set the codepage first. you may do so by start looking at the printer manufacturer's website download page.
I managed to get it working some time ago by doing what you are saying. Thank you a lot for your answer anyway!
Salutations,
El lun., 17 dic. 2018 13:32, csleeds notifications@github.com escribió:
i think your printer has not set to the codepage you wanted to print, try trigger a printer self test, it should trigger a printing of current printer's detail showing which codepage been set.
If the current codepage doesn't support the character you want to print, you need to find the relevant printer's setting tool to set the codepage first. you may do so by start looking at the printer manufacturer's website download page.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/giorgiofellipe/cordova-plugin-datecs-printer/issues/78#issuecomment-447829654, or mute the thread https://github.com/notifications/unsubscribe-auth/AilIwHCxIpeQLwo6oSUn7fBLvfGkLykyks5u547MgaJpZM4R-AHE .
Hello,
First of all thank you for the plugin, it works perfectly with the model described in the title. There is a problem when it comes to the encoding, though.
I'm using the printer to print some text in Catalan, and so I have tried to print the following string of characters both with "UTF-8" and "ISO-8859-1":
"à á è é í ï ò ó ú ü ç À Á È É Ì Ï Ò Ó Ú Ü Ç {br}"
Here are the results:
UTF-8:
ISO-8859-1:
This printer is like a copy (its external shape is exactly the same) of this model: Black Copper MINI Thermal Printer BC-P58B, but Chinese.
Is there a workaround or a way to print these characters correctly using this printer? Thank you in advance. If you need anyting else to look into this just say the word.