These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Track changes

willin2u
Registered: Sep 14 2009
Posts: 16

Does anybody have a javascript to track changes in a document created in Livecyle Designer? Am looking for something that does the same track changes as in MicroSoft Word where you can show what was deleted and what was added and allow the ability to accept the changes.
 
Is there such a script?
 
 
 

My Product Information:
LiveCycle Designer, Windows
JoelGeraci
ExpertTeam
Registered: Aug 17 2006
Posts: 80
I've never seen one but you can print to static PDF and then run document compair in Acrobat.
UVSAR
Expert
Registered: Oct 29 2008
Posts: 1357
Change-tracking isn't something that a PDF (either an Acrobat PDF or an XFA form) is designed to support. When something is edited, there's no internal reference kept about what the old version looked like, who/why/when the change was made, etc. - so "not accepting" the change is a logical impossibility. You could in theory do something with a plugin, but storing change-tracking data within the file itself would be a technical nightmare as the PDF specification doesn't really give you a place to put it which won't then confuse users or interfere with other software - you'd probably end up having to attach binary data to the PDF, which users without the plugin wouldn't be able to use.

It's also important to say that the privacy protection issues around change-tracking are a real concern for users of products that do support it (Office for example goes to great lengths to give users the opportunity to get rid of it again). The inbuilt functions in Acrobat (such as Sanitize) wouldn't handle any plugin-related private data.
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Hi,

here is a nice example, to create a kind of undo function in a XFA form.
You can use this to store any changes in the extras object of your form fields and you possibly can script a method to compare the current values with older values.
Then you can highlight changed field or recover an earlier state.

In fact, you still have to do a lot of scripting by yourself, but with this example, you have a great point to start with.


radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

UVSAR
Expert
Registered: Oct 29 2008
Posts: 1357
@radzmar: That script may work for keeping a history of the _data_ entered into a form field, but you can't track changes in the _document_ because neither Acrobat nor LCD will record what they're doing. As I said, that's the domain of a plugin, and not something anyone would realistically want to use given how much user-visible data it would have to embed into the file.
willin2u
Registered: Sep 14 2009
Posts: 16
How about a script that hightlights text or characters or words when a change is made. For example, if the original document has a sentence such as "the cow jumped over the moon" and another use changes "cow" to "dog", is there a way to write a script to automatically highlight the word because there has been a change?
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Acrobat has a built-in function to compare documents. It does pretty much what you described.
Edit: I see this was mentioned earlier... At real-time, though, this is not possible with a script. However, I can imagine a script that makes a textual comparison of a file with a in-memory version of it, but it will still have to be triggered manually since there's no event launched when editing a file.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com