This has to do with the software used to create the PDF in the first place. When your PDF was created, the fields were assigned unique names that the computer could keep track of, not human readable ones. Those names were saved in the document's metadata and are what we read.
How do I fix this?
We are always working to improve how we autodetect field names so that they are in plain English. In the meantime, you can manually rename your fields. As long as your PDF and webform fields are connected, they will share whatever label you give one of them. Because of this, we recommend renaming your fields from the PDF. That way the webform names will update accordingly and make it easier for you to then organize them logically. Note: you can also rename fields on the webform and the associated field on the PDF will update too, but we find it can be easier to work with the PDF first in this case.
The trouble here is duplicate fields in the metadata of the PDF. Many PDF creation softwares, such as Adobe Acrobat, will create multiple boxes around each field. When you upload your PDF, our system recognizes all of them and puts each individual field onto the autogenerated webform and PDF.
How can I fix this?
For a PDF you don’t plan on re-using in multiple Workflows, you can simply delete the extra webform fields. You can also delete the extra PDF fields. Try moving one of them over and if you see one underneath, there are duplicates.
For a PDF you plan on using in multiple Workflows, you’ll want to create a PDF template. Upload the PDF to your PDF templates, delete the duplicate boxes, and rename the fields appropriately. When you create a new Workflow, select the PDF from your templates.
Tip: You can either detect multiple fields by moving the boxes around to see if there are any underneath or, in some cases, it may be easiest to just delete all existing fields and redraw new ones yourself.
Note This is different than combining fields that are the same on a webform, which will allow one webform field to fill multiple PDF fields. It will not achieve the goal of eliminating redundant PDF fields.
For the same reason that we sometimes find too many fields on a PDF, it is possible that we find none. Again, Anvil is reading the metadata from the document itself which varies depending on which software was used to create it. This means that sometimes field boundary information simply isn’t there for us to read, so we can not find any automatically. Note that we only autodetect fields when a new PDF is uploaded at the start of building a new Workflow. We do not look for fields when you add a PDF to an existing Workflow so that we do not interfere with what you have already edited.
How can I fix this?
You can start with the PDF and draw PDF fields manually. Then, adjust the size and position of each field on the PDF. Be sure to connect your PDF field to a webform field to make sure your new PDF field gets filled from the resulting Workflow.
In rare cases, some PDFs can have all of the autodetect field issues above compounded. We agree, that’s not ideal. Our goal is never to make your job harder. While we work on making the tech better to solve the above questions, you can always remove all your PDF fields at once, delete the webform, add a new one, and build your form by hand.
Better yet, if it’s a PDF you may use again in the future we recommend building a PDF template so that you never have to clean the document again!