VintaSoft PDF .NET Plug-in Discussions

Questions, comments and suggestions concerning VintaSoft PDF .NET Plug-in.

Board index < VintaSoft Imaging < VintaSoft PDF .NET Plug-in Discussions

We are migrating to new forums engine, no new registration or posting currently available. TIA for your patience.

ReadOnly PdfAnnotation is editable.



ReadOnly PdfAnnotation is editable.

Post by IntegraHarlan »

Hi,
If a read only PdfAnnotation is set to read only, I would expect to not be able to move or edit the annotation.
If I have a PdfAnnotation with the IsReadOnly property set to true, and the PdfAnnotationTool.InteractionMode set to PdfAnnotationInteractionMode.Edit, I am able to move and size the annotation.
Is this the correct behavior?
I would like to be able to multi select annotations, but If i try to move the selected annotations, I would expect only the ones that are read only to be movable.

Thanks
Harlan


Re: ReadOnly PdfAnnotation is editable.

Post by Alex »

Hi Harlan,

Yes, this is correct behavior.

In PdfAnnotationInteractionMode.Edit mode the PdfAnnotationTool allows to view and edit PDF annotations and PDF interactive fields.
Please read more info here: https://www.vintasoft.com/docs/vsimagin ... nMode.html

Best regards, Alexander


Re: ReadOnly PdfAnnotation is editable.

Post by IntegraHarlan »

Thanks for the reply Alexander.
Is there a way I can select read only annotations with the InteractonMode set to Edit, but make it so that the read only annotations are not movable?
I would like to be able to select multiple annotations, but make so that if any of the selected annotations are read only, they would not be movable.

Thanks
Harlan


Re: ReadOnly PdfAnnotation is editable.

Post by Alex »

Hi Harlan,

You need to use the PdfAnnotationInteractionMode.Markup mode if you want to create, move and resize PDF annotations and read-only annotations must not be interactable.

If you still need to use the PdfAnnotationInteractionMode.Edit mode, you need to override the PdfAnnotationTool.CanInteractWith method (https://www.vintasoft.com/docs/vsimagin ... tWith.html) and override the method logic.

Best regards, Alexander


Re: ReadOnly PdfAnnotation is editable.

Post by IntegraHarlan »

OK, maybe I am going about this the wrong way.
I am trying to multi select annotations so that I can move multiple annotations.
However, I only want to be able to move annotations that are not set to read only.
Is there a interaction mode that will let me do this?

Thanks
Harlan


Re: ReadOnly PdfAnnotation is editable.

Post by Alex »

Hi Harlan,
However, I only want to be able to move annotations that are not set to read only.
Is there a interaction mode that will let me do this?
For solving your task you need to use the PdfAnnotationInteractionMode.Edit mode and override the PdfAnnotationTool.CanInteractWith method (https://www.vintasoft.com/docs/vsimagin ... tWith.html) for changing the interaction logic with annotations. The PdfAnnotationTool.CanInteractWith method should return False for read-only PDF annotations.

Best regards, Alexander


Page 1 from 1: 1