Form Builder Demo

With this JavaScript sample, add fillable form fields to a PDF directly in the web browser (no servers or other external dependencies required). Fields are first added as annotations and then converted to interactive form fields. You can also use this sample for a DOCX, XLSX, PPTX or scanned image (files are converted to PDF in the browser where modifications are saved into the PDF file). Too see a live demonstration watch our video demo: Converting Scanned PDF to Fillable Form or learn about our Web SDK.

1// eslint-disable-next-line no-undef
2const WebViewerConstructor = isWebComponent() ? WebViewer.WebComponent : WebViewer;
3
4WebViewerConstructor(
5 {
6 path: '../../../lib',
7 initialDoc: '../../full-apis/TestFiles/contract.pdf',
8 },
9 document.getElementById('viewer')
10).then(instance => {
11 samplesSetup(instance);
12
13 instance.UI.setToolbarGroup('toolbarGroup-Forms');
14});

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales