if i reduce the barcode lenght the its perfectly print
my print page size size is width 2.50 in, height 1.00 in and barcode lenght is greater so it cannot print largely
Also you can set page size and content size by adding this in css
@page {
size: 50mm 26mm;
margin: 3.0mm 0.5mm 0.5mm 3.0mm;
}
body {
width: 48mm;
height: 20mm;
margin: 0;
padding: 0;
}
Set margin according to the requirement
it will help in reducing margins and increasing barcode and font size
after adding your css its look like this
still small and if i scan this barcode machine not read
i want to create like this and its read in the machine
please help
first try only font size css, then check is it working ?
then try second css, and you need to set according to your sticker size and content size
also note that print from print button (not from download pdf and print)
i am using 100 x 25 sticker
yes i have print on print button
i think barcode length is barrier
can i try with large page size
yes try
@page {
size: 50mm 26mm;
margin: 0 0 0 0;
}
change this for page size
from css?
yes change page size & its then look like margin not show
and machine not read also
but i want
and its machine read also
so here see barcode lines size and space between them
i have temporary option to increase font size like
@page {
size: 50mm 25mm;
margin: 0 0 0 0;
}
body {
width: 49mm;
margin: 0;
padding: 0;
text-align: center;
}
.text-content {
font-size: 17px;
margin-bottom: -7mm;
}
.barcode {
margin-top: -4mm;
margin-bottom: -7mm;
}
<body>
<div class="barcode">
{{ doc.test }}
</div>
<div class="text-content">
{{ doc.test|striptags }}
</div>
</body>
Thank you @nilpatel42 i use your code its look
but machine not read it
see AT/Pune/03-2022/17 its large size exactly that size of barcode line i want so
then machine will read it properly
For that you need reduce barcode length by reducing Value or
you can use bigger size sticker, so you can print long barcode properly
try with only ATCPune17, then try to scan it
Ok i will try on bigger size sticker and let you know
Please Provide any solution
do you change size of the label in css ?, if no then do it
do changes in below css and add
@page {
size: 50mm 25mm;
margin: 0 0 0 0;
}
body {
width: 49mm;
margin: 0;
padding: 0;
text-align: center;
}