We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Unable to cast object of type 'Aspose.Pdf.Annotations.WidgetAnnotation'

Test.pdf (170.5 KB)

When calling RemoveUsageRights on the attached PDF we get the following exception. ‘Unable to cast object of type ‘Aspose.Pdf.Annotations.WidgetAnnotation’ to type ‘Aspose.Pdf.Forms.Field’.’

        Aspose.Pdf.Document doc = new Aspose.Pdf.Document(@"c:\temp\Test.pdf");
        Aspose.Pdf.Facades.PdfFileSignature sign = new Aspose.Pdf.Facades.PdfFileSignature();
        sign.BindPdf(doc);
        sign.RemoveUsageRights();

@bruceb6

Thank you for contacting support.

We have been able to reproduce the issue in our environment. A ticket with ID PDFNET-47334 has been logged in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.

A post was split to a new topic: RemoveUsageRights throws exception Unable to cast object of type Aspose.Pdf.Annotations.WidgetAnnotation