General Overview of BarCodes and using them to encode and decode
BitMatrix bitMatrix = null;// initialize bitMatrix = new PDF417Writer().encode("Content",BarcodeFormat.PDF_417 , true, 440, 48, 10, 100, 10, 100, Compaction.TEXT); // initialize PDF MatrixToImageWriter.writeToStream(bitMatrix, "png", new FileOutputStream(new File("//pdf8.png"))); //convert to stream DecoderResult decode = new Decoder().decode(bitMatrix);