Hello,
For my system, we are not allowed to make changes to the documents, so I can't save annotations as part of the PDF. So I'm looking to save the attributes for all annotations so that later I can re-create them. I noticed that the creationDate property is read only, so it seems that there is no way for me to set an annotations creation date. Do you know if there is anyway to get around this?
Also, it looks like when I create an annotation with a specific mod date, it is not displaying that date. Here is the JavaScript I'm using:
var mDate = new Date();
mDate.setFullYear(2013);
mDate.setMonth(10);
mDate.setDate(20);
mDate.setHours(09);
mDate.setMinutes(41);
mDate.setSeconds(59);
var annot = this.addAnnot({
page: 0,
modDate: mDate,
type: "Circle"});
When using that, the mod date will be the date when the annotation was created, instead of the date I specify.
Setting the create/modify date
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- Site Admin
- Posts: 2454
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Setting the create/modify date
Hi, Daniel.
I'm afraid but you cannot change the creationDate because it is read-only property by Adobe's JS standard. Also in current implementation you cannot pass the custom creationDate as argument for addAnnot() function. The same with modDate - you cannot pass custom modDate to addAnnot() or change it after creation because it is implemented as read only. Currently is no way to customize them. We will fix it in the next release.
RT#2126: JavaScript: some annot creation problems.
Best
Regards.
I'm afraid but you cannot change the creationDate because it is read-only property by Adobe's JS standard. Also in current implementation you cannot pass the custom creationDate as argument for addAnnot() function. The same with modDate - you cannot pass custom modDate to addAnnot() or change it after creation because it is implemented as read only. Currently is no way to customize them. We will fix it in the next release.
RT#2126: JavaScript: some annot creation problems.
Best
Regards.
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 34
- Joined: Wed Oct 09, 2013 5:58 pm
Re: Setting the create/modify date
Thank you for the quick response! 

-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am
-
- Site Admin
- Posts: 3589
- Joined: Thu Jul 08, 2004 10:36 pm
Re: Setting the create/modify date
fixed in build 309
PDF-XChange Co Ltd. (Project Director)
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
-
- User
- Posts: 103
- Joined: Mon Mar 18, 2013 4:26 pm
Re: Setting the create/modify date
Hello,
I just installed version 309 and the create and modified dates are still not fixed.
I am running this test:
var annot = this.addAnnot({
type: "FreeText",
contents: "Testing date",
creationDate: new Date("October 13, 2013 11:13:00"),
modDate: new Date("October 13, 2013 11:13:00"),
rect: [20, 600, 100, 620]
});
Can you please assist.
Thanks
-Tatiana
I just installed version 309 and the create and modified dates are still not fixed.
I am running this test:
var annot = this.addAnnot({
type: "FreeText",
contents: "Testing date",
creationDate: new Date("October 13, 2013 11:13:00"),
modDate: new Date("October 13, 2013 11:13:00"),
rect: [20, 600, 100, 620]
});
Can you please assist.
Thanks
-Tatiana
-
- Site Admin
- Posts: 3589
- Joined: Thu Jul 08, 2004 10:36 pm
Re: Setting the create/modify date
Sorry, I didn't notice you are talking about issue in Viewer.
In 309 build it has been fixed in the Editor.
Now I have add the fix to the Viewer too, but it will be available only in the next build.
In 309 build it has been fixed in the Editor.
Now I have add the fix to the Viewer too, but it will be available only in the next build.
PDF-XChange Co Ltd. (Project Director)
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
-
- Site Admin
- Posts: 7388
- Joined: Wed Mar 25, 2009 10:37 pm
Re: Setting the create/modify date
Fixed in 310. 

Best regards
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
-
- User
- Posts: 103
- Joined: Mon Mar 18, 2013 4:26 pm
Re: Setting the create/modify date
That is great, Thanks
-
- Site Admin
- Posts: 6815
- Joined: Mon Oct 15, 2012 9:21 pm
Re: Setting the create/modify date

If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.
Best regards
Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
Thank you.
Best regards
Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com