{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "pdf-viewer-form-filling",
  "framework": "angular",
  "type": "registry:component",
  "component": "PdfViewer",
  "variant": "form-filling",
  "dependencies": [
    "@syncfusion/ej2-angular-pdfviewer"
  ],
  "description": "PDF viewer sample demonstrating interactive form filling and field value updates.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 2 (v34.1.29)",
    "license": "commercial-or-community",
    "licenseNote": "The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md",
    "requiresLicenseKey": true,
    "requiresServerEndpoint": false,
    "platformIndex": "https://ai.syncfusion.com/angular/llms.txt",
    "skillPack": "syncfusion/angular-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/angular/pdf-viewer-form-filling.md"
  },
  "files": [
    {
      "target": "src/components/pdf-viewer-form-filling/form-filling.component.ts",
      "content": "import { Component, ViewEncapsulation, OnInit, ViewChild } from '@angular/core';\nimport { PdfViewerComponent, TextFieldSettings, RadioButtonFieldSettings, InitialFieldSettings, CheckBoxFieldSettings, SignatureFieldSettings, LinkAnnotationService, BookmarkViewService, MagnificationService, ThumbnailViewService, ToolbarService, NavigationService, TextSearchService, TextSelectionService, PrintService, AnnotationService, FormFieldsService, LoadEventArgs, ValidateFormFieldsArgs, FormDesignerService,PageOrganizerService, PdfViewerModule } from '@syncfusion/ej2-angular-pdfviewer';\nimport { SwitchModule } from '@syncfusion/ej2-angular-buttons';\nimport { ClickEventArgs } from '@syncfusion/ej2-buttons';\n\n/**\n * Default PdfViewer Controller\n */\n@Component({\n    selector: 'control-content',\n    templateUrl: 'form-filling.html',\n    encapsulation: ViewEncapsulation.None,\n    // tslint:disable-next-line:max-line-length\n    providers: [LinkAnnotationService, BookmarkViewService, MagnificationService, ThumbnailViewService, ToolbarService, NavigationService, TextSearchService,\n        TextSelectionService, PrintService, AnnotationService, FormFieldsService, FormDesignerService,PageOrganizerService],\n    standalone: true,\n    imports: [\n        \n        SwitchModule,\n        PdfViewerModule,\n    ],\n})\n\nexport class FormFillingComponent implements OnInit {\n    @ViewChild('pdfviewer')\n    public pdfviewerControl!: PdfViewerComponent;\n\n    public document: string = 'https://cdn.syncfusion.com/content/pdf/form-filling-document.pdf';\n    public resource:string = \"https://cdn.syncfusion.com/ej2/23.2.6/dist/ej2-pdfviewer-lib\";\n    ngOnInit(): void {\n        // ngOnInit function\n    }\n    public validateFormFields(e: ValidateFormFieldsArgs): void {\n        let errorMessage: string = \"Required Field(s): \";\n        let forms: any = this.pdfviewerControl.formFieldCollections;\n        let flag: boolean = false;\n        let radioGroupName: string = \"\";\n        for (var i = 0; i < forms.length; i++) {\n            let text: string = \"\";\n            if (forms[i].isRequired == true) {\n                if (forms[i].type.toString() == \"Checkbox\" && forms[i].isChecked == false) {\n                    text = forms[i].name;\n                }\n                else if (forms[i].type == \"RadioButton\" && flag == false) {\n                    radioGroupName = forms[i].name;\n                    if (forms[i].isSelected == true)\n                        flag = true;\n                }\n                else if (forms[i].type.toString() != \"Checkbox\" && forms[i].type != \"RadioButton\" && forms[i].value == \"\") {\n                    text = forms[i].name;\n                }\n                if (text != \"\") {\n                    if (errorMessage == \"Required Field(s): \") {\n                        errorMessage += text;\n                    }\n                    else {\n                        errorMessage += \", \" + text;\n                    }\n                }\n            }\n        }\n        if (!flag && radioGroupName != \"\") {\n            if (errorMessage == \"Required Field(s): \")\n                errorMessage += radioGroupName;\n            else\n                errorMessage += \", \" + radioGroupName;\n        }\n        if (errorMessage != \"Required Field(s): \") {\n            this.pdfviewerControl.showNotificationPopup(errorMessage);\n        }\n    }\n}\n"
    },
    {
      "target": "src/components/pdf-viewer-form-filling/form-filling.html",
      "content": "\n<div class=\"control-section\">\n    <div class=\"content-wrapper\">\n        <ejs-pdfviewer #pdfviewer id=\"pdfViewer\" [documentPath]='document' [resourceUrl]='resource' (validateFormFields)='validateFormFields($event)' [enableFormFieldsValidation]=true [showNotificationDialog]=false style=\"height:640px;display:block\"></ejs-pdfviewer>\n    </div>\n</div>\n"
    }
  ]
}