Newbies Seth Redlus Posted August 15, 2010 Newbies Posted August 15, 2010 Had to share this one with everyone, as I recently spent a lot of time looking for a method to generate 2D barcodes, and came across a free solution that's pretty easy to implement (in my eyes) courtesy of the Barcode4J project. Here Goes: 1) Download barcode4J-2.0 from sourceforge 2) Extract .tar with double-click 3) Move extracted folder to root, change name to "barcode" 4) download Apache-Ant-1.8.1 5) rename Apache folder to "ant" and place in root directory 6) Using Terminal, navigate to "Barcode" directory, and type "ant" System should spew a bunch of text out as it builds the necessary files and say "Build successful" This literally took 3 seconds on my home computer 7) Insert into Filemaker a script that calls an apple script as follows: tell application "FileMaker Pro" set part1 to cell "[Field Name]" of current record [repeat as many times as necessary] end tell try do shell script "java -cp /barcode/build/barcode4j.jar:/barcode/lib/avalon-framework-4.2.0.jar:/barcode/lib/commons-cli-1.0.jar org.krysalis.barcode4j.cli.Main -o barcodeforfilemaker.png -f png --bw -d 300 -s datamatrix "" & part1 & """ end try EXPLAINED: This script sets variables (parts1.-..) to match fields from FileMaker's current layout. It then calls a shell script as defined by Barcode4J, specifies the output file name "-o" as barcodeforfilemaker.png, specifies the PNG format, resolution of 300dpi, datamatrix format and then inserts the data to create the barcode. You can use the "&" to concatenate multiple fields, which I have done in my solution. The script as defined in FileMaker should include elements to commit record/request, perform applescript as above, go to field, insert picture. For reference: here is a command line that works to generate a code generically. COMMAND LINE: java -cp /barcode/build/barcode4j.jar:/barcode/lib/avalon-framework-4.2.0.jar:/barcode/lib/commons-cli-1.0.jar org.krysalis.barcode4j.cli.Main -o barcode.png -f png --bw -d 600 -s datamatrix "DATA TO MAKE BARCODE WITH GOES HERE" I have implemented this on a system that generates 2D barcodes for name badges at conferences. A "Bulk-Assign" script systematically goes through the database and creates the barcodes one-by-one and inserts them into container fields with each record. I should mention that this method as written would only work on a Mac, but once I figured it out, it literally only took about an hour to get it running in full. Hope this helps someone else out there, and keeps them from having to buy a $500 plugin or font that you can't manipulate as easily as you can a image file. Best of luck!
Bailey Kessing Posted May 15, 2011 Posted May 15, 2011 Would love a java solution so that I can use the free scriptmaster plugin. Ideas? Specifically I need datamatrix barcodes
andries Posted May 16, 2011 Posted May 16, 2011 take a look at the zxing library. It will do it for you http://code.google.com/p/zxing/
Newbies mariocanta54 Posted March 10, 2015 Newbies Posted March 10, 2015 1) Download barcode4J-2.0 from sourceforge2) Extract .tar with double-click3) Move extracted folder to root, change name to "barcode"4) download Apache-Ant-1.8.15) rename Apache folder to "ant" and place in root directory6) Using Terminal, navigate to "Barcode" directory, and type "ant" I open terminal, i change my dir to root, I write ant on terminal but nothing appen Osx Yosemithe Mario
Recommended Posts
This topic is 3889 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now