{"id":8393,"date":"2023-09-23T10:07:14","date_gmt":"2023-09-23T08:07:14","guid":{"rendered":"https:\/\/linux-bibel.at\/?p=8393"},"modified":"2023-09-23T10:07:16","modified_gmt":"2023-09-23T08:07:16","slug":"gnu-barcode-barcodes-unter-linux-erstellen","status":"publish","type":"post","link":"https:\/\/linux-bibel.at\/index.php\/2023\/09\/23\/gnu-barcode-barcodes-unter-linux-erstellen\/","title":{"rendered":"GNU Barcode &#8211; Barcodes unter Linux erstellen"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Mit der Software GNU Barcode lassen sich unter Linux problemlos Barcodes nach folgenden Codes erstellen:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>EAN<\/li>\n\n\n\n<li>UPC<\/li>\n\n\n\n<li>ISBN<\/li>\n\n\n\n<li>Code39<\/li>\n\n\n\n<li>Code93<\/li>\n\n\n\n<li>Code128<\/li>\n\n\n\n<li>ITF<\/li>\n\n\n\n<li>Codabar<\/li>\n\n\n\n<li>Plessey<\/li>\n\n\n\n<li>MSI<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Barcode installieren<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Unter auf Debian basierenden Linux-Distributionen installieren Sie diese Software wie \u00fcblich ganz einfach \u00fcber die Paket-Verwaltung durch das Paket &#8222;<strong>barcode<\/strong>&#8222;.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Barcode nutzen<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Die Software wird am Terminal genutzt, dies funktioniert jedoch ganz einfach. Die Syntax der Software lautet:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>barcode -b EINGABE -e \"CODE\" -o DATEINAME.ps<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Mit der Option &#8222;<strong><code>-b<\/code><\/strong>&#8220; geben Sie den Code an, der am Barcode erscheinen soll, mit &#8222;<strong><code>-e<\/code><\/strong>&#8220; geben Sie die Art des Barcodes an. Mit &#8222;<code>-o<\/code>&#8220; geben Sie den Dateinamen an.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ein kleines Beispiel:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>barcode -b 934955400000 -e \"ean13\" -o barcode.ps<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/barcode-1024x576.jpg\" alt=\"\" class=\"wp-image-8394\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/barcode-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/barcode-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/barcode-150x84.jpg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/barcode-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/barcode.jpg 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Ist der Barcode grafisch zu klein geben Sie mit der Option &#8222;<strong><code>-u mm<\/code><\/strong>&#8220; die Ma\u00dfeinheit an und mit &#8222;<strong><code>-g BreitexH\u00f6he<\/code><\/strong>&#8220; die Ma\u00dfe an &#8211; etwa:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>barcode -b 934955400000 -e \"ean13\" -u mm -g 90x90 -o barcode.ps<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/barcode1-1024x576.jpg\" alt=\"\" class=\"wp-image-8395\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/barcode1-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/barcode1-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/barcode1-150x84.jpg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/barcode1-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/barcode1.jpg 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Immer nur einen einzelnen Barcode zu erstellen w\u00e4re nat\u00fcrlich etwas m\u00fchsam, am einfachsten gibt man nun nicht jeden Code im Befehl an, sondern schreibt diese in eine Textdatei. Nehmen wir eine Textdatei mit folgendem Inhalt:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>934955400000\n934955400001\n934955400002\n934955400003\n934955400004\n934955400005\n934955400006\n934955400007\n934955400008<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Die Textdatei nennt sich in diesem Beispiel &#8222;<strong>barcodes.txt<\/strong>&#8220; &#8211; mit der Option &#8222;<strong>&#8211;<code>i Dateiname.txt<\/code><\/strong>&#8220; gibt man die Datei an, dieselbe Geschichte wie oben:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>barcode -i barcodes.txt -e \"ean13\" -u mm -g 90x90 -o barcode.ps<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/barcode2-1024x576.jpg\" alt=\"\" class=\"wp-image-8396\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/barcode2-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/barcode2-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/barcode2-150x84.jpg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/barcode2-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/barcode2.jpg 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Die ganzen Barcodes in eine Textdatei zu bekommen ist auch nicht wirklich schwierig, hier ein Beispiel:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>for i in {0..9} ; do echo 93495540000$i; done &gt; barcodes.txt\nfor i in {10..99} ; do echo 9349554000$i; done &gt;&gt; barcodes.txt\nfor i in {100..999} ; do echo 9349554000$i; done &gt;&gt; barcodes.txt<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/barcode3-1024x576.jpg\" alt=\"\" class=\"wp-image-8397\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/barcode3-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/barcode3-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/barcode3-150x84.jpg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/barcode3-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/barcode3.jpg 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Viel mehr zeigt nat\u00fcrlich die Manpage mit dem Befehl:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>man barcode<\/code><\/pre>\n<div class=\"pld-like-dislike-wrap pld-custom\">\r\n    <div class=\"pld-like-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-like-trigger pld-like-dislike-trigger  \" title=\"Gef\u00e4llt mir\" data-post-id=\"8393\" data-trigger-type=\"like\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                            <img src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/12\/Daumen-Hoch.png\" alt=\"Gef\u00e4llt mir\" \/>\r\n            <\/a>\r\n    <span class=\"pld-like-count-wrap pld-count-wrap\">    <\/span>\r\n<\/div><div class=\"pld-dislike-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-dislike-trigger pld-like-dislike-trigger  \" title=\"Gef\u00e4llt mir nicht\" data-post-id=\"8393\" data-trigger-type=\"dislike\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                            <img src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/12\/Daumen-Runter.png\" alt=\"Gef\u00e4llt mir nicht\" \/>\r\n            <\/a>\r\n    <span class=\"pld-dislike-count-wrap pld-count-wrap\"><\/span>\r\n<\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Mit der Software GNU Barcode lassen sich unter Linux problemlos Barcodes nach folgenden Codes erstellen: Barcode installieren Unter auf Debian basierenden Linux-Distributionen installieren Sie diese Software wie \u00fcblich ganz einfach \u00fcber die Paket-Verwaltung durch das Paket &#8222;barcode&#8222;. Barcode nutzen Die Software wird am Terminal genutzt, dies funktioniert jedoch ganz einfach. Die Syntax der Software lautet: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":8395,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[57],"tags":[59],"class_list":["post-8393","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-buero","tag-buero"],"_links":{"self":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/8393","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/comments?post=8393"}],"version-history":[{"count":1,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/8393\/revisions"}],"predecessor-version":[{"id":8398,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/8393\/revisions\/8398"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media\/8395"}],"wp:attachment":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media?parent=8393"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/categories?post=8393"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/tags?post=8393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}