Making comments read only
Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
Making comments read only
Hi There,
I'm trying to figure out if I can change the read only property of a comment, I'm working with a document and I want to blank out some existing areas semi-permanatley and work with the document as though the content isn't there, but still have them there if i need them in the future.
What i really need is to be able to "flatten" and "unflatten" comments, or something similar.
Cheers,
I'm trying to figure out if I can change the read only property of a comment, I'm working with a document and I want to blank out some existing areas semi-permanatley and work with the document as though the content isn't there, but still have them there if i need them in the future.
What i really need is to be able to "flatten" and "unflatten" comments, or something similar.
Cheers,
- TrackerSupp-Daniel
- Site Admin
- Posts: 8440
- Joined: Wed Jan 03, 2018 6:52 pm
Re: Making comments read only
Hi, JarrahP
The Read-only property can only be modified via the use of JavaScript. In order to disable it, you will need to understand JS and make use of the JS API reference Manual: https://www.adobe.com/content/dam/acom/ ... erence.pdf
Otherwise, the property you are looking for is the "Locked" property. This will have essentially the same effect, but can be modified through the GUI after being applied.
There is no way to "unflatten" as flattening converts and in most situations, removes much of the information that makes a comment a comment. This simply becomes base content, and there is no way to "detect" that is was previously anything else or reverse the process.
Kind regards,
The Read-only property can only be modified via the use of JavaScript. In order to disable it, you will need to understand JS and make use of the JS API reference Manual: https://www.adobe.com/content/dam/acom/ ... erence.pdf
Otherwise, the property you are looking for is the "Locked" property. This will have essentially the same effect, but can be modified through the GUI after being applied.
There is no way to "unflatten" as flattening converts and in most situations, removes much of the information that makes a comment a comment. This simply becomes base content, and there is no way to "detect" that is was previously anything else or reverse the process.
Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Re: Making comments read only
Neat, thanks for that! The "locked" property almost does what I want it to do, but the "select comments" tool still selects locked comments which is a bit annoying. Ideally they'd be unselectable by anything other than a dedicated process if that makes sense. Is that possible?
-
- User
- Posts: 2348
- Joined: Wed Jan 18, 2006 12:10 pm
Re: Making comments read only
What about working with layers ?
Comments can be put on one or more specific layers. Each layer can be made visible or not.
https://help.pdf-xchange.com/pdfxe9/layers-pane_ed.html
Comments can be put on one or more specific layers. Each layer can be made visible or not.
https://help.pdf-xchange.com/pdfxe9/layers-pane_ed.html
- Tracker Supp-Stefan
- Site Admin
- Posts: 17824
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Making comments read only
Hello Willy Van Nuffel,
I think JarrahP wants his comments to be visible but not really selectable.
So switched off layers might not be what he want but definitely has it's uses!
The way to make the comments visible but not selectable is to make them read only - via JS. That way those objects will still remain annotations, and can be read as such by the other process that JarrahP refers to.
Kind regards,
Stefan
I think JarrahP wants his comments to be visible but not really selectable.
So switched off layers might not be what he want but definitely has it's uses!
The way to make the comments visible but not selectable is to make them read only - via JS. That way those objects will still remain annotations, and can be read as such by the other process that JarrahP refers to.
Kind regards,
Stefan
Re: Making comments read only
Thanks for the suggestion willy, yeah Stefan is right layers don't do what I want unfortunately.
Might have to look in to the forbidden magix that is JS.
Might have to look in to the forbidden magix that is JS.
- Tracker Supp-Stefan
- Site Admin
- Posts: 17824
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Making comments read only
Hello JarrahP,
Do you want to make ALL comments on all pages read only or only the comments of e.g. a specific author?
Kind regards,
Stefan
Do you want to make ALL comments on all pages read only or only the comments of e.g. a specific author?
Kind regards,
Stefan
Re: Making comments read only
Only specific comments.
I guess ideally I'd be able to have a layer I could move comments to that made them read only while on that layer or something. I'd be the author of the comments I'd want to make read only, so being able to make all comments by an author read only would not be super useful, though I guess i could change the author or something.
I guess ideally I'd be able to have a layer I could move comments to that made them read only while on that layer or something. I'd be the author of the comments I'd want to make read only, so being able to make all comments by an author read only would not be super useful, though I guess i could change the author or something.
- Tracker Supp-Stefan
- Site Admin
- Posts: 17824
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Making comments read only
Hello JarrahP,
Just checked - and it is possible that you indeed create a layer, and then place all of your comments on that layer, and you can then run a simple script to lock the layer (in whichever state it was - visible or invisible), and only someone with a similar script can unlock that layer, while others will not be able to change it's visibility through the UI.
However the individual comments will not be themselves locked and can still be selected and e.g. deleted through the comments pane.
I could not find a way to get a JS that will e.g. recognize which layer given comments are on - so that I can lock only those comments directly.
Kind regards,
Stefan
Just checked - and it is possible that you indeed create a layer, and then place all of your comments on that layer, and you can then run a simple script to lock the layer (in whichever state it was - visible or invisible), and only someone with a similar script can unlock that layer, while others will not be able to change it's visibility through the UI.
However the individual comments will not be themselves locked and can still be selected and e.g. deleted through the comments pane.
I could not find a way to get a JS that will e.g. recognize which layer given comments are on - so that I can lock only those comments directly.
Kind regards,
Stefan
Re: Making comments read only
Thanks Stefan, I'm a total novice when it comes to scripts, could you provide a little more info or a tutorial? Thanks!
- Tracker Supp-Stefan
- Site Admin
- Posts: 17824
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Making comments read only
Hello JarrahP,
Create the layer, and add your comments to that layer through the normal UI commands.
Then open the JS console (Ctrl + J), and in there copy and paste the following (making sure to update the name value from 'Test' to the actual name of your layer):
Then his the green triangle to execute the above script - and it will toggle the visibility of your layer.
Kind regards,
Stefan
Create the layer, and add your comments to that layer through the normal UI commands.
Then open the JS console (Ctrl + J), and in there copy and paste the following (making sure to update the name value from 'Test' to the actual name of your layer):
Code: Select all
var ocgArray = this.getOCGs();
for (var i=0; i < ocgArray.length; i++) {
if (ocgArray[i].name == "Test") {
ocgArray[i].state = !ocgArray[i].state;
}
}
Kind regards,
Stefan
Re: Making comments read only
If I'm right all that script does is toggle the visibility of the layer? What I'm after here is to make comments visible, but not selectable with the select comments tool, on the main content window.
- Tracker Supp-Stefan
- Site Admin
- Posts: 17824
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Making comments read only
Hello JarrahP,
Apologies - should be careful what I am copy-pasting!
But then again - as mentioned earlier - this will lock the layer itself, but the comments can still be selected in the comments pane.
Kind regards,
Stefan
Apologies - should be careful what I am copy-pasting!
Code: Select all
var ocgArray = this.getOCGs();
for (var i=0; i < ocgArray.length; i++) {
if (ocgArray[i].name == "Test") {
ocgArray[i].locked = !ocgArray[i].locked;
}
}
Kind regards,
Stefan