Hello list!
I'm dealing with a proprietary software product that accepts PDFs with
fields in them to "flatten" into a final output PDF. The difficulty is
that it expects the ordering of the fields (or their associated widgets)
to be in a certain order. I don't know the exact details of this, but
it takes much trial and error for our folks here manually deleting and
recreating fields, trying them and seeing if they are accepted.
So, to greatly streamline the process of getting the field/widget
content in the PDF files in a correct order, I would like to write a
utility that takes a configuration file containing a list of Field Names
and reorders the content in the PDF to match the order they are in the
configuration file.
My naive initial idea is to:
- Write a utility that outputs the current list of fields (in the
PDF in the order that they are there) into a config file
- Allow a user to reorder the lines of field names as desired
- Write a utility that takes the config file and the PDF and
rebuilds the field list/tree in the order that the config file
specifies... then writes out the updated PDF contents to a new
PDF file
Alternately, I believe that there is an order for forms/widgets that is
specified in Adobe Acrobat (tab order?) that I might be able to try to
try to recreate. I'm not sure if that will work, but it would allow
non-technical users to define the needed order without intervention from
technical staff.
I realize that there might be issues with combined field/widget fields
if it comes to needing to order the widgets instead, but I am wanting to
start with the above and go from there.
So, I have a few questions to start with that someone might be able to
help me out with!
- Are there any examples of doing this sort of order modification?
- Is it possible to reorder field contents at the PDDocument /
PDAcroForm / PDField level?
- Is it possible to reorder widget annotations at the PDAnnotiation /
PDAnnotationWidget level?
- Do I need to drop down to the COS* object level to do this?
Thanks in advance for any pointers, info or suggestions!
- Dwayne
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org