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 B0FBD18C0A for ; Sat, 18 Jul 2015 14:47:10 +0000 (UTC) Received: (qmail 29923 invoked by uid 500); 18 Jul 2015 14:47:10 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 29894 invoked by uid 500); 18 Jul 2015 14:47:10 -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 29882 invoked by uid 99); 18 Jul 2015 14:47:10 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Jul 2015 14:47:10 +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 B8463D5A0C for ; Sat, 18 Jul 2015 14:47:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.68 X-Spam-Level: X-Spam-Status: No, score=0.68 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=lehmi.de Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id DqKyPyGAr37f for ; Sat, 18 Jul 2015 14:47:08 +0000 (UTC) Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.162]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 106A642AF1 for ; Sat, 18 Jul 2015 14:47:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1437230820; l=3022; s=domk; d=lehmi.de; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version: Date:From:References:To:Subject; bh=bd+HXIBGRksE8Tkm2hv9nuwsfhmmPHA5C/j6HxxuEGg=; b=H1/msmNU5K14XoXXznnhWdbyO3nalTI6oMHUZ/yzRQGQPTLv7ei/GjZcFYwKlgn2pDf zCdZp1KnO2rOpSFn3uD2YgzPttCn07yAh4DUtVTnE1dGU37bQXz6Xks7Y5m/SCeJ09vK5 6Le3AlZ5xb/qGZ8Bheok4xqUnduLj8URyC0= X-RZG-AUTH: :LWIAZ0WpaN8UY5o8XRz0jOyrHsdEC+nAE10OdySrgHvIRPUZmp5uQ3MyIudp X-RZG-CLASS-ID: mo00 Received: from [192.168.1.8] (dslb-188-103-012-017.188.103.pools.vodafone-ip.de [188.103.12.17]) by smtp.strato.de (RZmta 37.8 DYNA|AUTH) with ESMTPSA id v04d91r6IEl0EF1 (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate) for ; Sat, 18 Jul 2015 16:47:00 +0200 (CEST) Subject: Re: PDFBox 2.0.0 Snapshot PDChoice and Increased Runtime Execution Time To: users@pdfbox.apache.org References: <1437072783.69591.YahooMailBasic@web141206.mail.bf1.yahoo.com> From: Andreas Lehmkuehler Message-ID: <55AA66E4.5060804@lehmi.de> Date: Sat, 18 Jul 2015 16:47:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Am 17.07.2015 um 00:28 schrieb John Hewson: > >> On 16 Jul 2015, at 11:53, jarrod wrote: >> >> Hello, >> >> I've converted a 1.8.9 project to the latest 2.0.0 shapshot (as of 20150716). This project fill's in acroForm fields and then saves to a new file. >> >> 1. I'm having difficulty in assigning the selected value to a PDChoice field. In 1.8.9, I was able to use .setValue(strValueGoesHere) as long as the item already existed. When it didn't exist, i would add it first. In version 2.0.0, using .setValue(strValueGoesHere) throws an exception "not implemented". Then I proceeded to try using .setSelectedOptionsIndex but that throws the following exception "Setting the indices is not allowed for choice fields not allowing multiple selections." >> >> How should I be setting this PDChoice field? > > We don’t support generating the appearance for a choice field yet, but you can generate forms without appearances (as 1.8.9 does) by first calling setNeedAppearances(false) on the PDAcroForm. > > >> >> 2. Additionally, I've noticed the runtime execution time has dramatically increased when saving the document. The following lines of code only took 0 seconds previously and now takes 14 seconds; >> >> java.util.Date startTime2 = new java.util.Date(); >> pdfDocument.save(dest); >> pdfDocument.close(); >> java.util.Date endTime2 = new java.util.Date(); >> System.out.println("Save Time: " + ((endTime2.getTime()-startTime2.getTime())/1000)); >> > > Andreas, any thoughts? No, but it looks like Jarrod already answered that question in his later posting, seems to be related to the creation of the appearance stream. BR Andreas > >> 3. Also, I'm getting the following log entries during runtime although I'm guessing they are not very important; >> >> Jul 16, 2015 1:43:30 PM java.util.prefs.WindowsPreferences >> WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5. > > That’s PDFBox trying to create a local cache of font files and failing. I’m not sure why, looks like the reason is Windows-specific. It might take a few extra seconds to load PDFBox without the cache, but it not a problem. > >> Jul 16, 2015 1:43:30 PM org.apache.pdfbox.pdmodel.font.PDType1Font >> WARNING: Using fallback font ArialMT for base font ZapfDingbats > > I’m surprised that PDFBox doesn’t find a better substitute for ZapfDingbats, enable TRACE logging and post the log file. > > — John > >> >> Thanks, >> >> Jarrod >> >> --------------------------------------------------------------------- >> 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