/ PDF / PdfCheckBoxStyle
Search results

PdfCheckBoxStyle API in JavaScript PDF API control

Public Enum to define check box style.

// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data, password);
// Access check box field
let field: PdfCheckBoxField = document.form.fieldAt(0) as PdfCheckBoxField;
// Access first item of check box field
let item: PdfStateItem = field.itemAt(0) as PdfStateItem;
// Sets the check box style as check
item.style = PdfCheckBoxStyle.check;
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();
  • check - Specifies the type of check.
  • circle - Specifies the type of circle.
  • cross - Specifies the type of cross.
  • diamond - Specifies the type of diamond.
  • square - Specifies the type of square.
  • star - Specifies the type of star.