PDF Generation Template Editor
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
You can add annotation tool in the Web PDF Viewer. The following code shows you how to add annotation tools:
// You can get all tools and set the tool you want.
const toolNames = Object.keys(documentViewer.getToolModeMap());
const inkTool = new Tools.FreeHandCreateTool(documentViewer);
inkTool.setStyles({
...documentViewer.getTool(Tools.ToolNames.FREEHAND).defaults,
StrokeThickness: 5
});
instance.UI.registerTool({
toolName: 'ink1',
toolObject: inkTool
});
instance.UI.setToolMode('ink1');