Salesforce Image Viewer Lightning Web Component

PSPDFKit for Salesforce is an image viewer library built in JavaScript that can be deployed in a Lightning web component (LWC) to directly render JPEG, PNG, and TIFF files in any modern browser or on any mobile device without any plugins. It offers developers a way to quickly embed a highly configurable image or document viewer with a beautiful UI in any Salesforce application.

Launch Demo

Key Capabilities

  • Open and view — Directly in Salesforce from a web browser

  • Customizable UI — Hide or add buttons, and match your look and feel

  • Client-side — Workload is offloaded to client (no server needed)

  • Images and documents — Open PDF, Word, Excel, PowerPoint, TIFF, PNG, and JPG

  • Responsive — Mobile-friendly UI auto-adjusts to all screen sizes

  • Accessible — Built-in assistive technology-friendly features

  • Browser support — Works on all modern browsers and devices

  • Extendable — Add annotation, editing, forms, and more

Image File Type Support

  • TIFF, TIF (including multipage)

  • PNG


PSPDFKit for Web also supports PDF, PDF/A (1, 2, 3, 4), Word, Excel, and PowerPoint.

Loading Image Documents

When calling PSPDFKit#load() and passing a blob, array buffer, or URL to the image into the document option, PSPDFKit for Web will open the image file as if it were a PDF document:

  document: image

For more information on loading options, follow our guides on importing a PDF document.

Exporting Image Documents

Image documents can be exported as PDF documents by using Instance#exportPDF() and triggering a download, as explained in the save a document to local storage guide.