View Comments in PDF

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v10)  /  Re: View Comments in PDF

DynamicPDF CoreSuite for .NET (v10) Forum

 Aug 12 2020 10:42 AM
Hi,

I use Dynamic PDF v10 and I want to load a pdf with comments et retrieve all information possible about comments.  This is the code I write to test it and after my pdf is write on disk I don't know how to retrieve Note or comment.


                ceTe.DynamicPDF.Document _Document = new ceTe.DynamicPDF.Document();
                ceTe.DynamicPDF.Page _Page = new ceTe.DynamicPDF.Page();
                _Document.Pages.Add(_Page);
                _Page.Elements.Add(new Note("This is my help note.", 50, 50, 150, 50, NoteType.Help, true));
                _Document.Draw(txtFirstPdf.Text);

                PdfDocument _FirstPdfDocument = new PdfDocument(txtFirstPdf.Text);
                MergeDocument _ResultDocument = new MergeDocument();
               _ResultDocument.Append(_FirstPdfDocument, 1, 1);

When I inspect the "_ResultDocument.Pages[0].Elements.Count" is equal to 0.

SOmebody can help me to retrieve informations about notes and comments in a PDF

Thanks a lot

Eric Riendeau



 Aug 13 2020 4:36 PM
Posted by a ceTe Software moderator
Hi Eric,

We don't currently expose a way to text of a Note, but have a feature request to add this functionality. We've scheduled development on that feature for next week. If you like to text out an early build, please send and email to us at support@dynamicpdf.com  and reference this post.

Thanks,
ceTe Software Support Team
 Jan 05 2021 4:52 AM
Posted by a ceTe Software moderator - Commonly asked question
Hello,

Support for retrieving text information from a Note annotation is included in the latest release, DynamicPDF Core Suite for .NET (v11). You can download latest product from NuGet (Package ID: ceTe.DynamicPDF.CoreSuite.NET) or from our website here.

Here is a code sample.

            PdfDocument pdf = new PdfDocument(@"Input PDF file path");
            PdfAnnotation[] pdfNoteList = pdf.Pages[0].GetNoteAnnotations();
            PdfAnnotation note1 = pdfNoteList[0];
            string noteText = note1.Contents;

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 3:55 AM.