Setting the create/modify date

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

DanielG
User
Posts: 34
Joined: Wed Oct 09, 2013 5:58 pm

Setting the create/modify date

Post by DanielG »

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.
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2454
Joined: Thu Jun 30, 2005 4:11 pm

Re: Setting the create/modify date

Post by Vasyl - PDF-XChange »

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.
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.
DanielG
User
Posts: 34
Joined: Wed Oct 09, 2013 5:58 pm

Re: Setting the create/modify date

Post by DanielG »

Thank you for the quick response! :)
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: Setting the create/modify date

Post by Stefan - PDF-XChange »

:)
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3589
Joined: Thu Jul 08, 2004 10:36 pm

Re: Setting the create/modify date

Post by Ivan - Tracker Software »

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.
TatianaS
User
Posts: 103
Joined: Mon Mar 18, 2013 4:26 pm

Re: Setting the create/modify date

Post by TatianaS »

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
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3589
Joined: Thu Jul 08, 2004 10:36 pm

Re: Setting the create/modify date

Post by Ivan - Tracker Software »

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.
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.
User avatar
Paul - PDF-XChange
Site Admin
Posts: 7388
Joined: Wed Mar 25, 2009 10:37 pm

Re: Setting the create/modify date

Post by Paul - PDF-XChange »

Fixed in 310. :-)
Best regards

Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
TatianaS
User
Posts: 103
Joined: Mon Mar 18, 2013 4:26 pm

Re: Setting the create/modify date

Post by TatianaS »

That is great, Thanks
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm

Re: Setting the create/modify date

Post by Will - Tracker Supp »

:)
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