You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Patrick Dalla Bernardina (Jira)" <ji...@apache.org> on 2023/09/11 14:26:00 UTC

[jira] [Commented] (PDFBOX-5680) PDF XMP ModifyDate extracted without TimeZone info

    [ https://issues.apache.org/jira/browse/PDFBOX-5680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17763748#comment-17763748 ] 

Patrick Dalla Bernardina commented on PDFBOX-5680:
--------------------------------------------------

It seems org.apache.xmpbox.DateConverter wasn't implemented to support timezone with the "-" character as all occurrences of "-" is removes at date string parsing implementation start
{quote}date = date.replaceAll("[-:T]", "");
{quote}

> PDF XMP ModifyDate extracted without TimeZone info
> --------------------------------------------------
>
>                 Key: PDFBOX-5680
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5680
>             Project: PDFBox
>          Issue Type: Bug
>          Components: XmpBox
>    Affects Versions: 3.0.0 PDFBox
>            Reporter: Patrick Dalla Bernardina
>            Priority: Major
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> I've run:
> {{[root@localhost Downloads]# java -jar tika-app-2.9.0.jar sobreavisoEditado3.pdf | grep xmp}}
> that returned
> WARN [main] 07:42:34,238 org.apache.pdfbox.pdmodel.font.PDType1Font Using fallback font LiberationSans for base font Symbol
> WARN [main] 07:42:34,241 org.apache.pdfbox.pdmodel.font.PDType1Font Using fallback font LiberationSans for base font ZapfDingbats
> <meta name="xmp:ModifyDate" content="2023-09-06T13:35:38Z"/>
> <meta name="xmp:MetadataDate" content="2023-09-06T13:35:38Z"/>
> <meta name="xmpTPg:NPages" content="11"/>
> {{{{}}{}}}While running:
>  \{{java -jar pdfbox-app-2.0.29.jar ExtractXMP -console sobreavisoEditado3.pdf }}
> Returned the correct info with the timezone info (-04:00):
> {{{}<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmp:ModifyDate="{*}2023-09-06T13:35:38{color:#de350b}+-04:00+{color}{*}" xmlns:xmp="http://ns.adobe.com/xap/1.0/"><xmp:MetadataDate>2023-09-06T13:35:38-04:00</xmp:MetadataDate></rdf:Description></rdf:RDF></x:xmpmeta><?xpacket end="w"?>{}}}{{{{}}{}}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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