pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maruan Sahyoun <sahy...@fileaffairs.de>
Subject Re: Problems combining files with form fields
Date Tue, 05 May 2015 09:55:59 GMT
Hi Gilad,

> Am 05.05.2015 um 11:45 schrieb Gilad Denneboom <gilad.denneboom@gmail.com>:
> 
> Hi Maruan,
> 
> Sure, here they are...
> 
> Gilad
> ​
> batch_sequences 1.pdf
> <https://docs.google.com/file/d/0B_eBFHMNjkhsNmlPNjJMcTJVXzQ/edit?usp=drive_web>
> ​​
> Input form.pdf
> <https://docs.google.com/file/d/0B_eBFHMNjkhsaWlHbmYzSEFpX0U/edit?usp=drive_web>
> ​
> 
> On Tue, May 5, 2015 at 11:36 AM, Maruan Sahyoun <sahyoun@fileaffairs.de>
> wrote:
> 
>> Hi Gilad,
>> 
>>> Am 05.05.2015 um 11:30 schrieb Gilad Denneboom <
>> gilad.denneboom@gmail.com>:
>>> 
>>> Hi guys,
>>> 
>>> This should be a simple task, but it turns out to be quite a complex and
>>> problematic one, I'm afraid...
>>> I'm trying to combine two files, one with a bunch of form fields in it (a
>>> single page, created in Acrobat) and one without any fields. I have tried
>>> doing it using three different methods, and all three have failed, in
>>> various ways.
>>> 
>>> Method 1: PDDocument importPage
>>> I tried importing the page with the form fields into the existing files.
>>> The page is placed at the end of the document (I need it at the
>> start...),
>>> but that's not the big issue. The big issue is that although the page
>> with
>>> the form fields is added to the file, the PDAcroForm in the new file is
>>> null and I'm having weird problems editing the form fields in Acrobat
>> (see
>>> "example1.pdf", try to make a selection in one of the drop-downs in
>>> Acrobat).
>>> 
>>> Method 2: PDDocument addPage (how is this different from importPage, by
>> the
>>> way? The documentation is very lacking on this point. Also, why isn't it
>>> possible to specify the page number where you want to insert the new
>> page?)
>>> The result is similar to importPage, only now I am able to make a
>> selection
>>> in the drop-down fields in Acrobat, but they are still not picked up by
>>> PDFBox when I re-load the file and try to access them (see
>> "example2.pdf").
>>> 
>>> Method 3: PDFMergerUtililty
>>> In order to get the right page order I decided to merge the files instead
>>> of adding one to the other.
>>> Here the PDAcroForm object does exist in the merged files, but the values
>>> of the fields are not picked up. Using getValue on the fields returns the
>>> default value for the drop-downs and null for the text fields, even
>> though
>>> they are clearly filled-in (see "example3.pdf").

So what you are saying is that looking at the form with Adobe Reader the form is fine but
trying to get the value using PDFBox you are not getting the value you are looking for?

BR
Maruan


>>> 
>>> Any help is appreciated…
>> 
>> Could you also upload the individual files prior to merging?
>> 
>> BR
>> Maruan
>> 
>> 
>>> 
>>> Regards, Gilad.
>>> ​
>>> example1.pdf
>>> <
>> https://docs.google.com/file/d/0B_eBFHMNjkhscDdvcGhXNjRMZ28/edit?usp=drive_web
>>> 
>>> ​​
>>> example2.pdf
>>> <
>> https://docs.google.com/file/d/0B_eBFHMNjkhsck9RSTlNTWFtaHc/edit?usp=drive_web
>>> 
>>> ​​
>>> example3.pdf
>>> <
>> https://docs.google.com/file/d/0B_eBFHMNjkhsQXBRdVdDMGkyR2s/edit?usp=drive_web
>>> 
>>> ​
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Mime
View raw message