com.cete.dynamicpdf.pageelements.barcoding
Class Aztec



Examples Description
Example 1 The following example will place an Aztec barcode on the page.
Example 2 The following example shows how to use the GetOverflowAztec method to allow aztec barcodes to flow onto new pages as needed.
Example 3 The following example shows how to use the GetOverflowAztec method with x and y co ordinates to allow aztec barcodes to flow onto new pages as needed.


Example 1 : The following example will place an Aztec barcode on the page. 
   import com.cete.dynamicpdf.*;
   import com.cete.dynamicpdf.pageelements.*;
 
   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
         Aztec barCode = new Aztec("Hello World", 50, 50, AztecSymbolSize.FULL, 5);        
 
         // Add the barcode to the page
         page.getElements().add(barCode); 
 
         // Save the PDF
         document.draw("[Physicalpath]/MyDocument.pdf" );
      }
    }

Top

EXample 2 : The following example shows how to use the GetOverflowAztec method to allow aztec barcodes to flow onto new pages as needed.
   import com.cete.dynamicpdf.*;
   import com.cete.dynamicpdf.pageelements.*;
 
   public class MyClass {
     public static void main(String args[]) {
         // Create a PDF Document
         Document document = new Document();           
 
         // Create a barcode
         Aztec aztec = new Aztec("Lorem ipsum dolor sit amet, consectetur adipiscing elit.", 50, 50, AztecSymbolSize.R23XC23, 5);

         aztec.setAllowStructuredAppend(true);
         aztec.setMessageID ("ID");

         do {
             // Create a Page
             Page page = new Page();

             // Add the Aztec barcode to the page
             page.getElements().add(aztec);

             // Add page to the document
             document.getPages().add(page);

             aztec = aztec.getOverflowAztec();
         } while (aztec != null);
 
         // Save the PDF
         document.draw("[Physicalpath]/MyDocument.pdf" );
      }
    }

Top

Example 3 : The following example shows how to use the GetOverflowAztec method with x and y co ordinates to allow aztec barcodes to flow onto new pages as needed.
   import com.cete.dynamicpdf.*;
   import com.cete.dynamicpdf.pageelements.*;
 
   public class MyClass {
     public static void main(String args[]) {
         // Create a PDF Document
         Document document = new Document();
           
         float x = 10.0f;
         float y = 10.0f; ;

         // Create an Aztec barcode
         Aztec aztec = new Aztec("Lorem ipsum dolor sit amet, consectetur adipiscing elit.", x, y, AztecSymbolSize.R23XC23, 5);

         aztec.setAllowStructuredAppend(true);
         aztec.setMessageID ("ID");

         do {
             // Create a Page
             Page page = new Page();

             // Add the Aztec barcode to the page
             page.getElements().add(aztec);

             // Add page to the document
             document.getPages().add(page);

             aztec = aztec.getOverflowAztec(x, y + 150);
         } while (aztec != null);
 
         // Save the PDF
         document.draw("[Physicalpath]/MyDocument.pdf" );
      }
    }

Top