Ir al contenido
Menú
Se marcó esta pregunta
3 Respuestas
12431 Vistas

Hi everyone,


I've an Odoo 10 running on an Ubuntu 16.04.1 box. My printer is an Epson TM-T20ii.

I've 2 kind of problems depending on the browser:

Firefox:  the printing is good but it takes so long to print and the printer stops 3 times during the printing.

Chrome/Chromium/Opera: prints fast but all in bold and without spaces between words ("word1 word2" is printed as "word1word2"). Also the receipt is cut by the right margin (just a little bit the las character of each line).

Please feel free to ask or request any extra information.


Thanks!!

Avatar
Descartar
Autor Mejor respuesta

Hi,

finally I solved the issue with Chrome (not the Firefox issue but as I can print properly from Chrome I don't care about Firefox anymore).


I edited the font and the table size from the ticket css (/usr/lib/python2.7/dist-packages/odoo/addons/point_of_sale/static/src/css/pos.css)


.pos .pos-sale-ticket {

    text-align: left;

    width: 300px;

    background-color: white;

    margin: 20px;

    padding: 15px;

    font-size: 14px;

    padding-bottom:30px;

    display: inline-block;

    font-family: "Monospace"; -> originally "Inconsolata"

    border: solid 1px rgb(220,220,220);

    border-radius: 3px;

    overflow: hidden;

}


.pos .pos-sale-ticket pre{

    font-family: "Monospace"; -> originally "Inconsolata"

}


.pos .pos-sale-ticket table {

    width: 95%; -> originally "100%"

    border: 0;

    table-layout: fixed;

}


Changing the font I fixed de no space between words and changing the width % I fixed the right margin cut.


I hope this helps if anyone get the same issue. (and if someone know how to fix the Firefox thing you are welcome!)


Regards,

Avatar
Descartar
Mejor respuesta

Sorry for answering old questions.

Above answer work, but if you don't not want to change font-family add css word-spacing also work. This is the code is use :


.pos .pos-sale-ticket {

    text-align: left;

    width: 300px;

    background-color: white;

    margin: 20px;

    padding: 15px;

    font-size: 14px;

    padding-bottom:30px;

    display: inline-block;

    font-family: "Inconsolata";

    border: solid 1px rgb(220,220,220);

    border-radius: 3px;

    overflow: hidden;

    word-spacing: 1px; // this is new code

}

Avatar
Descartar
Mejor respuesta

Hi Armando,

Thanks for this. Printing without the POSBox on Chrome still gives us an average result with distorted characters. Have you been able to get around this issue?

Regards,
Sven

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
jul 25
4642
2
dic 24
7781
2
nov 24
28553
2
may 24
7494
3
mar 24
6921