Follow on Google News News By Tag * Java * Barcode * recognize barcodes from PDF documents * Generate A Barcode Image * create Adobe PDF document * Insert Barcod * More Tags... Industry News News By Place Country(s) Industry News
Follow on Google News | Generate & Recognize Barcodes from PDF Documents in Java ApplicationsAspose.BarCode is a Java based visual component for generation & recognition of 1D & 2D barcodes to support Java and web applications. It supports 29+ barcode symbologies like MSI, QR, OneCode, Australia Post, Aztec, Code128, Code11and EAN128 etc
By: Aspose Below is the complete java program to generate and recognize barcodes from Adobe PDF documents: [Java] import com.aspose.barcode.*; import com.aspose.barcoderecognition.BarCodeReadType; import com.aspose.barcoderecognition.BarCodeReader; import com.aspose.pdf.elements.Pdf; import com.aspose.pdf.elements.Section; import com.aspose.pdf.kit.License; import com.aspose.pdf.kit.PdfExtractor; import java.awt.Toolkit; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; public class RecognitionFromPdf { public static void main(String[] { try { // set license License licPdfKit = new License(); FileInputStream stream = new FileInputStream(" licPdfKit.setLicense( com.aspose.barcode.License licBarCode = new com.aspose.barcode.License(); licBarCode.setLicense(" String strPdfDoc = " output1.pdf"; String strBarCodeImage = ""; // generate barcode and add to pdf file BarCodeBuilder builder = new BarCodeBuilder(); builder.setSymbologyType( builder.setCodeText(" String strBarCodeImageSave = " img.jpg"; builder.save( //Instantiate a Pdf object by calling its empty constructor Pdf pdf1 = new Pdf(); //Create a section in the Pdf object Section sec1 = pdf1.getSections() //Create an image object in the section com.aspose.pdf.elements.Image img1 = new com.aspose.pdf.elements.Image( //Add image object into the Paragraphs collection of the section sec1.getParagraphs() //Set the path of image file img1.getImageInfo() img1.getImageInfo() //Save the Pdf FileOutputStream out = new FileOutputStream( pdf1.save( //Instantiate PdfExtractor object PdfExtractor extractor = new PdfExtractor(); //Bind the input PDF document to extractor extractor.bindPdf( //Extract images from the input PDF document extractor.extractImage(); String suffix = ".jpg"; int imageCount = 1; while (extractor.hasNextImage()) System.out.println(" strBarCodeImage = "tmpbarcode" extractor.getNextImage( // recognize barcode from image BarCodeReader reader = new BarCodeReader( while (reader.read()) { System.out.println(" } imageCount++; reader.close(); } } catch( { System.out.println( } } } More about Aspose.BarCode for Java - Homepage of Aspose.BarCode for Java: http://www.aspose.com/ - Read more technical tips by Aspose.BarCode for Java: http://docs.aspose.com/ - Download Aspose.BarCode for Java: http://www.aspose.com/ Contact Information Aspose Pty Ltd Suite 163, 79 Longueville Road Lane Cove, NSW, 2066 Australia http://www.aspose.com/ sales@aspose.com Phone: 888.277.6734 Fax: 866.810.9465 # # # Hello everyone, I am part of Aspose.com "The .NET and Java component publisher!". It is my pleasure to be part of this beautiful world. If I could bring any positive change to this community will be a great honour fo rme. Thanks to you all. End
|
|