Hi Aspose!
At the moment Im writing a short program that makes MetaData on Sharepoint better. For this I use the BuiltInProperties from Files so you can see the real CreationDate and not the upload date. This works fine for .doc, .docx, .xls, .xlsx but with .pdf I have got a problem.
In Aspose.pdf there are no BuiltInPropertis. So I searched a bit and found pdf.Info.It contains everything I need at the moment, but the format of the CreationDate property is very strange and i cant convert it into DateTime. The format looks like this: D:20120411054453Z
So please could you give me a hint how to get a DateTime out of that?
Thanks in advance
Edit: Sorry forgot to say that im using C#.Net in Vs 2010
Hi Markus,
Thanks for using our products.
I have tested the scenario with below mentioned source code using Aspose.Pdf for .NET v6.9 and unable to notice any problem. The label text is displaying as "2/12/2007 9:04:48 PM". Kindly use the below code and check, if it fits your need.
[C#]
//open document<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Document pdfDocument = new Document(@"d:\pdffiles\adobe.pdf");
//get document information
DocumentInfo docInfo = pdfDocument.Info;
//show document information
DateTime dt = docInfo.CreationDate;
Label1.Text = dt.ToString();
If you still face any problem, please share some details regarding sample source code and template document you are using or create a sample application and post here to show the issue. This will help us to figure out the issue and reply back to you soon.
We apologize for your inconvenience.
Thanks & Regard,
Hi rashid!
Thanks for the code it works fine. It didn´t work with my code, because i accessed th creation date with the following Code:
pdf.Info["CreationDate"]
This Code replies the String that I´ve posted above, but with your code it returns a perfect DateTime thank you very much for helping me.
Hi Markus,
Thank you very much for your feedback. It is great to hear that your issue has been resolved. You are always welcome and please feel free to ask if you have any query in future.
Thanks & Regard,