Passing in formgroup element into viewer to allow for angular to populate fields
See original GitHub issueIs your feature request related to a problem? Please describe. I really like the new form field fields feature. I have been trying to integrate this package into my company’s platform. We would like to get information from our database to populate the form fields in the PDF document.
Describe the solution you’d like
When creating a reactive form in angular, the way to pass data into the pdf document is through a formgroup. Forms look like the code below.
<form [formGroup]="reactiveForm" (ngSubmit)="onSubmit()" novalidate>
It would be nice if we could pass in a formGroup from the component that hosts the pdf-viewer. Therefore it would be easy to pass in and save data from the pdf form.
Describe alternatives you’ve considered I tried to wrap the whole component with form tags, but that didn’t work. I am a junior dev. I am trying…
Issue Analytics
- State:
- Created 3 years ago
- Comments:21 (13 by maintainers)
This is what I got for my data.

If one looks at the input field in the control, the pdf field name can be found.
I am pretty new to angular, and have only experimented with the pdf.js library recently. One could assume that we could take the attribute of the “name” field and create a formControlName field in the input field. I know it is more complicated than that, but maybe that helps.
The pdf used for testing. I modified to have the form fields named the way I want them to in acrobat. oklahoma-motor-vehicle-power-of-attorney-form modified.pdf
The feature has landed with version 5.2.1, so I’ll close the ticket now.