removing comment creation time?

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

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

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

removing comment creation time?

Post by qlaus_2 » Tue Aug 13, 2019 1:12 pm

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: 14055
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: removing comment creation time?

Post by Tracker Supp-Stefan » Tue Aug 13, 2019 1:34 pm

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: 9
Joined: Thu Oct 31, 2013 9:39 pm

Re: removing comment creation time?

Post by qlaus_2 » Tue Aug 13, 2019 1:53 pm

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: 14055
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: removing comment creation time?

Post by Tracker Supp-Stefan » Tue Aug 13, 2019 2:59 pm

Hello qlaus,

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

Regards,
Stefan

Joxon
User
Posts: 29
Joined: Sat Sep 12, 2015 4:54 am

Re: removing comment creation time?

Post by Joxon » Sun Jun 07, 2020 8:16 am

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: 14055
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: removing comment creation time?

Post by Tracker Supp-Stefan » Mon Jun 08, 2020 12:51 pm

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: 29
Joined: Sat Sep 12, 2015 4:54 am

Re: removing comment creation time?

Post by Joxon » Sat Jun 13, 2020 1:19 pm

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: 14055
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: removing comment creation time?

Post by Tracker Supp-Stefan » Fri Jun 19, 2020 10:12 am

Hello Joxon,

Once again, many thanks for the input!

Kind regards,
Stefan

Post Reply