A SF Lightning Web Component for rendering & viewing PDF files in Salesforce. It uses Pdf.js library Salesforce Lightning Web Component LWC.
- PDF rendering with Mozilla's PDF.js library
- Works with files attached to Salesforce records
- Responsive design for different screen sizes
pdfjsviewer
- Main component for viewing PDFsPdfViewerController
- Apex controller for retrieving PDF content
- Deploy the components to your Salesforce org
- Upload the PDF.js library as a static resource named "pdfjs"
- Add the component to record pages that have PDF attachments
- Uses PDF.js v3.11.174. This is the last version of PDF.js that was built using the UMC javascript standard. Subsequent versions of PDF.js have been built using the ES6 standard.
- Handles base64 encoding/decoding for PDF content