[ 
https://issues.apache.org/jira/browse/PDFBOX-930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034694#comment-13034694
 ] 

Gilad Denneboom commented on PDFBOX-930:
----------------------------------------

I'm using 1.5.0 and I'm getting similar results with forms created in Acrobat 
9.4.4 Pro.
Sometimes getAcroForm itself returns null, at other times getFields returns an 
empty List.

If I extract the pages with form fields to a new file, then it works fine. But 
if I add form fields to an existing file, the problem occurs.
I am using this Adobe file for testing: 
http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/batch_sequences.pdf

> I cant able to get list of fields
> ---------------------------------
>
>                 Key: PDFBOX-930
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-930
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel.AcroForm
>    Affects Versions: 0.7.3
>         Environment: Win-XP
>            Reporter: Manikandan
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> I have a pdf template contains textboxes. I need textbox value but its not 
> displayed properly. I am getting Null Pointer Exception.
> Here i mentioned my code ....
> try{
>        PDDocument pdf = PDDocument.load("C:\\Documents and 
> Settings\\manikandan.n\\Desktop\\MyTemplate\\1.pdf" );
>        PDDocumentCatalog docCatalog = pdf.getDocumentCatalog();
>        PDAcroForm acroForm = docCatalog.getAcroForm();
>       acroForm.setCacheFields(true);
>       PDField field = acroForm.getField("Client_Name");
>       field.setValue("Smith");
>       System.out.println("Sample::::::"+field.getValue());
>       pdf.save( "C:\\Documents and 
> Settings\\manikandan.n\\Desktop\\MyTemplate\\2.pdf" );*/
>       }catch(Exception e){
>          System.out.println("Error::::"+e);
>      }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to