Hi there,
I am using the Angular barcode to design my 2D data matrix barcode in a specific size. I have a canvas with a specific size and want the barcode to fit in it using the top.botton,left.right feature.
I want to know how can I have the barcode generate in the canvas and then I play with the left,right,bottom,top margin to fit where I need exactly.
cheers
Zolf
Below is the code
<div fxFlex.gt-sm="calc(50% - 0.75rem)" fxFlex="100">
<div class="mrgn-b-md">
<h2 class="mrgn-b-md">{{'Preview Label'|translate}}</h2>
<div class="inner-block">
<div fxLayout="row" fxLayoutAlign="start center" style="width: 100%;">
<div fxFlex>
<canvas #myCanvas>
Your browser does not support the canvas element.
</canvas>
<br/>
<ejs-datamatrixgenerator style="display: block;" #barcode id="barcode" [displayText] = 'displayTextMethod' width="200px" height="200px" mode="SVG"
type="DataMatrix" value="Testing">
</ejs-datamatrixgenerator>
</div>
</div>
</div>
</div>
</div>
scss file
canvas {
width:151.1811px;
height:75.5906px;
border:1px solid #c3c3c3;
}