Hi,
Thank you for the reply.
Thanks,
Vaibhav D Gandhi, Sr. Software Engineer
Phone(O):91-79-66737000, Ext:5234
From: 1T3XT BVBA [mailto:i...@1t3xt.info]
Sent: Tuesday, May 21, 2013 11:00 AM
To: Post all your questions about iText here
Subject: Re: [iText-questions] Getting blank CreationDate
On 21/05/2013 5:57, Vaibhav Gandhi wrote:
Hi,
Can anybody help me in this issue, please ?
Yes, you should call HP and tell them their PDF has an inconsistency.
Please open your PDF in a text editor, and look at the first object (the one
with number 9):
9 0 obj
<<
/Author (Ian Dallow)
/CreationDate ()
/Creator (HP Digital Sending Device)
/ModDate (D:20130508044059+04'00')
/Producer (HP Digital Sending Device)
/Subject (testing)
/Title (test title)
>>
endobj
As you can see, the value for the CreationDate is an empty string, which is
EXACTLY what iText tells you when you ask iText for the CreationDate entry in
the Info dictionary (and it's very frustrating when people imply that there's a
bug in iText when iText is COMPLETELY CORRECT)!
Then why do you see a date when you open the PDF in Adobe Reader? Because
there's a CreationDate in the XMP data. Scroll to object number 4, and you'll
find a tag named CreateDate:
4 0 obj
<<
/Length 3652
/Subtype /XML
/Type /Metadata
>>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.4-c005 78.147326,
2012/08/23-13:03:03 ">
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"<http://www.w3.org/1999/02/22-rdf-syntax-ns>>
<rdf:Description rdf:about=""
xmlns:dc="http://purl.org/dc/elements/1.1/"<http://purl.org/dc/elements/1.1/>
xmlns:pdf="http://ns.adobe.com/pdf/1.3/"<http://ns.adobe.com/pdf/1.3/>
xmlns:xmp="http://ns.adobe.com/xap/1.0/"<http://ns.adobe.com/xap/1.0/>
xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"<http://ns.adobe.com/xap/1.0/mm/>>
<dc:format>application/pdf</dc:format>
<dc:creator>
<rdf:Seq>
<rdf:li>Ian Dallow</rdf:li>
</rdf:Seq>
</dc:creator>
<dc:description>
<rdf:Alt>
<rdf:li xml:lang="x-default">testing</rdf:li>
</rdf:Alt>
</dc:description>
<dc:title>
<rdf:Alt>
<rdf:li xml:lang="x-default">test title</rdf:li>
</rdf:Alt>
</dc:title>
<pdf:CreationDate--Text/>
<pdf:Producer>HP Digital Sending Device</pdf:Producer>
<xmp:CreatorTool>HP Digital Sending Device</xmp:CreatorTool>
<xmp:ModifyDate>2013-04-23T16:54:07+01:00</xmp:ModifyDate>
<xmp:CreateDate>2013-04-23T16:53:22+01:00</xmp:CreateDate>
<xmp:MetadataDate>2013-04-23T16:54:07+01:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:d600fdb0-1392-49dd-9132-0da4f9c5d597</xmpMM:DocumentID>
<xmpMM:InstanceID>uuid:d4fec41d-9fe9-43c4-9b8f-7308e820f417</xmpMM:InstanceID>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>
endstream
In other words: you're looking at the wrong place for the date! You need to get
the Metadata stream and parse it for the CreateDate.
"Legal Disclaimer: This electronic message and all contents contain information
from Cybage Software Private Limited which may be privileged, confidential, or
otherwise protected from disclosure. The information is intended to be for the
addressee(s) only. If you are not an addressee, any disclosure, copy,
distribution, or use of the contents of this message is strictly prohibited. If
you have received this electronic message in error please notify the sender by
reply e-mail to and destroy the original message and all copies. Cybage has
taken every reasonable precaution to minimize the risk of malicious content in
the mail, but is not liable for any damage you may sustain as a result of any
malicious content in this e-mail. You should carry out your own malicious
content checks before opening the e-mail or attachment."
www.cybage.com
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php