Coder Social home page Coder Social logo

Comments (8)

MDziwny avatar MDziwny commented on May 29, 2024 4

Actually it can be generated with the Code128 generator by prepending the FNC1 character \xf1 to the code generated.

For instance:

import barcode

GS1_FNC1_CHAR = u'\xf1'

code = u"00123456780000000001"

code_128_creator = barcode.get_barcode_class("code128")
gs1_128_code = code_128_creator(GS1_FNC1_CHAR + code)
code = gs1_128_code.render()

from python-barcode.

WhyNotHugo avatar WhyNotHugo commented on May 29, 2024 2

Fixed via #37. Version 0.10.0 released with this (and a few other) changes.

from python-barcode.

MDziwny avatar MDziwny commented on May 29, 2024 1

I could make a PR to make it more user friendly

from python-barcode.

MDziwny avatar MDziwny commented on May 29, 2024 1

From what I've read, for instance on https://www.gs1-128.info/:

In essence, GS1-128 is a derivative language of the Code 128 symbology, utilizing a flagging character (Function Code 1 (FNC1)) and application identifiers.

For the letter before the FNC1, it is already inserted by Code-128 as the first character of the code.

I will do the PR soon.

from python-barcode.

MDziwny avatar MDziwny commented on May 29, 2024

I would be very interested too.

from python-barcode.

wellmonwu avatar wellmonwu commented on May 29, 2024

it is better to support ean-128 and print to doc/docx.

from python-barcode.

wellmonwu avatar wellmonwu commented on May 29, 2024

I could make a PR to make it more user friendly

it would help a lot

from python-barcode.

WhyNotHugo avatar WhyNotHugo commented on May 29, 2024

@MDziwny Are you entirely sure there's not another letter before the FNC1 character? (I'm just making sure, since I haven't come across very clear information).

In any case, a PR is more than welcome. A subclass that wraps around the current code128 renderer should work fine, so if you want to address it, I'll be happy to merge it in. Thanks!

from python-barcode.

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.