Using JavaScript in PDF form fields
Learn the basics of working with JavaScript form elements in a PDF.
FORMS
Let users view, complete, and sign forms directly in your product — or build your own forms with intuitive UI tools and powerful APIs. From simple fields to large-scale data extraction, Nutrient gives you complete control.
Render interactive fields like checkboxes, dropdowns, and signature inputs — no plugins or external viewers.
Add form fields to existing PDFs or generate new templates from scratch using UI tools or APIs.
Pull structured data from completed forms, with validation logic built in or fully customized.
Use template matching and mark recognition to extract data from surveys, applications, and paper-based workflows.
FORM VIEWING AND FILLING
Let users interact with form fields inside your app — with smooth rendering and validation across platforms. Ideal for contracts, surveys, onboarding, and more.
Render checkboxes, dropdowns, radio buttons, text inputs, and signature fields exactly as expected.
Ensure consistent form behavior and layout across web, mobile, and desktop apps.
Catch input errors as users type, or apply custom rules per field.
Let users comment on or annotate forms during completion.
FORM CREATOR
Use built-in components or your own code to create dynamic forms. Edit existing PDFs, add or remove fields, and automate layout logic.
Drag and drop fields directly onto PDFs — no external tools required.
Define form layout, behavior, and logic using JavaScript APIs.
Add fields and structure to existing documents with just a few lines of code.
Configure labels, tooltips, and validation rules for each field.
AUTOMATIC TEMPLATE AND FORM RECOGNITION
Use OMR and intelligent template matching to extract answers, checkboxes, and inputs at scale.
Detect filled marks and match layouts for hands-off processing.
Pull clean field values into your systems — no manual review required.
Handle large sets of forms quickly with automation built in.
Flag incomplete or invalid entries before export or processing.
Nutrient’s Document Web Services (DWS) platform offers cloud-native APIs that support every stage of the document lifecycle — from rendering a single PDF in the browser, to high-volume processing and automation.
How does Nutrient improve the form experience for users?
The SDK renders interactive form fields smoothly across platforms, including text inputs, checkboxes, radios, dropdowns, and signature fields — with real-time validation and support for touch, pen, and keyboard input.
Can I build custom forms with the SDK?
Yes. You can create dynamic forms programmatically or visually — adding fields like text inputs, checkboxes, radios, dropdowns, and signature lines to suit your workflow.
What can I do with the forms solution?
View, fill, create, and extract data from PDF forms. Use APIs or UI tools to generate new forms, fill existing ones, and extract structured data — even from scanned documents using OCR.
Can I populate form fields dynamically from my server?
Yes. Prefill forms using XFDF, Instant JSON, or Document Engine’s Forms API — great for injecting user data or syncing with a database.
What formats are supported for form submission and processing?
We support AcroForms and enable import/export using Instant JSON and XFDF. These formats let you automate submissions, prefill forms, and extract field data.
Is server-side form filling supported?
Yes. With Document Engine running in Docker, you can fill and export forms server-side via API — ideal for backend automation or batch processing.
What security features are included?
All form interactions follow strict permissioning. Use JWTs to manage access to documents and enforce per-user rules for viewing, filling, and editing.
What PDF standards do you support?
We fully support AcroForms — including all standard field types — and render them consistently across web, mobile, and desktop environments.
What are the system requirements?
On the frontend, all you need is a modern browser and a JavaScript-based app. For backend form processing, a Docker environment is required to run Document Engine.
PROVEN AT SCALE
Replaced paper and email with Nutrient Workflow to automate multilevel approvals across six Latin American offices, processing 236 asset requests.
Renders multipage PDFs and signature tags with Nutrient, keeping 200 million users in 188 countries moving at the speed of eSignature.
Empowers 34,000 pilots to view, annotate, and sign 90‑page flight releases on iPad using Nutrient iOS SDK, saving minutes — and money — on every flight.
FOR DEVELOPERS
A PDF form builder is a tool that enables users to create, edit, and manage interactive forms within PDF documents. These forms can include various fields such as text boxes, checkboxes, radio buttons, and dropdown menus, allowing for efficient data collection and processing.
Consider the following factors when choosing your optimal PDF form builder:
Various PDF form builder tools are available, each offering distinct features:
Choosing Nutrient (formerly PSPDFKit) offers several advantages:
While other form builder tools may offer basic functionalities, Nutrient’s PDF form builder stands out with its advanced features, high performance, and focus on user experience. Its design prioritizes ease of use and seamless integration, making it a robust choice for applications aiming to enhance document workflows and data collection processes.
Integrating a PDF form builder into your application is a strategic move to boost functionality and user satisfaction. By carefully evaluating your needs and exploring available options, you can select a solution that not only meets your current requirements but also supports your application’s future growth and evolution.