How to hide and unhide annotations

PDF-XChange Editor SDK for Developers

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.
Post Reply
lidds
User
Posts: 510
Joined: Sat May 16, 2009 1:55 pm

How to hide and unhide annotations

Post by lidds »

How can you hide and unhide annotations without modifying existing set flags? I am currently adding the annots that I want to be hidden or shown as shown below, however this does not seem to have any effect?

Code: Select all

If inputShow.Count <> 0 Then
                Dim options As PDFXEdit.ICabNode = OpShow.Params.Root("Options")
                options("Flags").v = -PXC_AnnotFlag.AF_Hidden
                options("MaskEx").v = PXV_OpModifyAnnotMaskFlags.OpModifyAnnot_Flags
                OpShow.Do()
            End If

            If inputHide.Count <> 0 Then
                Dim options As PDFXEdit.ICabNode = OpHide.Params.Root("Options")
                options("Flags").v = PXC_AnnotFlag.AF_Hidden
                options("MaskEx").v = PXV_OpModifyAnnotMaskFlags.OpModifyAnnot_Flags
                OpHide.Do()
            End If
Thanks

Simon
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: How to hide and unhide annotations

Post by Sasha - Tracker Dev Team »

Hello lidds,

You have to specify flags and flags mask and also the operation's mask:

Code: Select all

pr["Flags"] = AF_Hidden;
pr["FlagsMask"] = AF_Hidden;
pr["Mask"] = OpModifyAnnot_Flags;
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
lidds
User
Posts: 510
Joined: Sat May 16, 2009 1:55 pm

Re: How to hide and unhide annotations

Post by lidds »

Thanks Alex,

Such a simple thing :D
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

How to hide and unhide annotations

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply