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

XMPSchemaBasic setCreateDate and setModifyDate don't work if already set

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.8.8, 1.8.11
    • 1.8.12
    • JempBox
    • None
    • using pdfbox from maven

    Description

      When setting XMPSchemaBasic with in certain PDFs , setCreateDate and setModifyDate do not work if the dates are already set in the pdf.

      So this will not work as expected:

      XMPSchemaBasic bi = xmp.getBasicSchema();
      bi.setCreateDate(someDate);
      bi.setModifyDate(anotherDate);
      

      Setting other metadata fields works as expected, except for these two.

      I found a workaround . If I set the fields to null, before setting them to a new value everything works as expected:

      XMPSchemaBasic bi = xmp.getBasicSchema();
      bi.setCreateDate(null);
      bi.setCreateDate(someDate);
      bi.setModifyDate(null);
      bi.setModifyDate(anotherDate);
      

      But still it feels like there is something wrong with the way setting these two dates work.

      Attachments

        1. SJA Brochure February 2016 (DFV Edits).pdf
          6.91 MB
          Svetlozar Argirov

        Activity

          People

            tilman Tilman Hausherr
            zaro Svetlozar Argirov
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: