Skip to Content
Menu
This question has been flagged
3 Replies
11771 Views

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
Discard
Author Best Answer

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
Discard
Best Answer

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
Discard
Best Answer

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
Discard
Related Posts Replies Views Activity
2
Dec 24
6473
2
Nov 24
26765
2
May 24
6335
3
Mar 24
5715
0
Mar 24
855