removing comment creation time?

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
qlaus_2
User
Posts: 14
Joined: Thu Oct 31, 2013 9:39 pm

removing comment creation time?

Post by qlaus_2 »

Hello,

a while ago I got great support how to remove author's names in comments via a JavaScript (viewtopic.php?f=62&t=30536).

What I'm wondering now: is there a way to remove the comment creation date/time? Or to set it to the last save time? Searching did not help.

Why? I sometimes work "strange hours", while sitting at an airport or waking up jet lagged early, and I simply don't want to share my working time.

Thanks for your ideas!

edited: typo removed
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17892
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: removing comment creation time?

Post by Tracker Supp-Stefan »

Hello qlaus_2,

I am afraid that while the author can be changed - creation date is 'read only' through JS, and is always required, so it can not be removed, and can not be altered with JS. It might be possible with some tools that allow you low level access to a file but not with the Editor.

Regards,
Stefan
qlaus_2
User
Posts: 14
Joined: Thu Oct 31, 2013 9:39 pm

Re: removing comment creation time?

Post by qlaus_2 »

Hello Stefan,

that was not what I wanted to hear, but it's not totally unexpected.

Nevertheless, Thanks for your fast reply!

Regards,
qlaus
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17892
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: removing comment creation time?

Post by Tracker Supp-Stefan »

Hello qlaus,

Sorry that I could not bring better news, and thanks for the understanding!

Regards,
Stefan
Joxon
User
Posts: 47
Joined: Sat Sep 12, 2015 4:54 am

Re: removing comment creation time?

Post by Joxon »

I also often work at ‘ungodly hours’. Due to the corona hassle a lot of people work at home, and therefore I hardly get print outs of manuscripts anymore. I now have to work directly in PDF’s with comments. In order to hide my tracks I figured out a method to edit the creation time and match it with the modified time. Please make a copy of your work before you do anything!

1. Open a PDF with comments.

2. Launch the JavaScript Console (Ctrl+J) and run the script you mentioned: viewtopic.php?f=62&t=30536.

3. Save the file and ‘Export Comments to Data File...’

4. Open the .fdf file with Notepad++.

5. Search for /M (= Modification date) and copy the date between the parentheses. It looks like: D:20200607094534+02'00'

6. Press Ctrl+H. In the Search Mode select Regular expression.

7. Input:

Find what: CreationDate \(.*\)
Replace with: CreationDate \(D:20200607094534+02'00'\)

Replace All.

8. Save the file.

9. Delete all your comments in the PDF: ‘Show Comments List’, select all comments and press Delete. (Or open the original, untouched PDF file.)

10. Save the file and ‘Import Comments...’. Save the file again.

That’s it! Now the creation date and the modified date are identical.

If there are other ways, like a handy script, please let me know.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17892
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: removing comment creation time?

Post by Tracker Supp-Stefan »

Hello Joxon,

Thanks for sharing your way to hack those dates!
I am sure it can be useful to others!

Kind regards,
Stefan
Joxon
User
Posts: 47
Joined: Sat Sep 12, 2015 4:54 am

Re: removing comment creation time?

Post by Joxon »

I did a simple test with a PDF with comments:

1. I exported all comments to a data file.

2. I ran the above script to change the author’s name and creation date and exported all comments to a data file.

3. I compared both FDF files with Beyond Compare and I noticed that the script rewrites a lot of lines.

To be on the safe side the best way to edit the author’s name, the creation date and/or the modification date is to do it all in Notepad++. Open the FDF file and...

Input (Search Mode: Normal):

Find what: /T (Your Name)
Replace with: /T (Your Desired Name)

Replace All.

Input (Search Mode: Regular expression):

Find what: CreationDate \(.*\)
Replace with: CreationDate \(D:20200613150034+02'00'\)

Replace All.

Input (Search Mode: Regular expression):

Find what: /M \(.*\)
Replace with: /M \(D: 20200613150034+02'00'\)

Replace All.

If you compare the final FDF file to the old one only these three changes are made.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17892
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: removing comment creation time?

Post by Tracker Supp-Stefan »

Hello Joxon,

Once again, many thanks for the input!

Kind regards,
Stefan
Post Reply