I have a field which has a serial number that is generated on creation. I would like a script that will print a 39 barcode for the contents of that field (for one specific record) upon demand.
There are multiple methods for getting that barcode. There is a font, there are webservices that can take that info and download an image file of the barcode and there are web viewers that can be used to create the barcode.
What method do you plan to use?
I will use a barcode font, and have printers available for printing the actual labels.
Then there isn't much to script. Put the field on the layout from where you want to print it, format the field with the bar code font and print.
I don't recall if code 39 has a "check digit". If so, you can web search the bar code to get an algorithm that you can put into a calculation field to combine your data with the needed additional character that forms that check digit. There are also custom functions that can be downloaded and imported into your file.
Keep in mind:
You will only be able to see/print bar codes from a computer that has this bar code installed. If the font is not installed, a "clear text" font will be automatically substituted. I would insert the font file into a container field of the file so that I can easily export the file and install the correct font on any future new hardware without having to figure out and find the correct font to install.
this also works and no fonts required
Barcode Creator is another option.
My suggestion was free.
Thanks for the guidance. I do want to continue with the barcode font approach for now. My script writing is a work in progress, and I am having trouble putting together a script that will print the field only. I have tried the following steps:
Go to Layout (layout that bar code field is on)
Go to Field (specifying bar code field for above layout)
Print (current record)
When I run the above the barcode printer prints the edge of the layout.
It's like any other print job. The layout has to be designed to fit the page being printed. If you are using a label printer that prints one label at a time, the layout has to be sized to match the size of that label.
Enter layout mode.
Use print set up to select printer, page size and orientation.
Select Margins from the View menu.
anything to the left of the vertical page break will print. If the edge of the layout prints, you can drag the layout edge to the right of the page break.
Thumbs up for Barcode Creator from Geist Interactive. Yes it costs a few bucks but no plugins and no fonts makes it really easy to deploy and manage.
For starters, thanks to all who gave input.
Since I already had a code 39 barcode font set, I wanted to try installing it. Here are a few of the steps... I created a barcode 39 field with a calculation to put an asterisk before and after the data, and placed this field in a new layout for printing labels. Turns out code 39 does not require a check digit. I also set up a button to run a script which goes to the new layout and opens / stops at the print screen (input quantity).
I know this is probably pretty basic to many of you, but I will consider it a milestone for me! Thanks again philmodjunk for your help and patience.
Retrieving data ...