You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2016/03/02 19:32:18 UTC

[jira] [Resolved] (PDFBOX-3257) XMPSchemaBasic setCreateDate and setModifyDate don't work if already set

     [ https://issues.apache.org/jira/browse/PDFBOX-3257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tilman Hausherr resolved PDFBOX-3257.
-------------------------------------
       Resolution: Fixed
         Assignee: Tilman Hausherr
    Fix Version/s: 1.8.12

Thanks for reporting this. A snapshot should be available in a few hours. I have also opened follow-up issue PDFBOX-3258 for XMPBox.

> XMPSchemaBasic setCreateDate and setModifyDate don't work if already set
> ------------------------------------------------------------------------
>
>                 Key: PDFBOX-3257
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3257
>             Project: PDFBox
>          Issue Type: Bug
>          Components: JempBox
>    Affects Versions: 1.8.8, 1.8.11
>         Environment: using pdfbox from maven
>            Reporter: Svetlozar Argirov
>            Assignee: Tilman Hausherr
>            Priority: Minor
>             Fix For: 1.8.12
>
>         Attachments: SJA Brochure February 2016 (DFV Edits).pdf
>
>
> 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:
> {code:Java}
> XMPSchemaBasic bi = xmp.getBasicSchema();
> bi.setCreateDate(someDate);
> bi.setModifyDate(anotherDate);
> {code}
> 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:
> {code:Java}
> XMPSchemaBasic bi = xmp.getBasicSchema();
> bi.setCreateDate(null);
> bi.setCreateDate(someDate);
> bi.setModifyDate(null);
> bi.setModifyDate(anotherDate);
> {code}
> But still it feels like there is something wrong with the way setting these two dates work.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org