How to get annotation details to identify it before removing on PHP SDK?

Product: PDFTron SDK - PHP

Product Version: 8.0

Please give a brief summary of your issue:
How to get annotation details to identify it before removing on PHP SDK?

Please describe your issue and provide steps to reproduce it:

Who to get the name or other properties to identify the Annotation before removing it on the PHP SDK?
I can identify the name on the Field but not on the Annotation, so I don’t know exactly what element I am removing. The type of all my annotation is Widget.

Please provide a link to a minimal sample where the issue is reproducible:

I would like to do something like that from WebViewer:

This piece of code also didn’t help, because all my $annot->GetType() are Annot::e_Widget:

		for ($i = (int)($page->GetNumAnnots())-1; $i>=0; --$i)
		{
			$annot = $page->GetAnnot($i);
			if ($annot->GetType() == Annot::e_Widget)
			{
				$annot->Flatten($page); 
			}
		}

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:Forums:

Hi fernandorochaworld,

Widget annotations have a fieldName property that can be accessed to identify which field they belong to.

Here is the API reference for WidgetAnnotations.
https://www.pdftron.com/api/web/Core.Annotations.WidgetAnnotation.html#main

Best Regards,
Ahmad Moaaz
Software Developer
PDFTron Systems, Inc.
www.pdftron.com