We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Change PDF CreationDate and ModDate

Hello, I am trying Aspose.PDF in C# 2010 and I need to change PDF.Info.CreationDate and PDF.Info.ModDate values to meet my needs. But when I save PDF it always saves current date into CreationDate and ModDate. It also inserts into Info PDF Generator "Aspose Pdf for .NET 6.4" and Application "Aspose Ltd." Which I don't want to be pasted in.

When I use the same with DOC or XLS (with Apose.Words or Aspose.Cells) It works as I need.

I also tryied Clearing info, which does the same - inserts actual Date into both Values.

Example Code:

pdf = new PDF.Document(fileName);
pdf.Info.CreationDate = dtDocCreated; //this is my specific Date
pdf.Info.ModDate = dtDocLastSaved; //this is my specific Date

Please help me where is bug?


Hello Tomas,

Thanks for using our products. In order to update/set the PDF information, please try using DocumentInfo class. You may use ModDate and CreationDate properties of DocumentInfo class to set Modification and document Creation date. More along in order to clear already existing document information such as Title, Author, Subject etc, please try using DocumentInfo.Clear(…) method.

I am afraid you might not be able to update/change Producer and Application field information as they are read only fields. In case you have any further query, please feel free to contact. We apologize for your inconvenience.

Document doc = new Document(@“D:\pdftest\1.pdf”);
DocumentInfo docinfo = new DocumentInfo(doc);
docinfo.ModDate = DateTime.Parse(“1/11/2011”);
docinfo.CreationDate = DateTime.Today;

Hello codewarrior,
thanks for reply, I tried Your code, but result is the same.

Just try this:

Document doc = new Document(@“D:\pdftest\1.pdf”);
DocumentInfo docinfo = new DocumentInfo(doc);
docinfo.ModDate = DateTime.Today.AddDays(-1);
docinfo.CreationDate = DateTime.Today.AddDays(-1);

This should ceate file, which has date of creation Yesterday and modified date - the same - Yesterday, but it does not. - Modified Date is actual, when Save methods runs.

Thanks for support.


Hi Tomas,

I have tested the scenario and I am able to notice the same problem. For the sake of correction, I have logged this problem as PDFNEWNET-32755 in our issue tracking system. We will further look into the details of this problem and will keep you updated on the status of correction.

We apologize for your inconvenience.

Thanks & Regards,


has there been any progress on this issue? I am having the same problem when trying to set the modified date on a pdf. The date appears to be set correctly but when the file is saved the modified date reverts to the current time.



Hi Mark,

Thanks for your inquiry. I’m afraid the reported issue is not resolved yet due to other priority tasks. However, I’ve requested the development team to share an ETA. We will update you as soon as we get a feedback.

Sorry for the inconvenience faced.

Best Regards,

Hi Tilal,
Thanks for the reply. I’d really appreciate an ETA on this as without this aspect working correctly documents are being added incorrectly into our search engine and rendering the date search function useless.


Hi Mark,

Thanks for your feedback. I’ve shared your concerns with development team and requested for the ETA. I’ll update you about the ETA as soon as I get a feedback.

Thanks for your patience and cooperation.

Best Regards,

The issues you have found earlier (filed as PDFNEWNET-32755) have been fixed in Aspose.Pdf for .NET 8.3.0.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.