Coder Social home page Coder Social logo

Comments (7)

objecttothis avatar objecttothis commented on September 21, 2024 1

@objecttothis . This code works for me. app/controller/config remove sanitize from line 900 - Width Barcode_lib change line 115 to return $generator->getBarcode($barcode_value, $barcode_config['barcode_type'], $barcode_config['barcode_width'], $barcode_config['barcode_height']); App/views/configs/barcode_config and change the following to.

<?= form_input ([
						'step' => '.25',
						'max' => '2',
						'min' => '1',

I can now have 5 different barcode widths. Hope i am not comiting a sin here.

It appears that what you are proposing is to use 'barcode_width' as a 'widthFactor'. This doesn't create fixed width barcodes though. For example Code128 type barcodes 9781234567890 and 6000005345 will produce two different width barcodes with your implementation.

from opensourcepos.

objecttothis avatar objecttothis commented on September 21, 2024 1

? The height is fixed, You mean it is already working or it is not adjustable?

Sorry, I meant that you can set the height of the barcode in config and all barcodes will be that height. This is and has been working because picquer/php-barcode-generator allows height to be entered. I just meant fixed as in 'set and it doesn't vary like the width.

from opensourcepos.

odiea avatar odiea commented on September 21, 2024

@objecttothis . This code works for me.
app/controller/config remove sanitize from line 900 - Width
Barcode_lib change line 115 to return $generator->getBarcode($barcode_value, $barcode_config['barcode_type'], $barcode_config['barcode_width'], $barcode_config['barcode_height']);
App/views/configs/barcode_config and change the following to.

<?= form_input ([
						'step' => '.25',
						'max' => '2',
						'min' => '1',

I can now have 5 different barcode widths. Hope i am not comiting a sin here.

from opensourcepos.

odiea avatar odiea commented on September 21, 2024

I had a thrift store at one time so the way I think is will it print properly on the Labels and Tags that were being used. Always depended on the software to create a barcode from the Item_id.

from opensourcepos.

objecttothis avatar objecttothis commented on September 21, 2024

I had a thrift store at one time so the way I think is will it print properly on the Labels and Tags that were being used. Always depended on the software to create a barcode from the Item_id.

In that respect what we have currently will work just fine. It displays on the screen and it prints. The height is fixed, but the difference from our previous implementation is that the width will vary based on the barcode content length. It most likely won't be a breaking change for anyone. On the upside there are now many more barcode formats supported, including Pharmacy barcodes which I believe has been requested before.

from opensourcepos.

odiea avatar odiea commented on September 21, 2024

? The height is fixed, You mean it is already working or it is not adjustable?

from opensourcepos.

objecttothis avatar objecttothis commented on September 21, 2024

I pushed a commit that works if picquer will add preserveAspectRatio="none" as an attribute to their <svg> tag. I have a request out to them to consider it so we will see what they say.

from opensourcepos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.