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 3849818507 for ; Mon, 24 Aug 2015 07:20:06 +0000 (UTC) Received: (qmail 57290 invoked by uid 500); 24 Aug 2015 07:20:06 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 57265 invoked by uid 500); 24 Aug 2015 07:20:05 -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 57254 invoked by uid 99); 24 Aug 2015 07:20:05 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Aug 2015 07:20:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 4BB441826D6 for ; Mon, 24 Aug 2015 07:20:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.993 X-Spam-Level: X-Spam-Status: No, score=0.993 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H2=-0.001, RP_MATCHES_RCVD=-0.006] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id KEA5CL5JSfoo for ; Mon, 24 Aug 2015 07:20:03 +0000 (UTC) Received: from mailout01.t-online.de (mailout01.t-online.de [194.25.134.80]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 53E9E212C5 for ; Mon, 24 Aug 2015 07:20:03 +0000 (UTC) Received: from fwd09.aul.t-online.de (fwd09.aul.t-online.de [172.20.27.151]) by mailout01.t-online.de (Postfix) with SMTP id EFF0F5EAAC9 for ; Mon, 24 Aug 2015 09:19:56 +0200 (CEST) Received: from [192.168.2.102] (Gir8e2ZpgheLMKZfwapwcrP-yK1uOxJiMFULfyrwxs3OL0akd1aAcNdUymvPyqCwsm@[217.231.133.60]) by fwd09.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1ZTm2n-3g32ie0; Mon, 24 Aug 2015 09:19:49 +0200 Subject: Re: Cannot load pre existing PDF to access fields To: users@pdfbox.apache.org References: From: Tilman Hausherr Message-ID: <55DAC5CC.1060406@t-online.de> Date: Mon, 24 Aug 2015 09:20:44 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-ID: Gir8e2ZpgheLMKZfwapwcrP-yK1uOxJiMFULfyrwxs3OL0akd1aAcNdUymvPyqCwsm X-TOI-MSGID: 95a210a3-835a-43ad-9db8-fb782114dce8 Please upload the PDF somewhere. Tilman Am 24.08.2015 um 09:15 schrieb Tolen Miller: > Hello, > > I am trying to load a fillable pdf file I created (using LiveCycle), but cannot seem to get a hold of the fields. Is there anything obviously wrong with the code below or could it be my form? > > PDDocument pdfDoc = new PDDocument(); > String fileTemplate = "D:\\PDFTemplates\\RPA_Template_Test.pdf"; > > try { > pdfDoc = PDDocument.load(fileTemplate); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm pdfTemplate = docCatalog.getAcroForm(); > pdfDoc.getNumberOfPages(); > List pdfFields = pdfTemplate.getFields(); > System.out.println( pdfFields.isEmpty() ); //always true > … > > Thank you, > Tolen Miller > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org For additional commands, e-mail: users-help@pdfbox.apache.org