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.
I want to change annotation on a document all to locked via code. I do know that there is already a post on the forum for this and I have looked at this as well as the Wiki, and have got the following code. However it does not seem to lock the annotations, so I guess I am doing something wrong?
Public Sub LockAnnotations()
Dim pSInt As PDFXEdit.IPXS_Inst = DirectCast(Me.docPreview.Inst.GetExtension("PXS"), PDFXEdit.IPXS_Inst)
Dim nID As Integer = Me.docPreview.Inst.Str2ID("op.annots.setProps", False)
Dim Op As PDFXEdit.IOperation = Me.docPreview.Inst.CreateOp(nID)
Dim input As PDFXEdit.ICabNode = Op.Params.Root("Input")
Dim page As PDFXEdit.IPXC_Page = myDoc.CoreDoc.Pages(0)
Dim nPageCount As UInteger = page.GetAnnotsCount()
For i As UInteger = 0 To nPageCount - 1
Dim annot As PDFXEdit.IPXC_Annotation = page.GetAnnot(i)
input.Add().v = annot
Next
If input.Count = 0 Then
Return
End If
Dim options As PDFXEdit.ICabNode = Op.Params.Root("Options")
options("Flags").v = 128
Op.Do()
End Sub
Hello,
can you help us about locking annotd, how we can lock a freetext without missing the possibility to change its properties (content properties i mean). see picture bellow.
Best regards
You do not have the required permissions to view the files attached to this post.
Do you want to achieve that in your SDK based product only? Or do you want to create such an annotation so that it would behave like that in all of the PDF readers/editors?
Hello Sir,
no,of course I'm looking for a solution to integrate into my SDK based product only.
Is that possible in all of the PDF readers/editors?
Thank you
You will have to catch the beforeOperationExecute event like described in this post: viewtopic.php?f=66&t=31487&p=127569&hil ... ot#p127544
Then you will have to check whether it's a ModifyAnnots operation. If so, get the Mask from it and see what is currently being modified. If there is some flags that you do not need, then break the event and the operation execution.
Hello,
thanks, but i can't find an operation that can avoid changz text and allow modify properties(color style of text ....)
in addition to that, is there any way to do this for just our tool(bubble wih arrow that we create) and not for all freetext annotations
Thank you