Examples

Open a PDF Document in Our 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 in your PDF document. Examples of programmatic annotations include links, highlights, free text, in…

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 scientif…

PDF Magazine Viewer

Create a PDF magazine viewer that supports text highlight, PDF bookmarks, page thumbnails, page zoom, keyboard navigation, and fullscreen 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 d…

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 f…

Fast PDF Zooming and Panning

Implement quick zooming and panning of PDF pages, regardless of layout and vector image complexity. Get additional resources by visiting our guide ab…

Password-Protected PDF Documents

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

Open a PDF in Read-Only Mode

By setting the correct permissions, you can run PSPDFKit for Web in read-only mode, thereby preventing users from editing or annotating a PDF documen…

Custom PDF Overlay Elements

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

Add Custom Tools and Actions to Annotations

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

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 wat…

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 the 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

This is 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

This is an example that changes the default printing mode (to `PSPDFKit.PrintMode.EXPORT_PDF`), in addition to adding two buttons where each explicit…

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 users browse a PDF like a real magazine. Get additional resources by visiting our [JavaScript PDF viewer library](/guid…

Saving Electronic Signatures in Local Storage

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

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 fullscreen-capable presentation slide viewer. Get additional resources by visiting our guide about [customizin…

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 our [JavaScript PDF …

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 [work…

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 our [JavaScript PDF signatur…

Instant PDF Comments

Collaborate on a PDF using Instant Comments.

Open, View, and 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 …

PDF Collaboration Permissions

Enforce permissions based on JSON Web Token (JWT) parameters.

Add Electronic Signature Images to PDFs

Use our API to add electronic signature images to PDFs.

Storing Electronic Signatures in the Browser

Add logic to store generated electronic signatures in 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.

Title Description Languages
Open a PDF Document in Our 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 in your PDF document. Examples of programmatic annotations include links, highlights, free text, in… 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 scientif… JavaScript
PDF Magazine Viewer Create a PDF magazine viewer that supports text highlight, PDF bookmarks, page thumbnails, page zoom, keyboard navigation, and fullscreen 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 d… 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 f… JavaScript
Fast PDF Zooming and Panning Implement quick zooming and panning of PDF pages, regardless of layout and vector image complexity. Get additional resources by visiting our guide ab… JavaScript
Password-Protected PDF Documents Lock and unlock PDF documents with a password using industry-strength encryption protocols. Get additional resources by visiting our guide about JavaScript
Open a PDF in Read-Only Mode By setting the correct permissions, you can run PSPDFKit for Web in read-only mode, thereby preventing users from editing or annotating a PDF documen… JavaScript
Custom PDF Overlay Elements You can extend PDFs by placing your own custom elements on a page and rendering them with the help of PSPDFKit for Web. Get additional resources by v… JavaScript
Add Custom Tools and Actions to Annotations Add a custom tool or action that’s shown when an annotation is selected. Get additional resources by visiting our guide about [customizing the annota… 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 wat… 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 the 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 This is 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 This is an example that changes the default printing mode (to `PSPDFKit.PrintMode.EXPORT_PDF`), in addition to adding two buttons where each explicit… 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 users browse a PDF like a real magazine. Get additional resources by visiting our [JavaScript PDF viewer library](/guid… JavaScript
Saving Electronic Signatures in Local Storage Add electronic signatures to PDFs and keep them across page refreshes by saving them in the browser’s local storage. Get additional resources by visi… 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 fullscreen-capable presentation slide viewer. Get additional resources by visiting our guide about [customizin… 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 our [JavaScript PDF … 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 [work… 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 our [JavaScript PDF signatur… JavaScript
Instant PDF Comments Collaborate on a PDF using Instant Comments. JavaScript
Open, View, and 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 … JavaScript
PDF Collaboration Permissions Enforce permissions based on JSON Web Token (JWT) parameters. JavaScript
Add Electronic Signature Images to PDFs Use our API to add electronic signature images to PDFs. JavaScript
Storing Electronic Signatures in the Browser Add logic to store generated electronic signatures in 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. JavaScript