Example: The following example will place a Data Matrix 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 data matrix bar code
DataMatrixBarCode dataMatrixBarCode = new DataMatrixBarCode("DataMatrix Bar code", 100, 100);
// Add the data matrix Bar code to the page
page.getElements().add(dataMatrixBarCode);
// Save the PDF
document.draw("[Physicalpath]/MyDocument.pdf" );
}
}