Example: The following example shows how to create an Check Box and Add it to the page.
import com.cete.dynamicpdf.*; import com.cete.dynamicpdf.pageelements.forms.CheckBox; public class MyClass{ public static void main(String args[]) { // Create a PDF Document Document document = new Document(); // Create a PDF Page Page page = new Page( PageSize.LETTER ); // Create an Check Box CheckBox checkBox = new CheckBox( "chk", 5, 7, 50, 50 ); checkBox.setDefaultChecked( true ); checkBox.setToolTip( "Check it" ); // Add the Check Box to the page page.getElements().add( checkBox ); // Add pages to the document document.getPages().add( page ); // Save the PDF document document.draw("[PhysicalPath]/MyDocument.pdf"); } }