{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "pdf-viewer-form-designer",
  "framework": "vue",
  "type": "registry:component",
  "component": "PdfViewer",
  "variant": "form-designer",
  "dependencies": [
    "@syncfusion/ej2-vue-pdfviewer",
    "@syncfusion/ej2-vue-dropdowns"
  ],
  "description": "PDF viewer sample adding interactive form fields programmatically with selectable field types and dropdown options.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 3 (v35.1.37)",
    "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/vue/llms.txt",
    "skillPack": "syncfusion/vue-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/vue/pdf-viewer-form-designer.md"
  },
  "files": [
    {
      "target": "src/components/pdf-viewer-form-designer/PdfViewer.vue",
      "content": "<template>\n  <div class=\"control-section form-designer\">\n    <div class=\"controls\">\n      <label for=\"field-type\">Form field type</label>\n      <ejs-dropdownlist id=\"field-type\" ref=\"fieldType\" :dataSource=\"fieldTypes\" :fields=\"{ text: 'text', value: 'value' }\" value=\"Textbox\" />\n      <button class=\"e-btn e-primary\" type=\"button\" :disabled=\"!isDocumentLoaded\" @click=\"addField\">Add form field</button>\n    </div>\n    <ejs-pdfviewer id=\"pdfviewer\" ref=\"pdfviewer\" :documentPath=\"documentPath\" :resourceUrl=\"resourceUrl\" :documentLoad=\"documentLoad\" />\n  </div>\n</template>\n\n<script lang=\"ts\">\nimport { DropDownListComponent } from '@syncfusion/ej2-vue-dropdowns';\nimport {\n  PdfViewerComponent, Toolbar, Magnification, Navigation, LinkAnnotation, BookmarkView,\n  ThumbnailView, Print, TextSelection, TextSearch, Annotation, FormFields, FormDesigner, PageOrganizer\n} from '@syncfusion/ej2-vue-pdfviewer';\n\nexport default {\n  components: { 'ejs-pdfviewer': PdfViewerComponent, 'ejs-dropdownlist': DropDownListComponent },\n  data() {\n    return {\n      documentPath: 'https://cdn.syncfusion.com/content/pdf/form-filling-document.pdf',\n      resourceUrl: 'https://cdn.syncfusion.com/ej2/35.1.37/dist/ej2-pdfviewer-lib',\n      fieldNumber: 0,\n      isDocumentLoaded: false,\n      fieldTypes: [\n        { text: 'Textbox', value: 'Textbox' }, { text: 'Password', value: 'Password' },\n        { text: 'Checkbox', value: 'CheckBox' }, { text: 'Radio button', value: 'RadioButton' },\n        { text: 'Dropdown', value: 'DropDown' }, { text: 'List box', value: 'ListBox' },\n        { text: 'Signature', value: 'SignatureField' }, { text: 'Initial', value: 'InitialField' },\n        { text: 'Button', value: 'ButtonField' }\n      ]\n    };\n  },\n  provide: {\n    PdfViewer: [Toolbar, Magnification, Navigation, LinkAnnotation, BookmarkView, ThumbnailView, Print, TextSelection, TextSearch, Annotation, FormFields, FormDesigner, PageOrganizer]\n  },\n  methods: {\n    documentLoad() {\n      this.isDocumentLoaded = true;\n    },\n    addField() {\n      const viewer = (this.$refs.pdfviewer as any).ej2Instances;\n      const fieldType = (this.$refs.fieldType as any).ej2Instances;\n      if (!viewer || !fieldType) {\n        return;\n      }\n      const type = fieldType.value;\n      const row = this.fieldNumber++ % 6;\n      viewer.formDesigner.addFormField(type, {\n        name: `${type}_${this.fieldNumber}`, pageNumber: 1,\n        bounds: { X: 100, Y: 120 + row * 55, Width: 220, Height: 32 },\n        options: type === 'DropDown'\n          ? [{ itemName: 'Option 1', itemValue: 'Option 1' }, { itemName: 'Option 2', itemValue: 'Option 2' }]\n          : undefined\n      });\n    }\n  }\n};\n</script>\n\n<style scoped>\n.controls { display: flex; align-items: end; gap: 12px; padding: 8px 0 12px; }\n.controls label { font-weight: 600; }\n#field-type { width: 180px; }\n#pdfviewer { height: 640px; }\n</style>\n"
    }
  ]
}