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

PDField.setValue is not behave correctly

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 1.7.0
    • Fix Version/s: 2.0.0
    • Component/s: AcroForm, Writing
    • Labels:
      None
    • Environment:
      JavaEE 1.6 project developed under Window system, will deploy to Unix Weblogic server

      Description

      Use a template PDF file to write value into different fields (type of PDTextbox, PDCheckbox, PDChoiceField). The PDTextbox displays either very large font or not show anything. If click into the field, it displays correctly. Click outside the field, it reverts back to the wrong display. The same logic of code works well with iText library. The code similar to:

      PDFTemplate = PDDocument.load("myTemplate.pdf");
      PDDocumentCatalog docCatalog = PDFTemplate.getDocumentCatalog();
      PDAcroForm acroForm = docCatalog.getAcroForm();
      :
      try

      { PDField pdField = acroForm.getField(field); if (pdField != null) pdField.setValue(value); }

      catch(...){}
      :

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              msahyoun Maruan Sahyoun
              Reporter:
              joeleeisjoelee Joe Lee

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment