[
https://issues.apache.org/jira/browse/PDFBOX-145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andreas Lehmkühler closed PDFBOX-145.
-------------------------------------
Resolution: Not A Problem
Assignee: Andreas Lehmkühler
The issue was already solved a long time ago. The pdf in question is encrypted
and has to be decrypted before accessing any data.
Set to closed
> PDDocumentInformation.getCreationDate() throws IOException
> ----------------------------------------------------------
>
> Key: PDFBOX-145
> URL: https://issues.apache.org/jira/browse/PDFBOX-145
> Project: PDFBox
> Issue Type: Bug
> Components: Parsing
> Assignee: Andreas Lehmkühler
>
> [imported from SourceForge]
> http://sourceforge.net/tracker/index.php?group_id=78314&atid=552832&aid=1456836
> Originally submitted by nobody on 2006-03-23 02:26.
> For some PDF documents, I get this exception when
> calling PDDocumentInformation.getCreationDate() :
> ----------------------
> java.io.IOException: Error converting date:#T©0]4¨ø¹}
> 3?W%bÃ!
> at org.pdfbox.util.DateConverter.toCalendar
> (DateConverter.java:237)
> at org.pdfbox.util.DateConverter.toCalendar
> (DateConverter.java:134)
> at org.pdfbox.cos.COSDictionary.getDate
> (COSDictionary.java:704)
> at
> org.pdfbox.pdmodel.PDDocumentInformation.getCreationDat
> e(PDDocumentInformation.java:232)
> -----------------------
> but when I view those PDF docs with Acrobat Reader, it
> has a valid, clean creation date ("Erstellt am:
> 07.12.2004 15:27:13"). It also shoes "1.4 (Acrobat
> 5.x) as the PDF version - so a quiet old and common
> version.
> Using PDFBox 0.7.2 with JDK 1.5.0_06.
> [comment on SourceForge]
> Originally sent by nobody.
> Logged In: NO
> I found the reason: this occurs on any PDF that is secured
> with a password. I work around the problem by first
> checking the document via
> myPDDocument.isEncrypted();
> if it is encrypted. If the result is true, I don't read the
> creation/modification date. Perhaps a more intuitive
> exception should be thrown, something like
> DocumentEncryptedException
> ...
--
This message was sent by Atlassian JIRA
(v6.1#6144)