0
Answered

Feature questions

JoeM 2 years ago updated by Vitaly Ovchinnikov 2 years ago 13

I am considering the purchase of "Barcode." Looking through the online information, I have a few questions.

I need to generate EPS files with coupon barcodes (GS1 DataBar format with various add-on values). It seems the app can handle that.

One very important feature I need is automation. My current workflow involved importing a spreadsheet of values into FileMaker Pro. Filemaker validates the information and then, via a script, sends the data to my current barcode software. This system allows me to batch generate codes. Batch/automation is important because I do anywhere from 5 to 50 barcodes at a time. It also allows me to encode distinctive filenames for each code to match up to items in a print layout.


I see that barcode has some automation functionality, but it looks like it is limited to entering data via "Terminal." Maybe I am misunderstanding.

Bottom line - can Barcode handle anything like my current automation workflow? I am guessing my system uses AppleScript for this, but I am open to other methods. I prefer to continue to run my data through Filemaker for validation (having everything saved in a single database is also good for archival purposes) but would consider other options.

Thanks in advance.

Under review

Hello Joe,

Barcode support command line parameters for batch generator of barcodes. See here for more details: https://boxshot.com/support/barcode-help/automation_scripting.html

As long as your automation software can run a 3rd party application with command line parameters, you can use Barcode in your workflow.

Let me know if you need any further assistance.

I had seen the information at the link you provided, but it wasn't (still isn't) clear.

As far as I can tell from that page, I would need to:


1. Open Barcode and enter settings for the code(s) I want to create

2. Use my FileMaker script to generate a "data.txt" file with the necessary barcode numbers

3. Place a "batch.sh" script in the same directory as the "data.txt" file

4. Open Terminal, navigate to the correct directory and enter a command to run the script

All those steps might be a little problematic for my setup. Especially item 1 - I need to produce specific sets of codes with the same exact settings each time. This ensures I can bring them into existing page layout software templates.  Client "A" may need one setting, while client "B" has another setting. Is there a way to save settings that can be recalled when starting a new job?

However, the linked page also seems to indicate that the above "batch" method will produce a single PDF file. There also seems to be an option to output to PNG files (although the command to do so is exactly the same as the single PDF command). Neither of these methods will work for me.

I need to create an individual EPS file for each code. I also need control over the filenames for each code that is output. Is this possible in a batch creation situation? 

    Well, this depends on your FileMaker software. Unfortunately I don't know what it is capable to, but if it can run through the codes and call a specific app for each code - you can do the job.

    Basically, yes, you need to create a layout for each type of barcode you need. Then you can populate this layout with data using the command line option and export the result to PNG/EPS/PDF/etc - a single barcode per file.

    Here is the sample from the link above:

    /Applications/Barcode.app/Contents/MacOS/Barcode --symbology=EAN-13 --data=1234567 --output=result.png

    You see that you provide symbology (a preset name that you prepared), data and output file name. You can try it manually and see what happens. Then all you need is to tell your automation software to do this for all the barcodes in your set.


    There is no need to create a file with all the barcodes as this way you can't control the output file names the way you probably want to. As long as you can run a command for each line in your set, the method described above is simpler.

    So the main question is: can FileMaker run a specific command line utility/app for each code in your list? If it can - the rest is simple.

    Thanks for the info. Seems part of my disconnect is that my browser does not display the full line of code shown in your previous post. It ends with "--data=1" Everything after that is apparently cut off. It looks like most of the code examples have information cut off, making it difficult to understand the capabilities.

    The command line code setup sounds very much like my current system, although that uses AppleScript. It does cycle through the records one by one to generate individual codes.


    It looks like FMP has the ability to work with the command line. I just have to do some more research to figure out if it can do what I need and how to make it work. Hopefully, this will work out.

    Some additional questions:

    - can a path be specified for output via the command line?

    - are the vector barcodes generated font based bars? (Are any fonts used for anything besides the human-readable portion)? I know some printers have issues with font based barcode files.

    Thanks again.

    Yes, you can specify paths instead of file names for the output parameter.


    Barcode outlines texts, so the output EPS is self-sufficient and doesn't need fonts.

    Thank you very much for all the help. I didn't realize that there was a demo version of the software. I have downloaded it and am testing the command line features. Very cool piece of software you have here.

    The command line is working in Terminal, but there is a problem.

    I am using the "DataBar Expanded Stacked" layout. I have cloned a copy and renamed it (with no spaces in the name). The Command Line passes the parameters as expected. However, this code requires an Application ID. The template has the correct value entered (8110), but when the command line creates the code, the App ID field is blank. This results in a blank code appearing and the empty App ID field saved to the template. Manually entering the App ID results in a code appearing.

    I have tried several variations to populate the App ID field from the command line without success. The app window has the message "Unsupported App ID" at the bottom. 

    The App ID is a constant for my use. It can either remain at 8110 in the template or I can provide the number via command line. How can I get that field to remain populated?


    Also, I am guessing that any exported files showing a blank barcode is simply a limitation of the demo. Can you confirm that?

    Yes, the demo version replaces all the barcode data with blanks/zeroes - this is the limitation of the demo.

    Not sure about the AppID part, could you provide the command line you use that updates the template?

    Here is the terminal command I am using. The data is just filler. I created a template "DataBarEx2" to send the info to.

    /Applications/Barcode.app/Contents/MacOS/Barcode --symbology=DataBarEx2 --data=0020621079147310011011031810326 --custom-texts="123456-98756"

    The App ID should be 8110. This is specified in the template, which displays properly. Once this command is run, the App ID becomes blank.

    Try adding [8110] at the beginning of the --data argument, so it looks like --data="[8110]12345".

    THANKS!! That did the trick.

    It took some doing, but I seem to have things working with FileMaker Pro. FMP has a function that uses AppleScript to access the command line. Formatting is very tricky with plenty of "escapes" going on. I managed to figure things out and have modified my old scripts to work with Barcode. 

    I really appreciate your help with this.

    One last question... 


    The databar expanded stacked format has a property "Row Width." Value is a number of "segments." Is this value accessible via the command line? (if so, how?).  This is one item that I can work around but would be nice to control from FileMaker.

    Unfortunately, this one is not accessible through the command line. However, if you feel yourself brave enough to edit saved presets (that are plain XML) you can easily update it there. Look at your ~/Library/Application Support/Barcode/Saved/ folder for the presets.

    Maybe I'll take a look at that down the road. I only use three different segment values. Seems easier to have one template for each and call the appropriate one from the command line.

    Thanks again for the great info.

    Answered

    Sure, for 3 different types of barcodes it is much easier to have 3 custom presets.