Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Has anyone had success using the zxing library to read/decode bar codes with ScriptMaster ?   I generate them just fine using the Barcode4J library.

 

I think I am having dependency issues (take a pill...) and not much forward momentum getting it to work.

 

Examples, suggestions or commiseration are greatly accepted.  

 

regards...

 

Bob Minteer

 

Bob

this works for QR codes definitely and most of the other supported types at https://github.com/zxing/zxing/, I think I have other bit of code too... just needs the javase-nn.jar and the code-nn.jar

I am using 2.3 with Java  6 at the moment

 

I pass is the name of a container field in the table I run this in as fm_container

import com.google.zxing.*
import com.google.zxing.client.j2se.*
import com.google.zxing.common.*
import javax.imageio.ImageIO

barCodeInputStream = fmpro.getContainerStream (fm_container)
barCodeBufferedImage = ImageIO.read(barCodeInputStream)

LuminanceSource source = new BufferedImageLuminanceSource(barCodeBufferedImage)
bitmap = new BinaryBitmap(new HybridBinarizer(source)) 
reader = new MultiFormatReader()
try {
	result = reader.decode(bitmap)  
} catch ( Exception e) {
	return e
}
return result.getText()
  • Author

Many thanks John!  

 

That has put me back on track.   

 

I am attempting to read barcodes from PDF's.

 

While working through this, I kept testing and tweaking... to no avail.     

 

Then it occured to me, "Doh!  I have to convert the PDF's to images like tiff before zxing will do the decoding".

 

Your code works great on images with EAN128, Code39 and QR.

 

Now I am on to working out conversion via the Apache PDFBox library so that I am passing an image to zxing library.

 

regards...

 

Bob Minteer

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.