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 EBBC5199B9 for ; Wed, 27 Apr 2016 14:57:22 +0000 (UTC) Received: (qmail 17883 invoked by uid 500); 27 Apr 2016 14:57:22 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 17855 invoked by uid 500); 27 Apr 2016 14:57:22 -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 17841 invoked by uid 99); 27 Apr 2016 14:57:22 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Apr 2016 14:57:22 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 82B19C64C6 for ; Wed, 27 Apr 2016 14:57:21 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.1 X-Spam-Level: * X-Spam-Status: No, score=1.1 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id djCVxJLEYPdl for ; Wed, 27 Apr 2016 14:57:19 +0000 (UTC) Received: from www168.your-server.de (www168.your-server.de [213.133.104.168]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 244E35F365 for ; Wed, 27 Apr 2016 14:57:18 +0000 (UTC) Received: from [88.198.220.131] (helo=sslproxy02.your-server.de) by www168.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1avQtx-0003Ry-QE for users@pdfbox.apache.org; Wed, 27 Apr 2016 16:57:17 +0200 Received: from [84.128.110.183] (helo=mbp001.local.fileaffairs.de) by sslproxy02.your-server.de with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.84_2) (envelope-from ) id 1avQtx-0002xy-Hu for users@pdfbox.apache.org; Wed, 27 Apr 2016 16:57:17 +0200 Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: Migrating from 1.8.2 to 2.0.0: PDUnknownField removed? From: Maruan Sahyoun In-Reply-To: <002501d1a067$34c8b720$9e5a2560$@digitalys.de> Date: Wed, 27 Apr 2016 16:57:16 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <001b01d1a054$eda2c6e0$c8e854a0$@digitalys.de> <139D2CD4-6A34-4418-87B0-61DFD8BEA248@fileaffairs.de> <002501d1a067$34c8b720$9e5a2560$@digitalys.de> To: users@pdfbox.apache.org X-Mailer: Apple Mail (2.3124) X-Authenticated-Sender: sahyoun@fileaffairs.de X-Virus-Scanned: Clear (ClamAV 0.99/21507/Tue Apr 26 18:37:24 2016) Hi, > Am 27.04.2016 um 11:28 schrieb Timo Rumland = : >=20 > Hi Maruan, >=20 >> yes, the class has been removed. I'll update the Migration Guide. The = test > for null should be sufficient. the Migration Guide has been updated. Thanks for the hint. BR Maruan >=20 > thanks a lot for your quick response! >=20 >=20 >=20 > Best Regards, > Timo >=20 >=20 > -----Urspr=FCngliche Nachricht----- > Von: Maruan Sahyoun [mailto:sahyoun@fileaffairs.de]=20 > Gesendet: Mittwoch, 27. April 2016 10:31 > An: users@pdfbox.apache.org > Betreff: Re: Migrating from 1.8.2 to 2.0.0: PDUnknownField removed? >=20 > Hi, >=20 >> Am 27.04.2016 um 09:17 schrieb Timo Rumland = : >>=20 >> Hello, >>=20 >> I'm currently migrating from PDFBox 1.8.2 to 2.0.0. In the former=20 >> version, I used the following code to check for the existence of a = PDF > form field: >>=20 >>=20 >> ---- >>=20 >> PDField pdField =3D pdAcroForm.getField( pdFieldName ); >>=20 >> if ( pdField =3D=3D null || ( pdField instanceof PDUnknownField ) ) >> throw new RuntimeException( "Failed to fill PDF field: Given = field > '"=20 >> + pdFieldName + "' is unknown" ); >>=20 >> ---- >>=20 >>=20 >> After migrating to PDFBox 2.0.0, the class "PDUnknownField" is no=20 >> longer available. >>=20 >> I can't find information about "PDUnknownField" the migration guide=20= >> (https://pdfbox.apache.org/2.0/migration.html). >>=20 >>=20 >> Has the class been removed without any replacement, so I just check=20= >> for "pdField =3D=3D null" in my example above, or is there a = replacement=20 >> for "PDUnknownField" I may have missed? >=20 > yes, the class has been removed. I'll update the Migration Guide. The = test > for null should be sufficient. >=20 > BR > Maruan >=20 >=20 >=20 >>=20 >>=20 >> Thanks a lot for your help! >>=20 >>=20 >> Kind regards, >> Timo Rumland >>=20 >>=20 >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org >> For additional commands, e-mail: users-help@pdfbox.apache.org >>=20 >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org > For additional commands, e-mail: users-help@pdfbox.apache.org >=20 >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org > For additional commands, e-mail: users-help@pdfbox.apache.org >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org For additional commands, e-mail: users-help@pdfbox.apache.org