Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odpovědi
12482 Zobrazení

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
Zrušit
Autor Nejlepší odpověď

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
Zrušit
Nejlepší odpověď

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
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
čvc 25
4750
2
pro 24
7868
2
lis 24
28648
2
kvě 24
7559
3
bře 24
7000