Documents for PDF .NET Edition
GrapeCity Documents PDF Viewer / Configure GcDocs PDF Viewer / Edit PDF / Annotation Editor
In This Topic
    Annotation Editor
    In This Topic

    The Annotation Editor in GcDocs PDF Viewer allows you to edit and review PDF documents. You can add or remove different types of annotations, comment or reply on comments and set or modify annotation properties like text, color, position, border, style etc. All the annotations in a document are listed in the Property panel so that any annotation can be accessed and modified at any point of time.

    The below image shows Annotation editor in GcDocs PDF Viewer with a PDF document containing a Text annotation.

    Annotation editor in GcDocs PDF Viewer

    The different toolbar buttons are described as below. To know more about different annotations, refer Annotation Types.

    Toolbar Icons Description
    Annotation icon Select an annotation added on PDF
    Sticky note icon Adds text or sticky notes on the PDF
    Note icon Adds a note that is always visible on the PDF
    Draw icon Draws free-hand scribble on the PDF
    Rectangle icon Adds a rectangle shape on PDF
    Circle icon Adds a circle shape on the PDF
    Line icon Adds a straight line on the PDF
    Shapes icon Adds closed or open shapes of multiple edges on the PDF
    Polygon icon Adds a polygon on the PDF
    File attachment icon Attaches a file to the document, which will be embedded in the PDF
    Sound icon Adds sound (.au, .aiff, or .wav format) imported from a file or recorded from the computer’s microphone
    Delete annotation icon Deletes the annotation
    Mark region icon Marks region on PDF document to be redacted
    Apply redeact icon Applies redact to all regions marked for redact


    Apart from the different types of annotations described above, GcDocs PDF Viewer also provides some general editing features while working with PDF documents. They are explained as below:

    Toolbar Icons Description
    Undo icon Undo changes
    Redo icon Redo changes
    Save icon Saves the modified document on client
    Create new doc icon Creates a new blank document
    Insert blank page icon Inserts a blank page
    Delete page icon Deletes current page
    Note: You can view, print or download the original PDF document at any point of time by using the 'Hide Annotations' button on the main toolbar.

    Property Panel of Annotation Editor

    When you click the Annotation editor icon in the left vertical panel, the Property panel of the Annotation editor becomes visible. The Property panel displays the list of all the annotations page-wise in your document.

    It also allows you to set or modify properties of any annotation in the document like its text, color, border location etc. For eg. The image below shows the properties of a square annotation in the Property panel.


    Property Panel of Annotation Editor


    Redact Annotation

    The annotation editor allows you to add Redact annotation. A redact annotation marks an area under which all the existing content should be removed from PDF document. Redact annotation, unlike other annotations, is applied in two phases:

    Redact icon  Redact (erase) a region: It highlights the area under which the content needs to be redacted or removed.

    Redact all icon  Apply all Redacts: It applies redaction, that is, removes all the content which is marked for redaction.


    The below image shows the area marked for redaction in a PDF document. The properties in 'Redaction Mark' can be defined to specify how the highlighted area marked for redaction should look before the redaction has been applied.

    Redaction in a PDF document

    After the redaction is applied, the content marked for redaction is removed. However, you can revert the redaction and view the original content by selecting the 'Reset redact' button from the Properties panel.

    You can also define the 'Overlay text' or 'Fill Color' in the 'Redacted area' settings whose text or Fill color will appear in place of the redacted content.

    Overlay text or fill color

    When a PDF document with applied redact annotations is saved, the annotations and the content does not exist in the document anymore. They are replaced with the 'Redacted Area' properties. Also, as the content is removed, the redacted area cannot be used to copy or paste the content under redaction into other documents.

    Enable Annotation Editor in GcDocs PDF Viewer

    The Annotation editor is displayed by default in GcDocs PDF Viewer, by enabling the AnnotationEditorPanel in the viewer using code:

    Copy Code
        var viewer = new GcPdfViewer("#host", { supportApi: 'SupportApi/GcPdfViewer' });
        viewer.beforeUnloadConfirmation = true;"Home/GetPdf");


    To customize the annotation options in GcDocs PDF Viewer, add the following lines of code in the class file where you load the PDF in the Viewer:

    Copy Code
    public static GcPdfViewerSupportApiDemo.Models.PdfViewerOptions PdfViewerOptions
            get => new GcPdfViewerSupportApiDemo.Models.PdfViewerOptions(
            GcPdfViewerSupportApiDemo.Models.PdfViewerOptions.Options.AnnotationEditorPanel |
            annotationEditorTools: new string[] { "edit-select", "$split", "edit-text", "edit-free-text", "$split", "edit-erase", "$split", "edit-redact", "edit-redact-apply", "$split", "edit-undo", "edit-redo", "save" });

    Review PDF document using Annotation editor

    Follow the below steps to review a PDF document using the annotation editor in GcDocs PDF Viewer:

    1. Configure the GcDocs PDF Viewer for editing PDF documents.
    2. Run the application and open the PDF you want to review using the Open button.
    3. Open the Annotation Editor using the second last icon on the left vertical toolbar.
    4. Choose any annotation from the different annotations available in the toolbar at the top.
    5. Use that annotation to mark a correction in your document.
    6. Set annotation properties from the Property panel like color, border etc.
    7. Add a Text annotation and type the final review text.
    8. Close the Annotation editor and go back to View mode.

    The annotations are successfully added annotations to the document. You can also view the list of all the annotations in the property panel of Annotation Editor. 

     GcDocs PDF Viewer