Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to remove the hanging down bars at the end of UPC-A barcodes? #40

Open
sterichards opened this issue Mar 28, 2021 · 0 comments

Comments

@sterichards
Copy link

sterichards commented Mar 28, 2021

Edit - I have found the problem to be that ngx-barcode doesn't implement the flat: true option property

Please implement this because at the moment I have to include JsBarcode from an external JS file only so I can use flat: true


Ideally I want to see a flat barcode, like JsBarcode generates for UPC-A

JsBarcode:

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/JsBarcode.all.min.js"></script>
<svg
        id="barcode1"
        class="barcode1"
        jsbarcode-height="100px"
        jsbarcode-flat="true"
        data-flat="true"
        jsbarcode-format="UPC"
></svg>
<script type="text/javascript">JsBarcode(".barcode1", "123456789012").init();</script>

You will see that this generates a UPC barcode without any hanging bars - https://ibb.co/C7LZ35w

This is what is generated using ngx-barcode - https://ibb.co/C7LZ35w using this code:

<ngx-barcode
            [bc-value]="'123456789012'"
            [bc-width]="this.barcodeWidth"
            [bc-height]="this.barcodeHeight"
            [bc-display-value]="false"
            [bc-format]="'UPC'"
    >
</ngx-barcode>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant