You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Manikandan (JIRA)" <ji...@apache.org> on 2011/01/03 10:13:46 UTC

[jira] Created: (PDFBOX-930) I cant able to get list of fields

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
             Fix For: 0.7.3


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.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PDFBOX-930) I cant able to get list of fields

Posted by "Andreas Lehmkühler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PDFBOX-930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Lehmkühler updated PDFBOX-930:
--------------------------------------

    Fix Version/s:     (was: 0.7.3)

> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PDFBOX-930) I cant able to get list of fields

Posted by "Andreas Lehmkühler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12976963#action_12976963 ] 

Andreas Lehmkühler commented on PDFBOX-930:
-------------------------------------------

You should update to a newer version, 0.7.3 is quite old...

> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] [Commented] (PDFBOX-930) I cant able to get list of fields

Posted by "Gilad Denneboom (JIRA)" <ji...@apache.org>.
    [ 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