LGTM. There might be some complications in the offsets and the root AcroForm object: it's not organized by page, though each field only appears on one page (through the annotation). This wouldn't work for someone trying to keep their fields on the first page and just replace later pages. I don't know what would though, so this is a good API for now, and we can improve internals later.
Just to clarify, if the offset in the pages attribute isn't by pages, we may want to remove it. But I'm okay with assuming that you don't want to keep any of the fields in the destination doc even if you use the offset. In my mind, the offset is to accommodate someone adding an instructions cover page to the destination document while the original document didn't have one.
Just to clarify, if the offset in the
pages
attribute isn't by pages, we may want to remove it. But I'm okay with assuming that you don't want to keep any of the fields in the destination doc even if you use the offset. In my mind, the offset is to accommodate someone adding an instructions cover page to the destination document while the original document didn't have one.