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 JavaScript PDF Viewer Library or…

Create PDF annotations programmatically

Programmatically create multiple annotation types to your PDF document. Some examples of programmatic annotations can include adding links, highlights, free text, ink, or notes to…

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 scientific papers. Get additional resou…

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 additional resources by visitin…

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 directly by calling the PDF Form…

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 file. Get additional resources b…

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 options in our JavaScript PDF V…

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 opening password-protected PDFs i…

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. Get additional resources by visi…

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 visiting our guide about customiz…

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 annotation inspector in our viewer.

Custom Permissions for PDF Annotations

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

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 watermarks to PDFs using 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 visiting our guide about enablin…

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 guide about creating a new too…

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 ‘the’ will not return ‘them’ or ‘these’ …

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 specific printing mode. Get additi…

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 SVG image should be drawn next to…

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.

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 visiting JavaScript PDF Signature L…

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 customizing the presentation mode in our…

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 library or by visiting our gui…

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 working with annotations.

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 library or by visiting our guide …

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 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 redaction results before the re…

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 storing electronic signatures in ou…

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 JavaScript PDF Viewer Library or… JavaScript
Create PDF annotations programmatically Programmatically create multiple annotation types to your PDF document. Some examples of programmatic annotations can include adding links, highlights, free text, ink, or notes to… 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 scientific papers. Get additional resou… 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 additional resources by visitin… 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 directly by calling the PDF Form… 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 file. Get additional resources b… 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 options in our JavaScript PDF V… 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 opening password-protected PDFs i… 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. Get additional resources by visi… 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 visiting our guide about customiz… 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 annotation inspector in our viewer. 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 collaboration permissions. 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 watermarks to PDFs using JavaScript. 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 visiting our guide about enablin… 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 guide about creating a new too… 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 ‘the’ will not return ‘them’ or ‘these’ … 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 specific printing mode. Get additi… 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 SVG image should be drawn next to… 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. 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 visiting JavaScript PDF Signature L… 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 customizing the presentation mode in our… 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 library or by visiting our gui… 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 working with annotations. 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 library or by visiting our guide … 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 javascript. 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 redaction results before the re… 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 storing electronic signatures in ou… JavaScript
Customized Document Editor Toolbar Example Customize the document editor toolbar and footer items with an easy-to-use API. Add custom items. JavaScript

We use cookies to improve your experience and for marketing. Learn more in our privacy policy.