john renfrew Posted September 25, 2010 Share Posted September 25, 2010 For those following the 'using QR codes to pass Safari address & parameters into FM GO' to launch it discussions, I have done a quick script to create the QR code and return the image to a container using the itextpdf library..(needs 5.02.jar) Only have a 'Touch' not a 'Phone' so if anyone want to test this works it would be brilliant... //QRimg(fm_content) //2010_09_25 JR //v1 //takes path and text from fm_content and returns image to container //requires itextpdf.jar 5.02 from itextpdf.com import java.awt.image.* import com.itextpdf.text.* import com.itextpdf.text.pdf.* qr = new BarcodeQRCode(fm_content, 1, 1, null) img = qr.createAwtImage(java.awt.Color.BLACK, java.awt.Color.WHITE) int w = img.getWidth() int h = img.getHeight() bi = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB) g2 = bi.createGraphics() g2.drawImage(img, 0, 0, w, h, null); g2.dispose() return bi 1 Link to comment Share on other sites More sharing options...
Newbies abyteofdata Posted April 1, 2011 Newbies Share Posted April 1, 2011 Hi John, I built this into an FM app I'm working on for a local museum that wants to add QR codes on the tags placed near the art objects, so that you can scan the code then have your browser take you to a web page with info about the object. Tested the QR code with an iPhone app called QRReader and it works well. Will test on an Android-based phone a little later and will post the results. Link to comment Share on other sites More sharing options...
Bailey Kessing Posted May 15, 2011 Share Posted May 15, 2011 ANy chance you have a Datamatrix barcode working??? Link to comment Share on other sites More sharing options...
john renfrew Posted May 16, 2011 Author Share Posted May 16, 2011 Just so happens I have updated my demo file this week So here is is Three layouts FMP7 QR codes for use with Go QR codes with a web address Datamatrix code John Update do not seem to be able to upload files if anyone can fix this first then you can gladly have it..... Link to comment Share on other sites More sharing options...
john renfrew Posted May 16, 2011 Author Share Posted May 16, 2011 For now here is the code //DataMXimg(fm_content) //2011_05_15 JR //v1 //takes content from fm_content and returns image to container //requires min itextpdf.jar 5.02 from itextpdf.com import java.awt.image.* import com.itextpdf.text.* import com.itextpdf.text.pdf.* qr = new BarcodeDatamatrix() qr.generate(fm_content) img = qr.createAwtImage(Color.BLACK, Color.WHITE) int w = img.getWidth() int h = img.getHeight() bi = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB) g2 = bi.createGraphics() g2.drawImage(img, 0, 0, w, h, null) g2.dispose() return bi Link to comment Share on other sites More sharing options...
andries Posted May 16, 2011 Share Posted May 16, 2011 Personally I love the zxing library to do that for me. http://code.google.com/p/zxing/ It can also read an image with a QR code in it (even when it is a picture of a building with a QR code on it) and returns the value of the QR code. Andries Link to comment Share on other sites More sharing options...
Bailey Kessing Posted May 19, 2011 Share Posted May 19, 2011 Awesome and thanks if you have the sample file that would help thanks Link to comment Share on other sites More sharing options...
john renfrew Posted May 19, 2011 Author Share Posted May 19, 2011 attached... EXCEPT you need to change the pdf extension to fp7 as it wont let me upload Filemaker file !! John QRcode.pdf Link to comment Share on other sites More sharing options...
Newbies tylercaro Posted June 13, 2014 Newbies Share Posted June 13, 2014 Personally I love the zxing library to do that for me. http://code.google.com/p/zxing/ It can also read an image with a QR code in it (even when it is a picture of a building with a QR code on it) and returns the value of the QR code. Andries thanks andries, i have used zxing library for barcode, works great for me. and i am also testing other projects: how to create colorful qr code in java. Link to comment Share on other sites More sharing options...
Newbies bobbell2 Posted November 7, 2014 Newbies Share Posted November 7, 2014 Personally I love the zxing library to do that for me. http://code.google.com/p/zxing/ It can also read an image with a QR code in it (even when it is a picture of a building with a QR code on it) and returns the value of the QR code. Andries Thank you, i also have used this library for qrcode, it's very useful for me. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 3481 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