Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3831 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

For what it is worth, here is a code to create barcodes with ScriptMaster. It uses the barbecue library which can be downloaded here: http://barbecue.sourceforge.net/

Add the library to your jar list and there you go!


import java.io.File;



import net.sourceforge.barbecue.Barcode;

import net.sourceforge.barbecue.BarcodeFactory;

import net.sourceforge.barbecue.BarcodeImageHandler;



Barcode barcode = BarcodeFactory.createInt2of5(dataString);



//Uncomment those lines to save the barcode as a png

//File f = new File(destPath);

//BarcodeImageHandler.savePNG(barcode, f);



//Uncomment the following line to return the barcode as an image to FileMaker

BarcodeImageHandler.getImage(barcode);

  • Like 1
Posted (edited)

Of course not B)-)

But this library actually allows you to create all kind of barcodes, maybe it is better to include the code39 barcode in the scriptmaster module as this is considered as the most standard barcode.

Edited by Guest
  • 4 weeks later...
Posted

Jesse

A bit of extension to the above which gives more control of size and resolution


//

//



import net.sourceforge.barbecue.*

import java.awt.*

import java.awt.image.*





// change this to suit

font = new Font( "Arial" , Font.BOLD , 18)

barcode = BarcodeFactory.createCode39(barcode, true)

gw = barcode.getWidth()

// change this to suit if you want higher, default 50

//barcode.setBarHeight(70)

// this sets DPI

barcode.setResolution(200)

barcode.setFont(font)

gh = barcode.getHeight()

// change this if you want a coloured background

//image = new BufferedImage(t, s, BufferedImage.TYPE_INT_RGB)

image = new BufferedImage(gw, gh, BufferedImage.TYPE_BYTE_GRAY)

Graphics2D g2 = image.getGraphics()

// default is black so draw a white box first

// change type to INT_RGB if you want  a coloured background

g2.setColor(Color.white)

g2.fillRect(0,0,gw,gh)

barcode.draw(g2, 5, 0)

return image

  • 2 years later...
  • 2 weeks later...
  • 11 months later...
  • Newbies
Posted

here i'd like to share some codes with you to help you create EAN-8 in project.

 

Dim reImage As REImage = REFile.OpenImageFile("c:/Sample.png", New PNGDecoder())
Dim barcode As New Linear()
'create a barcode
barcode.Type = BarcodeType.EAN8
'select barcode type
barcode.Data = "7777777"
'Enter a 7-digit data string
barcode.X = 1F
'set bar width
barcode.Y = 60F
'set bar height
barcode.Resolution = 96
'set resolution
barcode.Rotate = Rotate.Rotate0
'set rotate
barcode.DrawBarcode(reImage, 0, 0)
'draw barcode on REImage with location x and y
REFile.SaveImageFile(reImage, "c:/ean8.png", New PNGEncoder())

  • 4 months later...
  • Newbies
Posted

Hi,

Barcode maker or generator is used to design professional barcode on Mac. This is basically used for business users which create number of colorful barcode in own style. This is used to generate and print barcode levels, tags on your Mac without having any technical knowledge. So use Barcode maker for Mac which is the bedst software to create or generate barcode labels.

This topic is 3831 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.