|
Most people coming to eForms will be coming from an HTML background.There
are subtle differences between the PDF form model and the HTML form
model that can cause confusion.
In HTML a form is part of a web page. Each field in the HTML form
has a visible appearance on the page (with the exception of hidden
fields). So the concept of a field and what it looks like on the
page is pretty much identical.
eForms separate the idea of a field from its visible representation.
Each page of the document owns a set of visible annotations. There
are lots of different types of annotation but the ones that are
used in eForm fields are called widgets. A widget contains properties
that allow a PDF reader to display it appropriately on the page.
Each document owns a tree structure of fields which spans the entire
document. Each field has a name and also a full name (like a file
path) which tells you how to get to that field from the top level
of the tree. The leaves of the tree contain the visible widgets
that you see on the pages. Note that PDF does not require that full
names are unique.
So there are two independent sets of entities each with its own
features. The bits you see and which people normally call fields
are in fact widgets.
Widgets don't have a name or identity as such - it's just that
they may be associated with a field which has an identity. Similarly
a field doesn't exist at a location or on a page it is just that
it is associated with a widget that exists at a particular location
on a particular page.
ABCpdf hides these distinctions from you. When you ask for a field
by name it will return you the widget associated with that field.
Given the widget you can find out where it is physically located
in terms of page numbers and page rectangles. Similarly if you have
a widget you can ask it for a field name. Behind the scenes ABCpdf
finds the field associated with the widget and returns you the field
name.
|