com.cete.dynamicpdf.pageelements.barcoding
Class Code25


Example: The following example will place a Code 2 of 5 bar code on the page.

import com.cete.dynamicpdf.*;
import com.cete.dynamicpdf.pageelements.barcoding.*;
 
public class MyClass{
       public static void main(String args[]){
           
           // Create a PDF Document
           Document document = new Document();
           
           // Create a Page and add it to the document
           Page page = new Page();
           document.getPages().add(page);
 
           // Create a barcode
           Code25 barCode = new Code25("1234567890", 50, 100, 48);
 
           // Add the barcode to the page
           page.getElements().add(barCode); 
 
           // Save the PDF
           document.draw("[Physicalpath]/MyDocument.pdf" );
       }
 }