Return-Path: X-Original-To: apmail-pdfbox-users-archive@www.apache.org Delivered-To: apmail-pdfbox-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0C74517842 for ; Tue, 5 May 2015 09:46:25 +0000 (UTC) Received: (qmail 26445 invoked by uid 500); 5 May 2015 09:46:24 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 26420 invoked by uid 500); 5 May 2015 09:46:24 -0000 Mailing-List: contact users-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@pdfbox.apache.org Delivered-To: mailing list users@pdfbox.apache.org Received: (qmail 26408 invoked by uid 99); 5 May 2015 09:46:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 May 2015 09:46:24 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: message received from 54.164.171.186 which is an MX secondary for users@pdfbox.apache.org) Received: from [54.164.171.186] (HELO mx1-us-east.apache.org) (54.164.171.186) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 May 2015 09:46:19 +0000 Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 453774546E for ; Tue, 5 May 2015 09:45:59 +0000 (UTC) Received: by widdi4 with SMTP id di4so139069045wid.0 for ; Tue, 05 May 2015 02:45:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=bA1Z19s9sXg2bf0VKSpVB1759EU1WyZi6KDM3PvG8Hg=; b=SBW+JIxJQNAuzckmH3PuD+eopfIVumwUhg6P0zKXbUpyk97u9lEWf+H7UVT8SeZYNT QDoHLaC+5vlzRJWd0a4cUSznsh6SlELVAUj4SM13SIDvLtAOOXOWH3zlPwP1XQPHRvwm awlU9eBXI/nd0RZO1KwY59egTBifQzZSCg8PN7auV5fffCQ1G9irkyyMg/MrAmIIXk49 rzc9sdAvEWJOcyw2M7lfHgSixAOS9iGWYUCYRKIgvGrGWRmqaWlG4K3zpV6Sit3u+gLC /JXt27eBSVR+hhRq7FTkHhZTYqpQrQD5Ajti/Rj0uFoD7ULoqSB1L5QpVcf6GZz9xwdt IUzQ== X-Received: by 10.180.215.8 with SMTP id oe8mr685813wic.0.1430819151805; Tue, 05 May 2015 02:45:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.27.148.96 with HTTP; Tue, 5 May 2015 02:45:31 -0700 (PDT) In-Reply-To: <0E4A4A93-77D4-47CD-8D76-7D01F6A36E9C@fileaffairs.de> References: <0E4A4A93-77D4-47CD-8D76-7D01F6A36E9C@fileaffairs.de> From: Gilad Denneboom Date: Tue, 5 May 2015 11:45:31 +0200 Message-ID: Subject: Re: Problems combining files with form fields To: "users@pdfbox.apache.org" Content-Type: multipart/alternative; boundary=001a11360312480bf30515528b29 X-Virus-Checked: Checked by ClamAV on apache.org --001a11360312480bf30515528b29 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Maruan, Sure, here they are... Gilad =E2=80=8B batch_sequences 1.pdf =E2=80=8B=E2=80=8B Input form.pdf =E2=80=8B On Tue, May 5, 2015 at 11:36 AM, Maruan Sahyoun 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 an= d > > 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 tri= ed > > 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 i= t > > 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 inste= ad > > of adding one to the other. > > Here the PDAcroForm object does exist in the merged files, but the valu= es > > of the fields are not picked up. Using getValue on the fields returns t= he > > default value for the drop-downs and null for the text fields, even > though > > they are clearly filled-in (see "example3.pdf"). > > > > Any help is appreciated=E2=80=A6 > > Could you also upload the individual files prior to merging? > > BR > Maruan > > > > > > Regards, Gilad. > > =E2=80=8B > > example1.pdf > > < > https://docs.google.com/file/d/0B_eBFHMNjkhscDdvcGhXNjRMZ28/edit?usp=3Ddr= ive_web > > > > =E2=80=8B=E2=80=8B > > example2.pdf > > < > https://docs.google.com/file/d/0B_eBFHMNjkhsck9RSTlNTWFtaHc/edit?usp=3Ddr= ive_web > > > > =E2=80=8B=E2=80=8B > > example3.pdf > > < > https://docs.google.com/file/d/0B_eBFHMNjkhsQXBRdVdDMGkyR2s/edit?usp=3Ddr= ive_web > > > > =E2=80=8B > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org > For additional commands, e-mail: users-help@pdfbox.apache.org > > --001a11360312480bf30515528b29--