Modify Form Fields in Angular PDF Viewer
13 Nov 202624 minutes to read
You can modify form fields using the UI or API.
Modify PDF Form Field Properties using the UI
- Right click a field → Properties to update settings.
- Drag to move; use handles to resize.
- Use the toolbar to toggle field mode or add new fields.
Modify PDF Form Field Properties Programmatically
Use updateFormField() to change behavior/data (including position and size):
import { Component, ViewChild } from '@angular/core';
import {
ToolbarService,
MagnificationService,
NavigationService,
AnnotationService,
TextSelectionService,
TextSearchService,
FormFieldsService,
FormDesignerService,
PdfViewerModule,
PdfViewerComponent,
} from '@syncfusion/ej2-angular-pdfviewer';
@Component({
selector: 'app-root',
standalone: true,
imports: [PdfViewerModule],
template: `
<div class="content-wrapper">
<button (click)="modifyTextbox()">Apply Textbox Changes</button>
<ejs-pdfviewer #pdfViewer id="pdfViewer"
[resourceUrl]="resourceUrl"
[documentPath]="document"
style="height: 640px; display: block;">
</ejs-pdfviewer>
</div>
`,
providers: [
ToolbarService,
MagnificationService,
NavigationService,
AnnotationService,
TextSelectionService,
TextSearchService,
FormFieldsService,
FormDesignerService,
],
})
export class AppComponent {
public document: string = 'https://cdn.syncfusion.com/content/pdf/form-filling-document.pdf';
public resourceUrl: string = 'https://cdn.syncfusion.com/ej2/31.1.23/dist/ej2-pdfviewer-lib';
@ViewChild('pdfViewer') public pdfviewer!: PdfViewerComponent;
modifyTextbox(): void {
const fields = this.pdfviewer.retrieveFormFields();
const field = fields.find((f: any) => f.name === 'First Name') || fields[0];
if (field) {
this.pdfviewer.formDesignerModule.updateFormField(field, {
value: 'John',
fontFamily: 'Courier',
fontSize: 12,
fontStyle: 'None' as any,
color: 'black',
backgroundColor: 'white',
borderColor: 'black',
thickness: 2,
alignment: 'Left',
maxLength: 50
} as any);
}
}
}Modify PDF Form Field Properties by Field type
Textbox
- UI: Update value, font, size, colors, border thickness, alignment, max length, multiline.
- API: updateFormField() for value, typography, alignment, colors, borders.
import { Component, ViewChild } from '@angular/core';
import {
ToolbarService,
MagnificationService,
NavigationService,
AnnotationService,
TextSelectionService,
TextSearchService,
FormFieldsService,
FormDesignerService,
PdfViewerModule,
PdfViewerComponent,
} from '@syncfusion/ej2-angular-pdfviewer';
@Component({
selector: 'app-root',
standalone: true,
imports: [PdfViewerModule],
template: `
<div class="content-wrapper">
<button (click)="modifyTextbox()">Apply Textbox Changes</button>
<ejs-pdfviewer #pdfViewer id="pdfViewer"
[resourceUrl]="resourceUrl"
[documentPath]="document"
style="height: 640px; display: block;">
</ejs-pdfviewer>
</div>
`,
providers: [
ToolbarService,
MagnificationService,
NavigationService,
AnnotationService,
TextSelectionService,
TextSearchService,
FormFieldsService,
FormDesignerService,
],
})
export class AppComponent {
public document: string = 'https://cdn.syncfusion.com/content/pdf/form-filling-document.pdf';
public resourceUrl: string = 'https://cdn.syncfusion.com/ej2/31.1.23/dist/ej2-pdfviewer-lib';
@ViewChild('pdfViewer') public pdfviewer!: PdfViewerComponent;
modifyTextbox(): void {
const fields = this.pdfviewer.retrieveFormFields();
const field = fields.find((f: any) => f.name === 'First Name') || fields[0];
if (field) {
this.pdfviewer.formDesignerModule.updateFormField(field, {
value: 'John',
fontFamily: 'Courier',
fontSize: 12,
fontStyle: 'None' as any,
color: 'black',
backgroundColor: 'white',
borderColor: 'black',
thickness: 2,
alignment: 'Left',
maxLength: 50
} as any);
}
}
}Password
- UI: Tooltip, required, max length, font, appearance.
- API: updateFormField() for tooltip, validation flags, typography, colors, alignment, borders.
import { Component, ViewChild } from '@angular/core';
import {
ToolbarService,
MagnificationService,
NavigationService,
AnnotationService,
TextSelectionService,
TextSearchService,
FormFieldsService,
FormDesignerService,
PdfViewerModule,
PdfViewerComponent,
} from '@syncfusion/ej2-angular-pdfviewer';
@Component({
selector: 'app-root',
standalone: true,
imports: [PdfViewerModule],
template: `
<div class="content-wrapper">
<button (click)="modifyPassword()">Edit PasswordBox</button>
<ejs-pdfviewer #pdfViewer id="pdfViewer"
[resourceUrl]="resourceUrl"
[documentPath]="document"
style="height: 640px; display: block;">
</ejs-pdfviewer>
</div>
`,
providers: [
ToolbarService,
MagnificationService,
NavigationService,
AnnotationService,
TextSelectionService,
TextSearchService,
FormFieldsService,
FormDesignerService,
],
})
export class AppComponent {
public document: string = 'https://cdn.syncfusion.com/content/pdf/form-filling-document.pdf';
public resourceUrl: string = 'https://cdn.syncfusion.com/ej2/31.1.23/dist/ej2-pdfviewer-lib';
@ViewChild('pdfViewer') public pdfviewer!: PdfViewerComponent;
modifyPassword(): void {
const fields = this.pdfviewer.retrieveFormFields();
const field = fields.find((f: any) => f.name === 'Password');
if (field) {
this.pdfviewer.formDesignerModule.updateFormField(field, {
tooltip: 'Enter your password',
isReadOnly: false,
isRequired: true,
isPrint: true,
fontFamily: 'Courier',
fontSize: 10,
color: 'black',
borderColor: 'black',
backgroundColor: 'white',
alignment: 'Left',
maxLength: 20,
thickness: 1
} as any);
}
}
}CheckBox
- UI: Toggle checked state.
- API: updateFormField() for isChecked, tooltip, colors, borders.
import { Component, ViewChild } from '@angular/core';
import {
ToolbarService,
MagnificationService,
NavigationService,
AnnotationService,
TextSelectionService,
TextSearchService,
FormFieldsService,
FormDesignerService,
PdfViewerModule,
PdfViewerComponent,
} from '@syncfusion/ej2-angular-pdfviewer';
@Component({
selector: 'app-root',
standalone: true,
imports: [PdfViewerModule],
template: `
<div class="content-wrapper">
<button (click)="modifyCheckbox()">Modify CheckBox</button>
<ejs-pdfviewer #pdfViewer id="pdfViewer"
[resourceUrl]="resourceUrl"
[documentPath]="document"
style="height: 640px; display: block;">
</ejs-pdfviewer>
</div>
`,
providers: [
ToolbarService,
MagnificationService,
NavigationService,
AnnotationService,
TextSelectionService,
TextSearchService,
FormFieldsService,
FormDesignerService,
],
})
export class AppComponent {
public document: string = 'https://cdn.syncfusion.com/content/pdf/form-filling-document.pdf';
public resourceUrl: string = 'https://cdn.syncfusion.com/ej2/31.1.23/dist/ej2-pdfviewer-lib';
@ViewChild('pdfViewer') public pdfviewer!: PdfViewerComponent;
modifyCheckbox(): void {
const fields = this.pdfviewer.retrieveFormFields();
const cb = fields.find((f: any) => f.name === 'Subscribe');
if (cb) {
this.pdfviewer.formDesignerModule.updateFormField(cb, {
isChecked: true,
backgroundColor: 'white',
borderColor: 'black',
thickness: 2,
tooltip: 'Subscribe to newsletter'
} as any);
}
}
}RadioButton
- UI: Set selected item in a group (same Name).
- API: updateFormField() to set selected value and border appearance.
import { Component, ViewChild } from '@angular/core';
import {
ToolbarService,
MagnificationService,
NavigationService,
AnnotationService,
TextSelectionService,
TextSearchService,
FormFieldsService,
FormDesignerService,
PdfViewerModule,
PdfViewerComponent,
} from '@syncfusion/ej2-angular-pdfviewer';
@Component({
selector: 'app-root',
standalone: true,
imports: [PdfViewerModule],
template: `
<div class="content-wrapper">
<button (click)="modifyRadio()">Modify RadioButton</button>
<ejs-pdfviewer #pdfViewer id="pdfViewer"
[resourceUrl]="resourceUrl"
[documentPath]="document"
style="height: 640px; display: block;">
</ejs-pdfviewer>
</div>
`,
providers: [
ToolbarService,
MagnificationService,
NavigationService,
AnnotationService,
TextSelectionService,
TextSearchService,
FormFieldsService,
FormDesignerService,
],
})
export class AppComponent {
public document: string = 'https://cdn.syncfusion.com/content/pdf/form-filling-document.pdf';
public resourceUrl: string = 'https://cdn.syncfusion.com/ej2/31.1.23/dist/ej2-pdfviewer-lib';
@ViewChild('pdfViewer') public pdfviewer!: PdfViewerComponent;
modifyRadio(): void {
const fields = this.pdfviewer.retrieveFormFields();
const genderRadios = fields.filter((f: any) => f.name === 'Gender');
if (genderRadios[1]) {
this.pdfviewer.formDesignerModule.updateFormField(genderRadios[0], { isSelected: false } as any);
this.pdfviewer.formDesignerModule.updateFormField(genderRadios[1], { isSelected: true, thickness: 2, borderColor: 'black' } as any);
}
}
}ListBox
- UI: Add/remove items, set selection, adjust fonts/colors.
- API: updateFormField() for items, selection, borders.
import { Component, ViewChild } from '@angular/core';
import {
ToolbarService,
MagnificationService,
NavigationService,
AnnotationService,
TextSelectionService,
TextSearchService,
FormFieldsService,
FormDesignerService,
PdfViewerModule,
PdfViewerComponent,
} from '@syncfusion/ej2-angular-pdfviewer';
@Component({
selector: 'app-root',
standalone: true,
imports: [PdfViewerModule],
template: `
<div class="content-wrapper">
<button (click)="editListBox()">Edit ListBox</button>
<ejs-pdfviewer #pdfViewer id="pdfViewer"
[resourceUrl]="resourceUrl"
[documentPath]="document"
style="height: 640px; display: block;">
</ejs-pdfviewer>
</div>
`,
providers: [
ToolbarService,
MagnificationService,
NavigationService,
AnnotationService,
TextSelectionService,
TextSearchService,
FormFieldsService,
FormDesignerService,
],
})
export class AppComponent {
public document: string = 'https://cdn.syncfusion.com/content/pdf/form-filling-document.pdf';
public resourceUrl: string = 'https://cdn.syncfusion.com/ej2/31.1.23/dist/ej2-pdfviewer-lib';
@ViewChild('pdfViewer') public pdfviewer!: PdfViewerComponent;
editListBox(): void {
const fields = this.pdfviewer.retrieveFormFields();
const lb = fields.find((f: any) => f.name === 'States');
if (lb) {
const option = [
{ itemName: 'Alabama', itemValue: 'AL' },
{ itemName: 'Alaska', itemValue: 'AK' },
{ itemName: 'Arizona', itemValue: 'AZ' },
];
this.pdfviewer.formDesignerModule.updateFormField(lb, {
fontFamily: 'Courier',
fontSize: 5,
color: 'black',
backgroundColor: 'white',
tooltip: 'listbox',
options: option,
} as any);
}
}
}DropDown
- UI: Add/remove items, default value, appearance.
- API: updateFormField() for items, value, borders.
import { Component, ViewChild } from '@angular/core';
import {
ToolbarService,
MagnificationService,
NavigationService,
AnnotationService,
TextSelectionService,
TextSearchService,
FormFieldsService,
FormDesignerService,
PdfViewerModule,
PdfViewerComponent,
} from '@syncfusion/ej2-angular-pdfviewer';
@Component({
selector: 'app-root',
standalone: true,
imports: [PdfViewerModule],
template: `
<div class="content-wrapper">
<button (click)="editDropDown()">Edit DropDown</button>
<ejs-pdfviewer #pdfViewer id="pdfViewer"
[resourceUrl]="resourceUrl"
[documentPath]="document"
style="height: 640px; display: block;">
</ejs-pdfviewer>
</div>
`,
providers: [
ToolbarService,
MagnificationService,
NavigationService,
AnnotationService,
TextSelectionService,
TextSearchService,
FormFieldsService,
FormDesignerService,
],
})
export class AppComponent {
public document: string = 'https://cdn.syncfusion.com/content/pdf/form-filling-document.pdf';
public resourceUrl: string = 'https://cdn.syncfusion.com/ej2/31.1.23/dist/ej2-pdfviewer-lib';
@ViewChild('pdfViewer') public pdfviewer!: PdfViewerComponent;
editDropDown(): void {
const fields = this.pdfviewer.retrieveFormFields();
const dd = fields.find((f: any) => f.name === 'Country');
if (dd) {
this.pdfviewer.formDesignerModule.updateFormField(dd, {
options: [
{ itemName: 'USA', itemValue: 'US' },
{ itemName: 'Canada', itemValue: 'CA' },
{ itemName: 'Mexico', itemValue: 'MX' }
],
value: 'US',
fontFamily: 'Courier',
fontSize: 10,
color: 'black',
borderColor: 'black',
backgroundColor: 'white'
} as any);
}
}
}Signature Field
- UI: Tooltip, thickness, indicator text, required/visibility.
- API: updateFormField() for tooltip, required, colors, borders.
import { Component, ViewChild } from '@angular/core';
import {
ToolbarService,
MagnificationService,
NavigationService,
AnnotationService,
TextSelectionService,
TextSearchService,
FormFieldsService,
FormDesignerService,
PdfViewerModule,
PdfViewerComponent,
} from '@syncfusion/ej2-angular-pdfviewer';
@Component({
selector: 'app-root',
standalone: true,
imports: [PdfViewerModule],
template: `
<div class="content-wrapper">
<button (click)="editSignature()">Edit Signature</button>
<ejs-pdfviewer #pdfViewer id="pdfViewer"
[resourceUrl]="resourceUrl"
[documentPath]="document"
style="height: 640px; display: block;">
</ejs-pdfviewer>
</div>
`,
providers: [
ToolbarService,
MagnificationService,
NavigationService,
AnnotationService,
TextSelectionService,
TextSearchService,
FormFieldsService,
FormDesignerService,
],
})
export class AppComponent {
public document: string = 'https://cdn.syncfusion.com/content/pdf/form-filling-document.pdf';
public resourceUrl: string = 'https://cdn.syncfusion.com/ej2/31.1.23/dist/ej2-pdfviewer-lib';
@ViewChild('pdfViewer') public pdfviewer!: PdfViewerComponent;
editSignature(): void {
const fields = this.pdfviewer.retrieveFormFields();
const sig = fields.find((f: any) => f.name === 'Sign');
if (sig) {
this.pdfviewer.formDesignerModule.updateFormField(sig, {
tooltip: 'Please sign here',
thickness: 3,
isRequired: true,
isPrint: true,
backgroundColor: 'white',
borderColor: 'black'
} as any);
}
}
}Initial Field
- UI: Tooltip, indicator text, thickness, required/visibility.
- API: updateFormField() for tooltip, required, colors, borders.
import { Component, ViewChild } from '@angular/core';
import {
ToolbarService,
MagnificationService,
NavigationService,
AnnotationService,
TextSelectionService,
TextSearchService,
FormFieldsService,
FormDesignerService,
PdfViewerModule,
PdfViewerComponent,
} from '@syncfusion/ej2-angular-pdfviewer';
@Component({
selector: 'app-root',
standalone: true,
imports: [PdfViewerModule],
template: `
<div class="content-wrapper">
<button (click)="editInitial()">Edit Initial</button>
<ejs-pdfviewer #pdfViewer id="pdfViewer"
[resourceUrl]="resourceUrl"
[documentPath]="document"
style="height: 640px; display: block;">
</ejs-pdfviewer>
</div>
`,
providers: [
ToolbarService,
MagnificationService,
NavigationService,
AnnotationService,
TextSelectionService,
TextSearchService,
FormFieldsService,
FormDesignerService,
],
})
export class AppComponent {
public document: string = 'https://cdn.syncfusion.com/content/pdf/form-filling-document.pdf';
public resourceUrl: string = 'https://cdn.syncfusion.com/ej2/31.1.23/dist/ej2-pdfviewer-lib';
@ViewChild('pdfViewer') public pdfviewer!: PdfViewerComponent;
editInitial(): void {
const fields = this.pdfviewer.retrieveFormFields();
const init = fields.find((f: any) => f.name === 'Initial');
if (init) {
this.pdfviewer.formDesignerModule.updateFormField(init, {
tooltip: 'Add your initials',
thickness: 2,
isRequired: true,
isPrint: true,
backgroundColor: 'white',
borderColor: 'black'
} as any);
}
}
}DateTime Picker
Select a DateTime Picker field in Form Designer to review or change its settings. The toolbar includes the DateTime Picker tool, and the page displays date and time fields.

Date and time fields can also be used to enter values directly or choose a value from the picker:
-
For a date field, type a date or open the calendar picker.

-
For a time field, type a time or open the time picker.

Use the field’s General properties to review or edit its name, value, tooltip, visibility, read-only and required settings, and print visibility.

The Appearance properties include font, colors, border, and alignment.

Use the Format tab to change the field type (Date or Time), select a display format, and review the preview.

- API: updateFormField() for value, format script, typography, colors, borders.
Button
Select a Button field in Form Designer to review or change its settings. The toolbar includes the Button tool, and the page displays the button field.

Use the field’s General properties to review or edit its name, value, tooltip, visibility, read-only and required settings, and print visibility.
The Appearance properties include font, colors, border, and alignment of the button caption.
Button Actions
Use the Actions tab to associate an action with the button field. The action is executed when the corresponding event occurs.
| Action | Description |
|---|---|
mouseUp |
Executes the action when the mouse button is released over the button field. |
mouseDown |
Executes the action when the mouse button is pressed over the button field. |
mouseEnter |
Executes the action when the pointer enters the button field area. |
mouseLeave |
Executes the action when the pointer leaves the button field area. |
gotFocus |
Executes the action when the button field receives focus. |
lostFocus |
Executes the action when the button field loses focus. |

The Go To Action navigates the viewer to a specific page, position, and zoom level in the document when the action is triggered.
| Property | Description |
|---|---|
destinationPageNumber |
The page number to navigate to. |
destinationLocation |
The position (x and y) within the destination page. |
zoomValue |
The zoom level applied when navigating to the destination. A value of 0 retains the current zoom level. |
- API:
updateFormField()for the button text, value, tooltip, alignment, typography, colors, borders, and actions.
import { Component, ViewChild } from '@angular/core';
import {
ToolbarService,
MagnificationService,
NavigationService,
AnnotationService,
TextSelectionService,
TextSearchService,
FormFieldsService,
FormDesignerService,
PdfViewerModule,
PdfViewerComponent,
} from '@syncfusion/ej2-angular-pdfviewer';
import { ActionType } from '@syncfusion/ej2-pdfviewer';
@Component({
selector: 'app-root',
standalone: true,
imports: [PdfViewerModule],
template: `
<div class="content-wrapper">
<button (click)="editButton()">Edit Button</button>
<ejs-pdfviewer #pdfViewer id="pdfViewer" (documentLoad)="onDocumentLoad()"
[resourceUrl]="resourceUrl"
[documentPath]="document"
style="height: 640px; display: block;">
</ejs-pdfviewer>
</div>
`,
providers: [
ToolbarService,
MagnificationService,
NavigationService,
AnnotationService,
TextSelectionService,
TextSearchService,
FormFieldsService,
FormDesignerService,
],
})
export class AppComponent {
public document: string = 'https://cdn.syncfusion.com/content/pdf/form-filling-document.pdf';
public resourceUrl: string = 'https://cdn.syncfusion.com/ej2/31.1.23/dist/ej2-pdfviewer-lib';
@ViewChild('pdfViewer') public pdfviewer!: PdfViewerComponent;
onDocumentLoad(): void {
// Add a button field that can be modified afterwards
this.pdfviewer.formDesignerModule.addFormField('ButtonField', {
name: 'Submit1',
pageNumber: 1,
bounds: { X: 100, Y: 350, Width: 120, Height: 32 },
value: 'Submit',
text: 'Submit',
tooltip: 'Click to submit'
} as any);
}
editButton(): void {
const fields = this.pdfviewer.retrieveFormFields();
const button = fields.find((field: any) => field.name === 'Submit1');
if (button) {
this.pdfviewer.formDesignerModule.updateFormField(button, {
value: 'Submit Button',
text: 'Submit Button',
alignment: 'Left',
tooltip: 'Updated Submit Button',
actions: {
mouseUp: {
action: ActionType.GoTo,
destinationPageNumber: 7,
destinationLocation: { x: 100, y: 100 },
zoomValue: 1
}
}
} as any);
}
}
}Barcode
Select a Barcode field in Form Designer to review or change its settings. The toolbar includes the Barcode tool, and the page displays the generated barcode.

Use the field’s General properties to review or edit its name, value, caption, tooltip, visibility, read-only and required settings, and print visibility.
The Options properties include the barcode type, X dimension, error correction level, and the option to compress the data before encoding it to the barcode.
Symbology
The barcode type is referred to as the symbology. The following symbologies are supported, and PDF417 is used by default.
| Symbology | Description |
|---|---|
PDF417 |
A stacked, linear barcode that supports alphanumeric data. This is the default symbology. |
QRCode |
A two-dimensional matrix barcode that supports numeric, alphanumeric, and binary data. |
DataMatrix |
A two-dimensional matrix barcode that is used to encode a small amount of data in a compact area. |

Value Format
The value that is encoded in the barcode can be supplied in three ways.
| Value format | Description |
|---|---|
TabDelimited |
Carries the values in the barcode separated by a tab character, so the values appear at a tab space distance from each other. |
XML |
Stores the values pairwise in an XML structure. |
CustomValue |
Stores the value as a string, and any string can be assigned to it. |

Complete support for executing custom scripts is not available. Instead, the PDF Viewer parses the final value assigned to the barcode field in the PDF document.
Static Barcode Value
The barcode value can be set to a fixed value from the Value tab of the Barcode Properties dialog.
Select Custom Value in the Encode dropdown, and then enter the text to be encoded in the Custom Value text box.

Dynamic Barcode Value
The barcode value can also be calculated from the other form fields that are present in the PDF document.
In the Form Designer, open the Value tab of the Barcode Properties dialog and use the Select Field for Calculation option to bind one or more fields to the barcode field.

When a value is entered in a bound field, the barcode value is updated automatically.
By default, the barcode stores the field name along with its value. To store only the field values, clear the Include Field Names option. This option is available only for the
TabDelimitedformat and does not apply to theXMLformat, which always stores data as name-value pairs.
Barcode Caption
By default, the name of the loaded PDF document is displayed below the generated barcode field. Use the caption property to change this text, either from the UI or programmatically.
Error Correction Level
The error correction level determines how much damage the generated barcode can tolerate before it can no longer be read. The available levels depend on the selected symbology.
| Symbology | Supported values |
|---|---|
PDF417 |
Level0 to Level8
|
QRCode |
Low, Medium, Quartile, High
|
DataMatrix |
Not applicable, since Data Matrix does not use this setting. |
The default error correction level is Level5.

- API: updateFormField() for caption, symbology, value format, and error correction level.
import { Component, ViewChild } from '@angular/core';
import {
ToolbarService,
MagnificationService,
NavigationService,
AnnotationService,
TextSelectionService,
TextSearchService,
FormFieldsService,
FormDesignerService,
PdfViewerModule,
PdfViewerComponent,
BarcodeFieldSettings,
} from '@syncfusion/ej2-angular-pdfviewer';
@Component({
selector: 'app-root',
standalone: true,
imports: [PdfViewerModule],
template: `
<div class="content-wrapper">
<button (click)="editBarcode()">Edit Barcode</button>
<ejs-pdfviewer #pdfViewer id="pdfViewer"
[resourceUrl]="resourceUrl"
[documentPath]="document"
style="height: 640px; display: block;">
</ejs-pdfviewer>
</div>
`,
providers: [
ToolbarService,
MagnificationService,
NavigationService,
AnnotationService,
TextSelectionService,
TextSearchService,
FormFieldsService,
FormDesignerService,
],
})
export class AppComponent {
public document: string = 'https://cdn.syncfusion.com/content/pdf/form-filling-document.pdf';
public resourceUrl: string = 'https://cdn.syncfusion.com/ej2/31.1.23/dist/ej2-pdfviewer-lib';
@ViewChild('pdfViewer') public pdfviewer!: PdfViewerComponent;
editBarcode(): void {
const fields = this.pdfviewer.retrieveFormFields();
const barcode = fields.find((f: any) => f.name === 'ProductBarcode');
if (barcode) {
this.pdfviewer.formDesignerModule.updateFormField(barcode, {
caption: 'Updated Barcode Caption',
symbology: 'QRCode',
valueFormat: 'CustomValue',
errorCorrectionLevel: 'High'
} as BarcodeFieldSettings);
}
}
}