GcPdfViewer form editor with all editing tools enabled

We enable the form editor panel in GcPdfViewer, with all field tools enabled by default. The loaded PDF is a sample form with just one actual field, and with several places where fields should be added to make the form fully functional. To try the form designer in action, you can add the missing fields where appropriate. To save your changes, click the 'save' button in the form 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.addFormEditorPanel(); viewer.layoutMode = 2; viewer.open("/documents-api-pdfviewer/demos/product-bundles/assets/pdf/viewer-edit-forms.pdf"); }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Form Editor</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="/documents-api-pdfviewer/demos/product-bundles/build/init.js"></script> <script src="./src/app.js"></script> </head> <body> <div id="viewer"></div> </body> </html>
#viewer { height: 100%; }