Collapse all comments via code
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 93
- Joined: Mon Jul 07, 2008 8:41 am
Collapse all comments via code
How can I collapse all comments via code?
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Collapse all comments via code
You can use next JavaScript code:
Code: Select all
var annots=this.getAnnots(0);
if(annots!=null)
{
for(var i=0;i<annots.length;i++)
{
var annot=annots[i];
if (annot!=null)
{
annot.popupOpen = false;
}
}
}
-
- User
- Posts: 93
- Joined: Mon Jul 07, 2008 8:41 am
Re: Collapse all comments via code
I meant to collapse the annotations in the commentsview of PDFXChange Viewer, there is allready a button for it.
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Collapse all comments via code
You can run next commands:
33241 to Collapse all comments in Comments panel
and
33242 to Expand all comments in Comments panel
___
And if you want to close or open all Popups on the PDF document you can use "CloseAllPopups" (36439) or "OpenAllPopups" (36438) commands.
33241 to Collapse all comments in Comments panel
and
33242 to Expand all comments in Comments panel
Code: Select all
CoPDFXCview1.DoVerb('', 'ExecuteCommand', 33241, vDataOut, 0); // Collapse
CoPDFXCview1.DoVerb('', 'ExecuteCommand', 33242, vDataOut, 0); // Expand
And if you want to close or open all Popups on the PDF document you can use "CloseAllPopups" (36439) or "OpenAllPopups" (36438) commands.
-
- User
- Posts: 93
- Joined: Mon Jul 07, 2008 8:41 am
Re: Collapse all comments via code
When I execute this command, I receive "Command is currently disabled"
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Collapse all comments via code
33241 and 33242 commands won’t work if Comments pane is closed or if there are no comments.
-
- User
- Posts: 93
- Joined: Mon Jul 07, 2008 8:41 am
Re: Collapse all comments via code
How can I realize that all the comments are expand by default? Now I need to click each time on the "+" button.
I tried everytime when I load a document to execute the 33242 command, but then i receive that the command is currently disabled.
Hopefully you can help me.
I tried everytime when I load a document to execute the 33242 command, but then i receive that the command is currently disabled.
Hopefully you can help me.
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Collapse all comments via code
Sorry, but there is no way you can do such thing.
The Commenting pane is mostly part of the End User functionality and it cannot be controlled in AX at this time.
The Commenting pane is mostly part of the End User functionality and it cannot be controlled in AX at this time.
-
- User
- Posts: 216
- Joined: Thu Jul 08, 2004 7:29 pm
Re: Collapse all comments via code
Please note that these commands are not in your SDK documentation.
Having said that, can I get a list of all "hidden" or "undocumented" commands please?
Having said that, can I get a list of all "hidden" or "undocumented" commands please?
-
- Site Admin
- Posts: 2448
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Collapse all comments via code
Hi, DSSavant
You may enumerate all supported commands and look to 'Title' member of each command object,
see our PDF-XChange Viewer ActiveX SDK, section Reference/Named Items/Objects/Commands.
HTH.
You may enumerate all supported commands and look to 'Title' member of each command object,
see our PDF-XChange Viewer ActiveX SDK, section Reference/Named Items/Objects/Commands.
HTH.
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.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.