Examples

Open a PDF document in Viewer

Launch the default PDF Viewer UI and load a PDF document in a web browser with our default configuration. Get additional resources by visiting our [J…

Create PDF annotations programmatically

Programmatically create multiple annotation types to your PDF document. Some examples of programmatic annotations can include adding links, highlight…

Native PDF Text Selection Tools

PSPDFKit for Web comes with great platform-native PDF text selection which is especially useful when working with text-heavy documents like scientifi…

PDF Magazine Viewer

Create a PDF magazine viewer that supports text highlight, PDF bookmarks, page thumbnails, page zoom, keyboard navigation and full screen mode. Get a…

Access PDF Form Elements Programmatically

PSPDFKit supports all common PDF form field types defined by the PDF specification. Read, fill, and submit PDF Forms — either with the UI tools or di…

PDF Document Editor

Add, remove, duplicate, rotate or reorder pages in a PDF document. Combine multiple documents, split them up, or extract selected pages into a new fi…

Fast PDF Zooming and Panning

Quick zooming and panning of PDF pages, regardless of layout and vector image complexity. Get additional resources by visiting our guide about [Zoom …

Password-Protect PDF Documents

Lock and unlock PDF documents with a password, using industry-strength encryption protocols. Get additional resources by visiting our guide about [op…

Open a PDF in Read-Only Mode

By setting the correct permissions, you can run PSPDFKit for Web in read-only mode, preventing the user from editing or annotating a PDF document. Ge…

Custom PDF Overlay Elements

You can extend PDFs by placing your own custom elements on a page and render them with the help of PSPDFKit for Web. Get additional resources by vis…

Add Custom Tools and Actions to Annotations

Add a custom tool or action that is shown when an annotation is selected. Get additional resources by visiting our guide about [customizing the annot…

Custom Permissions for PDF Annotations

Set custom permissions for annotation types or specific annotations. Get additional resources by visiting our guide about [defining document collabor…

Add Watermarks to PDFs

Add custom content, like images, text, and logos, as watermarks to your PDF pages. Get additional resources by visiting our guide about [adding water…

Dark Mode PDF Viewer

PSPDFKit’s PDF Viewer can be switched into dark mode either programmatically or based on available device information. Get additional resources by vi…

Add a Drag and Drop UI to our Web UI

Add a custom view to the PSPDFKit for Web UI from which you can drag and drop image elements onto a document’s pages.

Customize Main PDF Toolbar

Pick from PSPDFKit’s existing tools and add your own custom tool in this PDF toolbar customization example. Get additional resources by visiting our …

Customized PDF Search

A quick example of changing the way searching inside a PDF works. The example only searches for complete words. For example; searching for \

Changing PDF Printing Mode

An example that changes the default printing mode (to `PSPDFKit.PrintMode.EXPORT_PDF`) as well as adding two buttons where each explicitly calls a sp…

Add Custom Elements to PDF Annotations

Use custom HTML to replace or enhance existing PDF annotations. In this example, we check the `formFieldName` value to decide whether an additional S…

Flipbook with Custom Pagination Effect

Add a page flip effect to let the user browse the PDF like a real magazine. Get additional resources by visiting [JavaScript PDF Viewer Library.](/gu…

Saving Electronic Signatures in Local Storage

Add electronic signatures to PDF and keep them across page refreshes by saving them in the browser’s local storage. Get additional resources by visit…

Hide/Reveal Area Annotations

Allows users to select areas to hide/reveal on a PDF page.

PDF Presentation Mode

Customize PSPDFKit for Web’s UI into a full-screen-capable presentation slide viewer. Get additional resources by visiting our guide about [customizi…

Drag and Drop PDF Form Designer

Add your own form widgets to a PDF and customize their attributes with a simple sidebar UI. Get additional resources by visiting [JavaScript PDF form…

Custom Annotation Style Inspector

A completely custom UI for working with annotation style attributes using an inline popup. Get additional resources by visiting our guide about [wor…

Adding Digital Signatures to PDFs

Digitally sign any PDF even if it doesn’t come with a visible signature form field. Get additional resources by visiting [JavaScript PDF signature li…

Instant PDF Comments

Collaborate on a PDF using Instant Comments.

Open, View & Annotate on Images

PSPDFKit for Web allows you to open and annotate images. Get additional resources by visiting our guide on how to [add annotations to images using ja…

Custom PDF Redaction UI

A custom sidebar UI to automate content redaction. Includes custom search options that only match specific data types and a preview function to see r…

PDF Collaboration Permissions

Enforce permissions based on JWT parameters.

Add Electronic Signature Image to PDF

Use our API to add image electronic signatures to PDFs.

Storing Electronic Signature in Browser

Add logic to store generated electronic signatures on the browser’s local storage. Get additional resources by visiting our guide on [saving and stor…

Customized Document Editor Toolbar Example

Customize the document editor toolbar and footer items with an easy-to-use API. Add custom items.

Title Description Languages
Open a PDF document in Viewer Launch the default PDF Viewer UI and load a PDF document in a web browser with our default configuration. Get additional resources by visiting our [J… JavaScript
Create PDF annotations programmatically Programmatically create multiple annotation types to your PDF document. Some examples of programmatic annotations can include adding links, highlight… JavaScript
Native PDF Text Selection Tools PSPDFKit for Web comes with great platform-native PDF text selection which is especially useful when working with text-heavy documents like scientifi… JavaScript
PDF Magazine Viewer Create a PDF magazine viewer that supports text highlight, PDF bookmarks, page thumbnails, page zoom, keyboard navigation and full screen mode. Get a… JavaScript
Access PDF Form Elements Programmatically PSPDFKit supports all common PDF form field types defined by the PDF specification. Read, fill, and submit PDF Forms — either with the UI tools or di… JavaScript
PDF Document Editor Add, remove, duplicate, rotate or reorder pages in a PDF document. Combine multiple documents, split them up, or extract selected pages into a new fi… JavaScript
Fast PDF Zooming and Panning Quick zooming and panning of PDF pages, regardless of layout and vector image complexity. Get additional resources by visiting our guide about [Zoom … JavaScript
Password-Protect PDF Documents Lock and unlock PDF documents with a password, using industry-strength encryption protocols. Get additional resources by visiting our guide about [op… JavaScript
Open a PDF in Read-Only Mode By setting the correct permissions, you can run PSPDFKit for Web in read-only mode, preventing the user from editing or annotating a PDF document. Ge… JavaScript
Custom PDF Overlay Elements You can extend PDFs by placing your own custom elements on a page and render them with the help of PSPDFKit for Web. Get additional resources by vis… JavaScript
Add Custom Tools and Actions to Annotations Add a custom tool or action that is shown when an annotation is selected. Get additional resources by visiting our guide about [customizing the annot… JavaScript
Custom Permissions for PDF Annotations Set custom permissions for annotation types or specific annotations. Get additional resources by visiting our guide about [defining document collabor… JavaScript
Add Watermarks to PDFs Add custom content, like images, text, and logos, as watermarks to your PDF pages. Get additional resources by visiting our guide about [adding water… JavaScript
Dark Mode PDF Viewer PSPDFKit’s PDF Viewer can be switched into dark mode either programmatically or based on available device information. Get additional resources by vi… JavaScript
Add a Drag and Drop UI to our Web UI Add a custom view to the PSPDFKit for Web UI from which you can drag and drop image elements onto a document’s pages. JavaScript
Customize Main PDF Toolbar Pick from PSPDFKit’s existing tools and add your own custom tool in this PDF toolbar customization example. Get additional resources by visiting our … JavaScript
Customized PDF Search A quick example of changing the way searching inside a PDF works. The example only searches for complete words. For example; searching for \ JavaScript
Changing PDF Printing Mode An example that changes the default printing mode (to `PSPDFKit.PrintMode.EXPORT_PDF`) as well as adding two buttons where each explicitly calls a sp… JavaScript
Add Custom Elements to PDF Annotations Use custom HTML to replace or enhance existing PDF annotations. In this example, we check the `formFieldName` value to decide whether an additional S… JavaScript
Flipbook with Custom Pagination Effect Add a page flip effect to let the user browse the PDF like a real magazine. Get additional resources by visiting [JavaScript PDF Viewer Library.](/gu… JavaScript
Saving Electronic Signatures in Local Storage Add electronic signatures to PDF and keep them across page refreshes by saving them in the browser’s local storage. Get additional resources by visit… JavaScript
Hide/Reveal Area Annotations Allows users to select areas to hide/reveal on a PDF page. JavaScript
PDF Presentation Mode Customize PSPDFKit for Web’s UI into a full-screen-capable presentation slide viewer. Get additional resources by visiting our guide about [customizi… JavaScript
Drag and Drop PDF Form Designer Add your own form widgets to a PDF and customize their attributes with a simple sidebar UI. Get additional resources by visiting [JavaScript PDF form… JavaScript
Custom Annotation Style Inspector A completely custom UI for working with annotation style attributes using an inline popup. Get additional resources by visiting our guide about [wor… JavaScript
Adding Digital Signatures to PDFs Digitally sign any PDF even if it doesn’t come with a visible signature form field. Get additional resources by visiting [JavaScript PDF signature li… JavaScript
Instant PDF Comments Collaborate on a PDF using Instant Comments. JavaScript
Open, View & Annotate on Images PSPDFKit for Web allows you to open and annotate images. Get additional resources by visiting our guide on how to [add annotations to images using ja… JavaScript
Custom PDF Redaction UI A custom sidebar UI to automate content redaction. Includes custom search options that only match specific data types and a preview function to see r… JavaScript
PDF Collaboration Permissions Enforce permissions based on JWT parameters. JavaScript
Add Electronic Signature Image to PDF Use our API to add image electronic signatures to PDFs. JavaScript
Storing Electronic Signature in Browser Add logic to store generated electronic signatures on the browser’s local storage. Get additional resources by visiting our guide on [saving and stor… JavaScript
Customized Document Editor Toolbar Example Customize the document editor toolbar and footer items with an easy-to-use API. Add custom items. JavaScript