Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-930

I cant able to get list of fields

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Incomplete
    • 0.7.3
    • None
    • AcroForm
    • None
    • Win-XP

    Description

      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); }

      Attachments

        Activity

          People

            msahyoun Maruan Sahyoun
            manikandan.n Manikandan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified