pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: PDFBox "helper" to create a form
Date Wed, 30 Mar 2016 07:42:55 GMT
Am 30.03.2016 um 09:21 schrieb Al Grant:
> Hi Tilman
>
> My bad. The form already exists.
>
> Is more about filling it out progmatically from the database.
>
> I can use any version of Pdfbox.

Then get the field, and use setValue(). See e.g. the FillFormField 
example in the source code download, or the SetField example.


             // Retrieve an individual field and set it's value.
             PDTextField field = (PDTextField) acroForm.getField( 
"sampleField" );
             field.setValue("Text Entry");

             // If a field is nested within the form tree a fully 
qualified name
             // might be provided to access the field.
             field = (PDTextField) acroForm.getField( 
"fieldsContainer.nestedSampleField" );
             field.setValue("Text Entry");


Tilman

>
> Regards
>
> Al
> On 30/03/2016 8:12 pm, "Tilman Hausherr" <THausherr@t-online.de> wrote:
>
>> Am 30.03.2016 um 08:57 schrieb Al Grant:
>>
>>> Hi All,
>>>
>>> I am looking for a way to get a PDF Form to be partly populated from a
>>> database.
>>>
>> Is your question how to create a form dynamically, or how to fill an
>> existing form? What PDFBox version are you using?
>>
>> Tilman
>>
>>
>>> The database is propriety and I will scrape the data, then use PDFBox to
>>> generate a copy of the form with some of the fields filled out with the
>>> relevant information that was previously scraped.
>>>
>>> Does anyone see any issues with this?
>>>
>>> The environment is XP, and it only has to work across a company LAN.
>>>
>>> Regards,
>>>
>>> Al
>>>
>>>
>> ---------------------------------------------------------------------
>> 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


Mime
View raw message