How to do we show or hide all annotations of a certain type? The old viewer had methods like ShowDrawings or ShowNotes but all I see is the show and hide commands for all comments.
md.comments.showAll
md.comments.hideAll
I figures out how to find all the comments of the type I want but I can't seam to figure out how to hide or show them once I have the Annotation Object.
Dim oPage As PDFXEditCtl.IPXC_Page
Dim oAnnot As IPXC_Annotation
Dim lItem As Long
Set oPage = AxPXV_Control1.doc.CoreDoc.Pages.Item(AxPXV_Control1.CurrentPage)
If oPage.GetAnnotsCount >= 1 Then
For lItem = 0 To (oPage.GetAnnotsCount - 1)
Set oAnnot = oPage.GetAnnot(lItem)
'NOW HOW DO I HIDE OR SHOW IT
Next
End If
ShowNotes
Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
Re: ShowNotes
Hello RMan,
To hide annotations you will need to set the appropriate flags for that. if you are doing this on the Editor's level then it's best to use the operation so that the appropriate events will be fired to all of the listeners and also, the Undo\Redo data will be available (if needed). Here's the code snippet:
Cheers,
Alex
To hide annotations you will need to set the appropriate flags for that. if you are doing this on the Editor's level then it's best to use the operation so that the appropriate events will be fired to all of the listeners and also, the Undo\Redo data will be available (if needed). Here's the code snippet:
Code: Select all
PDFXEdit.IPXC_Page page = pdfCtl.Doc.CoreDoc.Pages[pdfCtl.CurrentPage];
PDFXEdit.IPXC_Annotation annot = page.GetAnnot(0);
int nID = pdfCtl.Inst.Str2ID("op.annots.setProps", false);
PDFXEdit.IOperation Op = pdfCtl.Inst.CreateOp(nID);
PDFXEdit.ICabNode input = Op.Params.Root["Input"];
input.Add().v = annot;
PDFXEdit.ICabNode options = Op.Params.Root["Options"];
options["Flags"].v = (uint)PDFXEdit.PXC_AnnotFlag.AF_Hidden;
options["FlagsMask"].v = (uint)PDFXEdit.PXC_AnnotFlag.AF_Hidden;
options["Mask"].v = 0x00400000; //Modifying flags
Op.Do();
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ