Knowledge base
Explore our Awesome Nutrient GitHub repository(opens in a new tab) for a wide variety of sample projects, code snippets, and videos.
While our knowledge base provides quick solutions to common customization questions, the GitHub repository(opens in a new tab) offers even more examples, with new content continuously being added.
Annotations
- Add comment annotations programmatically
- Change the default line width for ink annotations
- Create text highlight annotations from text extraction
- Creating link annotations with text
- Delete all annotations
- Disable resizing of annotations
- Disable the movement of text annotations but allow editing the text
- Export an ink annotation as an image
- Get the visible annotations on the current page
- Implement an automatic annotation and field tab ordering
- Persist the currently edited note annotation text
- Prevent editing the content of a text annotation
- Render an annotation’s properties as a tooltip
- Rotate an ink annotation
- Showing the focus ring around read-only annotations
- Zoom to a specific annotation when a PDF loads
Document handling
- Check if a document contains annotations
- Check if a document is password protected
- Download an exported document
- Get the entered document password
- How do I limit the number of annotations in a PDF?
- How to load multiple files in a single viewer instance
- Load a PDF as an array buffer
- Load a PDF from a stream
- Load a minimal PDF stub from a string
- Manual Instant sync
- Process the currently rendered pages
- Render a document at full height
- Render a document in night mode
- Render a page in black and white
- Render a page to an image without annotations
- Render the visible area of the current page
- Restore the last seen page when reopening a document
- Save a modified PDF to Document Engine
Events and listeners
- Add a listener to a default toolbar item
- Add a listener while editing a text or note annotation
- Detecting when the Nutrient UI has loaded in the Web SDK
- Handling clicks on custom overlays
- Listen to an annotation’s hover event
- Observe Document Editor visibility
Forms
Navigation and display
- Customize the page indicator
- Determine the current layout mode
- Deselect the current text selection
- Focus on a widget annotation
- Focus on the PDF viewer when it loads
- How can I create a bookmark from an outline element?
- How do I disable changing the page when tapping the page edges?
- How do I rotate a page?
- How do I zoom to a specific value?
- How to add a custom toolbar item to display current zoom percentage
- Programmatically navigate to a page
Printing and exporting
- Add a watermark only when printing
- How do I prevent printing annotations?
- Prevent printing with Control-P
- Print output appears blurry compared to exported version
Search and text extraction
- Extract text from annotations and retrieve the current cursor position in the text
- Highlight custom search results
- How do I highlight text without an annotation?
Signatures
- Add signature initials
- Find an ink annotation for a signature form field
- Persist ink signatures across instances
- Submit ink signatures with a form
Styling and customization
- Control the appearance of the delete button with CSS
- Focus the delete button in a confirm dialog
- How do I resize a multiline text form field in height when it’s overflown?
- How do I toggle between themes?
- How to default to using a cloudy border
- Optimize Nutrient size for web applications
- Override the ink signature dialog
- Override the user agent
User interaction
- Add custom keyboard shortcuts
- Disable the context menu in Nutrient
- Wait for a specific element to appear