Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Tue Dec 04, 2018 7:42 pm

Hi,

I need a way to take existing annotations and remove the author names, but leave them otherwise intact. Is there a way to do this in Spire.PDF?

Thanks,
Matt

mmyers
 
Posts: 1
Joined: Tue Dec 04, 2018 6:28 pm

Wed Dec 05, 2018 2:03 am

Dear Matt,

Thanks for your inquiry.
To help us investigate further, please provide your input PDF and code you were using here or send it to us(Support@e-iceblue.com) via email.

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Wed Jun 26, 2019 7:55 am

Dear Matt,

Thanks for your waiting.
Glad to inform you that the feature of removing author names have been done. Please download Spire.PDF Pack(Hot Fix) Version:5.6.31 and have a try. Below code for your kind reference:
Code: Select all
            for (int i = 0; i < doc.Pages.Count; i++)
            {
                for (int x = 0; x < doc.Pages[i].AnnotationsWidget.Count; x++)
                {
                    if (doc.Pages[i].AnnotationsWidget[x] is PdfTextMarkupAnnotationWidget)
                    {
                        PdfTextMarkupAnnotationWidget tma = doc.Pages[i].AnnotationsWidget[x] as PdfTextMarkupAnnotationWidget;
                        tma.Author = "";
                    }
                }
            }

Note we don't support removing the author of the annotation "Caret Annotations" at present. if there is any update, we will let you know.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Tue Jul 02, 2019 10:31 am

Dear Matt,

Glad to inform you that we support removing the author of Caret Annotations. Please download the latest Spire.PDF Pack Version:5.7.
Our website link: https://www.e-iceblue.com/Download/down ... t-now.html
NuGet link: https://www.nuget.org/packages/Spire.PDF/5.7.0
Code for your kind reference:
Code: Select all
                    if (doc.Pages[i].AnnotationsWidget[x] is PdfCaretAnnotationWidget)
                    {
                        PdfCaretAnnotationWidget ppa = doc.Pages[i].AnnotationsWidget[x] as PdfCaretAnnotationWidget;
                        ppa.Author = "";             
                    }


Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Mon Jul 08, 2019 9:42 am

Hi,

Greetings from E-iceblue.
Do you use the hotfix? Has your issue been resolved?

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.PDF