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 45A0217BCE for ; Tue, 5 May 2015 12:22:38 +0000 (UTC) Received: (qmail 31224 invoked by uid 500); 5 May 2015 12:22:38 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 31201 invoked by uid 500); 5 May 2015 12:22:38 -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 31189 invoked by uid 99); 5 May 2015 12:22:37 -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 12:22:37 +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 12:22:32 +0000 Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com [209.85.212.174]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 0061543CDC for ; Tue, 5 May 2015 12:22:12 +0000 (UTC) Received: by wizk4 with SMTP id k4so158326236wiz.1 for ; Tue, 05 May 2015 05:22:11 -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=epaxLxVlj46N7xRw8vKg5+cHXq1PyVD1cGphanucfFg=; b=LUtyLI2IpSgKgY0DXQ6NlvAQ9FlsEuRsEPJXWBb6BEZborPv8gm1LCcw8kbC5BZDzC 1C0it0HyOUuRQC+uPB7c6IiE5XwnWcxmruVrdLDlYCeKJl1kskBZelFlxebtGTsjL3LK 2ftJVI3CKyQ6m8XikGv084SbALyg+OY8vpRiROXgPBXRE+SLTutz/RMjMjCRbnl0ifoj vGh/+0DHngJpmunK1LNkKa8q5kvWarHb0G89NIsRbN0t7o/+jYsv4QHcbKIKmKbrETt0 fhVAvAOUcOKrRtx+ph3t1LsJfxVYjKkAxy8sLLwQQqGFYt2SjkunAgDgP9gT7GCz1GIt Ga0w== X-Received: by 10.194.2.47 with SMTP id 15mr51280108wjr.101.1430828531090; Tue, 05 May 2015 05:22:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.27.148.96 with HTTP; Tue, 5 May 2015 05:21:50 -0700 (PDT) In-Reply-To: References: <0E4A4A93-77D4-47CD-8D76-7D01F6A36E9C@fileaffairs.de> From: Gilad Denneboom Date: Tue, 5 May 2015 14:21:50 +0200 Message-ID: Subject: Re: Problems combining files with form fields To: "users@pdfbox.apache.org" Content-Type: multipart/alternative; boundary=047d7b3a8906548b5a051554ba85 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b3a8906548b5a051554ba85 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Wow, that's unfortunate... What about the PDFMergerUtility, though? Does it have the same limitation? On Tue, May 5, 2015 at 2:13 PM, Maruan Sahyoun wrote: > Hi, > > > Am 05.05.2015 um 11:59 schrieb Gilad Denneboom < > gilad.denneboom@gmail.com>: > > > > Correct. And in some of the cases (example1) I can't even edit the form > > fields properly after inserting the file to another PDF. > > reason is that importPage/addPage add the page content but not the form > fields. You'd need to add the AcroForms manually (potentially looking at > which PDWidgetAnnotations are really pointing at the page you are adding) > > BR > > Maruan > > > > > On Tue, May 5, 2015 at 11:55 AM, Maruan Sahyoun > > wrote: > > > >> Hi Gilad, > >> > >>> Am 05.05.2015 um 11:45 schrieb Gilad Denneboom < > >> gilad.denneboom@gmail.com>: > >>> > >>> Hi Maruan, > >>> > >>> Sure, here they are... > >>> > >>> Gilad > >>> =E2=80=8B > >>> batch_sequences 1.pdf > >>> < > >> > https://docs.google.com/file/d/0B_eBFHMNjkhsNmlPNjJMcTJVXzQ/edit?usp=3Ddr= ive_web > >>> > >>> =E2=80=8B=E2=80=8B > >>> Input form.pdf > >>> < > >> > https://docs.google.com/file/d/0B_eBFHMNjkhsaWlHbmYzSEFpX0U/edit?usp=3Ddr= ive_web > >>> > >>> =E2=80=8B > >>> > >>> 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 comple= x > >> 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 pa= ge > >>>> with > >>>>> the form fields is added to the file, the PDAcroForm in the new fil= e > is > >>>>> null and I'm having weird problems editing the form fields in Acrob= at > >>>> (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 ne= w > >>>> 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 u= p > 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 retur= ns > >> 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 t= he > >> 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=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 > >>>> > >>>> > >> > >> > >> --------------------------------------------------------------------- > >> 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 > > --047d7b3a8906548b5a051554ba85--