PdfRadioButtonListItem
class represents the radio button field item objects.
// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data);
// Gets the first page of the document
let page: PdfPage = document.getPage(0) as PdfPage;
// Access the PDF form
let form: PdfForm = document.form;
// Create a new radio button list field
let field: PdfRadioButtonListField = new PdfRadioButtonListField(page, 'Age');
// Create and add first item
let first: PdfRadioButtonListItem = field.add('1-9', {x: 100, y: 140, width: 20, height: 20});
// Create and add second item
let second: PdfRadioButtonListItem = new PdfRadioButtonListItem('10-49', {x: 100, y: 170, width: 20, height: 20}, page);
field.add(second);
// Create and add third item
let third: PdfRadioButtonListItem = new PdfRadioButtonListItem('50-59', {x: 100, y: 200, width: 20, height: 20}, field);
field.add(third);
// Sets selected index of the radio button list field
field.selectedIndex = 0;
// Add the field into PDF form
form.add(field);
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();
string
Gets the author of the annotation.
number[]
Gets the back color of the annotation.
PdfAnnotationBorder
Gets the border of the annotation.
number[]
Gets the border color of the annotation.
Object
Gets the bounds of the annotation.
PdfAnnotationCaption
Gets the caption of the annotation.
boolean
Gets the flag to indicate whether the field item is checked or not.
number[]
Gets the fore color of the annotation.
Date
Gets the creation date of the annotation.
PdfAnnotationFlag
Gets the flags of the annotation.
boolean
Gets the boolean flag indicating whether the annotation have been flattened or not.
boolean
Gets the boolean flag indicating whether annotation’s popup have been flattened or not.
PdfFont
Gets the font of the item.
PdfHighlightMode
Gets the highlight mode of the annotation.
number[]
Gets the inner color of the annotation.
PdfLayer
Gets the PdfLayer
of the annotation.
Date
Gets the modification date of the annotation.
string
Gets the name of the annotation.
number
Gets the opacity of the annotation.
PdfPage
Gets the page object (Read only).
number
Gets the rotation angle of the annotation.
PdfRotationAngle
Gets the rotation of the annotation.
boolean
Gets the flag to indicate whether the field item is selected or not.
PdfCheckBoxStyle
Gets the style of annotation.
string
Gets the subject of the annotation.
string
Gets the text of the annotation.
PdfTextAlignment
Gets the text alignment of the annotation.
string
Gets the value of the radio button list field item
PdfFormFieldVisibility
Gets the visibility.
Gets the values associated with the specified key.
Parameter | Type | Description |
---|---|---|
name | string |
Key. |
Returns string[]
Set the boolean flag to create a new appearance stream for annotations.
Parameter | Type | Description |
---|---|---|
value | boolean |
Set appearance. |
Returns void
Sets the values associated with the specified key.
Parameter | Type | Description |
---|---|---|
name | string |
Key. |
value | string |
Value associated with the key.. |
Returns void