I just spent an hour trying to do the most basic thing in DRPU Barcode Label Maker Software. I would link you to it, but I just cleaned myself and prefer not to do you the discourtesy. This is a program that should not have been released. This is a program which should have been burned. By the church. In hellfire.
I’m looking for an open source alternative. The job is to print hundreds of plastic cards, each card is the size of a business card and has a barcode on it. I designed the card in Inkscape and left a square where this programming catastrophe mentioned above was supposed to generate a barcode (allegedly code 128). The barcodes are generated from numbers in a text file, so that the user does not have to manually change the barcode on each printed card, but the program does it automatically on the fly. This is really the only catch. Is anyone aware of a libre program capable of updating a barcode on the fly for printing hundreds of unique cards?
Thank you everyone for the recommendations. I don’t mind command-line, but I won’t be the one doing this, so a friendly GUI is preferable or even required. I will investigate them all in due time and report which one seems easiest to use.
@chris is there a GUI solution for using TeX and updating the barcode number on the fly during printing?
There are some (I can remember 3) GUI “frontends” for TeX/LaTeX, e.g. Lyx. I mean real frontends, not advanced editors. However, I do not know of a special solution for integrating barcodes. But I guess a little GUI that generates a suitable input file and runs TeX/LaTeX on it is simple to program e.g. as Shell/Dialog script or with one of the modern Dialog alternatives. It’s just some text replacement in a template file, and you could even transfer the code to use on the command line towards LaTeX, so you would not have to touch a file at all. You mention an automatic generation of hundreds of cards, what GUI is needed at all for this? You could prepare a PDF with all necessary cards inside, or several PDFs, whatever helps best. Btw, you know about the inkscape barcode extension that e.g. renders code 128 (with user input, not from file)? Maybe this can be easily tweaked as well. It seems that you have an idea of a very special solution that does what you want and exactly this, nothing else. I did not check all the other links but I cannot imagine that there is a program that exactly fulfils your requirements, so some lines of code could be necessary.
There’s a single template, I made it in Inkscape, and it needs to be printed on thousands of cards with each one having a new barcode based on a text file full of serial numbers.
That’s what I meant, if you know the serial numbers beforehand then you can generate a PDF or whatever format you need beforehand and the cards can be printed as needed. You don’t have to generate them on the fly with some fancy GUI. I would import the design as PDF in LaTeX as background and place the barcode at the correct position over the background, and then repeat this either with an external script or with a for loop inside LaTeX, by reading the serial number from the file or stepping a counter. I do not see where the GUI is necessary, maybe you can give more information!?
Unfortunately, the Inkscape barcode extension has no controls for size and position of the code since usually you will place it manually, e.g. if you are designing a book cover. But I would guess this can be solved, the scripts are not rocket science.
No, I meant it serious. If only 5000 printable sheets with predetermined codes are necessary, you could hand over a pdf with the final results. If individual codes are needed then you need a GUI, no doubt.
You can have whatever you want. To give an example:
The LaTeX input that follows is more complicated than it has to be because I have chosen the “wrong”, more complicated, bar code package. I guess you can have an easier solution, but now I stick with it. The code will generate a pdf file with a bar code on every page. The bar code is composed of a base number and a suffix which is equal to the page number. I did it for 9 numbers, but you could easily do it for 10000 or more. To be precise: you will have a bar code on every page with the code <prefix><page number>. That way the ‘operator’ knows that page number 277 has to be printed to get code <prefix>277. This is only an example, you could have 10000 single page pdf files with each file name being equal to the code. This way, you could easily use alphanumeric codes. Many possibilities exist, it depends on the exact use case. The LaTeX code (comments after ‘%’):
\documentclass{scrartcl} % Load some base settings
\usepackage[paperwidth=10cm,paperheight=3cm]{geometry} % set size of the paper sheet
\input{code128.tex} % load code for bar code generation, different options exist
\usepackage{pgffor} % convenient for loops, also different possibilities
\begin{document} % start the document
\def\base{0170012233abc8091} % save prefix in variable \base
\foreach \x in {1,...,9} { % iterate over the numbers 1 to 9 step 1
\edef\c{\base\x} % generate full code from <base><forloopvariable>
\expandafter\codetext\expandafter{\c} % this is a bit tricky, \codetext{code} generates the
% bar code but does not allow variables, the \expandafter
% overcome this restriction; i consider it a bug and you
% may not have this problem with other bar code packages
} % end the for loop
\end{document} % end the document
This will get you, with LaTeX properly installed and after running pdflatex file
The background document can easily be added and the bar code properly resized and positioned on the sheet. The example is just to give you a rough idea of what I am talking about.
You could easily build a simple GUI where people can enter the code to be printed with e.g. zenity. The shell script would just replace a placeholder for the code in the LaTeX file, and run LaTeX and start a pdf viewer. Not much work I guess. It depends as well on what exactly you need. (For implementation, I would not do search and replace in the template document but write the document in a way that you can hand over the code with calling LaTeX. This is easily possible as well.)