pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maruan Sahyoun <sahy...@fileaffairs.de>
Subject Re: PDFBox 2.0.0 Snapshot PDChoice and Increased Runtime Execution Time
Date Fri, 17 Jul 2015 06:26:01 GMT
Hi,
> Am 16.07.2015 um 20:53 schrieb jarrod <xhozst@yahoo.com.INVALID>:
> 
> 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?

I've opened https://issues.apache.org/jira/browse/PDFBOX-2889 <https://issues.apache.org/jira/browse/PDFBOX-2889>
to track support of the missing appearance generation.

BR
Maruan

> 
> 
> 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));
> 
> 
> 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 <init>
> WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002.
Windows RegCreateKeyEx(...) returned error code 5.
> 
> Jul 16, 2015 1:43:30 PM org.apache.pdfbox.pdmodel.font.PDType1Font <init>
> WARNING: Using fallback font ArialMT for base font ZapfDingbats
> 
> 
> Thanks,
> 
> Jarrod
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
> 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message