Allow comments in PDF

Allow comments in PDF

Forum member · Mar 7, 2014
Is there a way to allow a user to add comments(sticky note, highlight text) to a PDF? I found the Security class which has different flags that can be set, but none of them seem to allow comments. I currently have a dynamic pdf generator for .Net v7.x

Re: Allow comments in PDF

Support · Mar 7, 2014
Hello, You can add notes to the PDF document using Note page element of our DynamicPDF Generator product. Please refer to the documentation on Note page element here and below is the sample code for it. It is not possible to highlight the text using DynamicPDF Generator API. // Create a PDF Document Document document = new Document(); // Create a Page and add it to the document Page page = new Page(); document.Pages.Add(page); // Create a note Note note = new Note("This is my help note.", 50, 50, 150, 50,NoteType.Help, true); // Change the color property note.Color = RgbColor.Red; // Add the note to the page page.Elements.Add(note); page.Elements.Add(new Label("Click on the above icon to view " +"the note.", 50, 80, 150, 72, Font.HelveticaBold, 18)); // Save the PDF document.Draw(@"C:\MyDocument.pdf"); Thanks, ceTe Software Support Team.

Re: Allow comments in PDF

Forum member · Mar 10, 2014
Once we generate the pdf and open it in toolbar of pdf there is Comment section which consist add sticky note and highlight text buttons. But when i generate the pdf these buttons are disable in pdf i want to enable these buttons how can i do it through code or is there any other way to do it.

Re: Allow comments in PDF

Support · Mar 11, 2014
Hello, We did testing on our end and still see the comment and highlight text buttons are enabled in the Reader after opening the PDF generated using the above posted code. If you are creating PDFs without setting any security then by default the highlight text and comment toolbar buttons will be enabled in the PDF Reader. If you are setting security to the PDF and using AllowUpdateAnnotsAndFields Boolean property of the Security class then please make sure that you are setting it to true. This property controls the disabling and enabling the comment and highlight text bar buttons. Thanks, ceTe Software Support Team.