GcPdfViewer annotation editor with all editing tools enabled

We enable the annotation editor panel in GcPdfViewer, with all annotation tools enabled by default. The loaded PDF is a sample report with a few annotations that suggest possible edits to the report's author. You can edit the existing, or add new annotations of various types. To save your changes, click the 'save' button in the annotation editor or in the main viewer toolbar. This sends the PDF and the list of changes to the server where GcPdf applies the edits and sends back the modified PDF. You can then open it in Acrobat or save locally.

window.onload = function(){ const viewer = new GcPdfViewer("#viewer", { workerSrc: "/documents-api-pdfviewer/demos/product-bundles/build/gcpdfviewer.worker.js", supportApi: { apiUrl: window.top.SUPPORTAPI_URL, token: window.top.SUPPORTAPI_TOKEN, webSocketUrl: false } }); viewer.addDefaultPanels(); viewer.addAnnotationEditorPanel(); viewer.layoutMode = 1; viewer.open("/documents-api-pdfviewer/demos/product-bundles/assets/pdf/viewer-edit-annotations.pdf"); }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Edit Annotations</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="./src/styles.css"> <script src="/documents-api-pdfviewer/demos/product-bundles/build/gcpdfviewer.js"></script> <script src="./src/app.js"></script> </head> <body> <div id="viewer"></div> </body> </html>
#viewer { height: 100%; }