Web Analytics Made Easy -
StatCounter PHP barcode generator - CodingForum

Announcement

Collapse
No announcement yet.

PHP barcode generator

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PHP barcode generator

    Hi guys. I am using the PHP following PHP barcode class and I attempted to Generate a bar code in GD sample.

    * Date : 2013-01-06
    * Author : DEMONTE Jean-Baptiste <[email protected]>
    * HOUREZ Jonathan

    A generated barcode looks like the folllowing.

    Click image for larger version

Name:	bar****.gif
Views:	1
Size:	2.2 KB
ID:	2283630

    If you look at the white gaps, they are so tiny while the black lines are so heavy. When I print the barcode it becomes useless. The tiny white gap between the lines does not work.

    Any better alternatives?

  • #2
    What barcode type are you trying to use? - If it's code39 or code39 extended you need a * at the beginning and end for it to be recognised by and scanner. I've only ever used code39 but it's possible that other types need this too.

    Also considering this is your first visit here, uploading an image called barsh*t isn't appropriate and neither is the text in the image - "My **cking barcode".

    Seriously, we'll try to help you in any way we can and we have some brilliant people here but you need to tone down the language or people will loose respect for "that one who throws his toys out of the pram". Sure it's not worked and you're frustrated but that isn't our fault is it.

    FYI Google has a direct url for creating QR codes on the fly, it's possible they also do the same for normal barcodes too.

    For what its worth, I had this same problem with my first barcode project.. and as I mentioned, I didn't realise I needed the * symbols and spent hours chasing my tail round in circles so you're not the only one who's encountered this problem (and yes the black and white line widths do vary and can be extremely small).
    "Tango says double quotes with a single ( ' ) quote in the middle"
    '$Name says single quotes with a double ( " ) quote in the middle'
    "Tango says double quotes ( \" ) must escape a double quote"
    '$Name single quotes ( \' ) must escape a single quote'

    Comment


    • #3
      Sorry for the tone friend and thanks for your reply.

      It is a code128 barcode. It is really frastrating. I don't think it is the *. I need to find another class or library for the purpose.

      Comment


      • #4
        You don't think it's the *.. but have you tried just in case?

        It may well be the class as you say. The person who wrote it may have had it working fine on a lower resolution monitor but go up a few resolutions on someone elses system and who knows what effect it may have at print time.

        Ultimately google is your friend as barcodes are one of those things that are black magic in programming circles - some people are excellent with them and could write code to create and process them in multiple languages while others will say you need to create special device drivers etc because they're so clueless about it.

        It really does depend on how well written the class is but try the asterisks anyway just in case.
        "Tango says double quotes with a single ( ' ) quote in the middle"
        '$Name says single quotes with a double ( " ) quote in the middle'
        "Tango says double quotes ( \" ) must escape a double quote"
        '$Name single quotes ( \' ) must escape a single quote'

        Comment


        • #5
          Of course I did with the *. It is totally the same problem. I guess I will have to resort to google again in hope that I will discover something else.

          Comment


          • #6
            php code 128 barcode script
            NO Limits!!
            ------------------------------------------------------------

            Comment


            • #7
              I use FPDF all the time, but never have tried the barcode scripts.
              Here is something to look into:
              https://www.google.com/?gws_rd=ssl#s...p+fpdf+barcode

              Because it is PDF, the FPDF output is crystal clear and scalable.
              Hopefully the barcode scripting is a good fit for FPDF.

              Comment


              • #8
                Thanks of your suggestions guys. I have tried everything and it is all pain in the *** to print on a label printer.
                I will stay with the DYNO label printer software which does the job, not as efficiently but at least it works.
                PHP will create a txt file with the information and I will import it in the DYNO software.

                Of course I would like to create a bar-code on the fly (that would impress) but I guess web based tools wouldn't do this easily.

                Comment

                Working...
                X