Hello and sorry for my poor english,
I have a function that prints labels for direct printing (with the library NaviPrinter). The label i want to print is an xml file, the problem is that on printed I get strange characters instead of accented letters (like á or é) and yet if I edit the xml file looks everything correctly. Does anyone know what I can do?
Here is the code:
index := 1;
fichero.OPEN(conf_warehouse."SEUR Path XML Responses"+'response_'+FORMAT(DELCHR(v_pedido,'=','/'))+'_'+FORMAT(v_bulto)+'.xml');
fichero.TEXTMODE(TRUE);
fichero.CREATEINSTREAM(traza_inStream);
IF fichero.LEN > 0 THEN REPEAT
IF (traza_inStream.READTEXT(traza_read) > 0) THEN
a_trazas[index] := traza_read;
index += 1;
UNTIL traza_inStream.EOS;
index_max := index - 1;
conf_warehouse.GET;
conf_warehouse.TESTFIELD(conf_warehouse."SEUR Printer");
CREATE(NaviPrinter);
index := 2;
REPEAT
NaviPrinter.DirectPrint(conf_warehouse."SEUR Printer",a_trazas[index]);
index += 1;
UNTIL index > index_max;
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Thanks!
do you know what can I do to print the characters correctly?
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Accented letters and special characters (Ñ,Ç,etc.) will have to be converted.
You could have a look at some of the ES objects in your DB that manipulate text to obtain code samples ("Exportar 347" or similar).
Suerte