Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
3 Odpowiedzi
12480 Widoki

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!!

Awatar
Odrzuć
Autor Najlepsza odpowiedź

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,

Awatar
Odrzuć
Najlepsza odpowiedź

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

}

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
lip 25
4745
2
gru 24
7863
2
lis 24
28643
2
maj 24
7556
3
mar 24
6997