Code examples provide an easy way for you to view customization options within PrizmDoc. View and edit code examples and then click 'apply changes' to update the display. To experience the full range of PrizmDoc tools and functionality, download a free trial.

Start your 30-day free trial

user/layer management

Use advanced Annotation Layers features to manage user access to individual layers.

view on GitHub
using mousehover events to implement tool tips

Create custom tooltips for mark objects by using MouseHover events.

view the example
Includes: CSS/JS
cloud-hosted viewer

Get started quickly by downloading sample code to embed in your site or web application. These samples don't require server installation and will connect you directly our PrizmDoc cloud-hosted servers.

view PHP sample on GitHub
view C# sample on GitHub
view JS sample on GitHub
store annotations in a database

It’s easy to integrate annotations and redactions with your database by serializing them individually.

view PHP sample on GitHub
view C# sample on GitHub
configure the viewer’s ui

The viewer's UI can be configured when it is created, by setting properties of the options argument.

view the example
Includes: JS
annotate with the api

The example changes the UI of the viewer so that there are two buttons, clicking one calls the method to add the "Approved" stamp and the other to add the "Rejected" stamp.

view the example
Includes: JS/HTML
basic embedding of the viewer

To embed the viewer on a page, all that is required are a few short lines of JavaScript, a CSS class, and a DIV in your page. The viewer is delivered as a jQuery plugin, so the JavaScript to embed the viewer is simple and familiar.

view the example
printing custom paper sizes

This code example demonstrates adding A4 page size into printing options. With this technique, you can provide support to any page size desired.

view the example
Includes: HTML
chrome-less viewer

Embed the viewer without any chrome (tab, panels, dialogs, etc.)

view the example
Includes: CSS/JS/HTML
custom controls

You add your own controls (buttons, tabs, panels, etc) outside the viewer and use these to control the viewer.

view the example
Includes: HTML/JS/CSS
custom style

Customize the look and feel of the viewer by modifying the stylesheet.

view the example
Includes: CSS
custom thumbnails

Embed the thumbnail control outside of the viewer and use it to navigate pages within your document.

view the example
Includes: CSS/JS/HTML
digital rights management

Enable Digital Rights Management (DRM) when embedding the viewer. The viewer configuration parameters can be used to disable text selection and copy, printing, and document download.

view the example
Includes: JS
localization

Localize the viewer by modifying the language.json file. This instance of the language.json file has been translated to German.

view the example
Includes: JSON
subscribe to events

This example demonstrates using the viewer's API to subscribe to all of the viewer's events. A library "tiny.toast" is used to display notifications of the events on the screen.

view the example
Includes: JS/HTML
vertical menus

Change the position of the tab panes by modifying the markup located in viewerTemplate.html.

view the example
Includes: HTML