Order of numbers and characters in barcode seem wrong when scanned back in

88 views
Skip to first unread message

j...@dicesaloon.com

unread,
Aug 15, 2015, 2:50:15 PM8/15/15
to Barby
Hi, 

First off, thank you for creating this software, I am new to barcodes and barby. I have found it easy to set up and output a png file. But when using a handheld scanner to read printed out barcodes back into the computer they have all the right characters but in the wrong order.

I have tried with both CODE128 & CODE39 with the same result. 

Here are some input strings, and the corresponding strings that are scanned back in

JIM-TEST  -> IJM-ESTT
U12345678901 -> U12345617890
U621408440 -> U124680440

Do you have any idea why they would read back in reordered like this? 

Tanks in advance
Jim
barcode-code128b-U621408440.png
barcode-code128b-U12345678901.png
Message has been deleted

j...@dicesaloon.com

unread,
Aug 15, 2015, 2:53:46 PM8/15/15
to Barby
    def self.generate_code_128B(barcode_seed)
      file_name = "barcode-code128b-#{barcode_seed}.png"
      file_local_url = @@BARCODE_FOLDER + file_name
      file_web_url = @@BARCODE_FOLDER_URL + file_name

      FileUtils::mkdir_p @@BARCODE_FOLDER

      if !File.exist?(file_local_url)
        barcode = Barby::Code128B.new(barcode_seed)
        File.open(file_local_url, 'w'){|f|
          f.write barcode.to_png(:height => 40, :margin => 5)
        }
      end

      return file_web_url
    end



This is the function i used to write the pdf

Tore Darell

unread,
Aug 15, 2015, 8:48:03 PM8/15/15
to ruby-...@googlegroups.com
The images you provided are read just fine at http://zxing.org/w/decode.jspx

How are you printing the barcodes? Are you printing the PNGs, creating
PDFs first?
> --
> You received this message because you are subscribed to the Google Groups
> "Barby" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ruby-barby+...@googlegroups.com.
> To post to this group, send email to ruby-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/ruby-barby.
> For more options, visit https://groups.google.com/d/optout.

j...@dicesaloon.com

unread,
Aug 16, 2015, 3:27:31 AM8/16/15
to Barby
Thanks so much for your quick reply. You are right, they do read in fine on that website. I am creating the pngs, writing them to disk, opening in photoshop and printing out. I am using this handheld scanner http://www.amazon.co.uk/gp/product/B00NIOEA1K?psc=1&redirect=true&ref_=oh_aui_detailpage_o00_s00 I am using OSX and just trying to scan back in the barcodes into a text editor. Im now wondering if it might be the scanner, and what keyboard layout it is recognised as. Do you happen to know if barcode scanners like this one use a standard keyboard layout?

Cheers
Jim


On Saturday, August 15, 2015 at 7:50:15 PM UTC+1, j...@dicesaloon.com wrote:

Tore Darell

unread,
Aug 16, 2015, 10:30:20 PM8/16/15
to ruby-...@googlegroups.com
TBH, I have no idea. Try playing with some output options like xdim and unbleed

Beaumont Loewenthal

unread,
Dec 7, 2015, 12:21:38 PM12/7/15
to Barby
Hey Jim,

Did you solve this in the end? I'm having the same problem with a similar scanner.

Thanks.
Reply all
Reply to author
Forward
0 new messages