Skip to content

Instantly share code, notes, and snippets.

@douglascrp
Last active May 30, 2020 23:22
Show Gist options
  • Save douglascrp/42ee96da582322d0bc8eb84fec7e73ff to your computer and use it in GitHub Desktop.
Save douglascrp/42ee96da582322d0bc8eb84fec7e73ff to your computer and use it in GitHub Desktop.
Extract barcode information from documents
Convert the document into an image
convert -density 150 -threshold 55% SOURCE.pdf +adjoin DEST.gif
convert -blur 0 -density 150 -quality 95 -threshold 55% digitalizar0004.pdf 4.png
Extract the barcode text
zbarimg -q --raw DEST.gif
http://www.imagemagick.org/discourse-server/viewtopic.php?p=54039&sid=de8e1bed3fb621a91f8f00720cec7e33#p54039
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment