Using PDFNetJS to View and Edit PDFs Inside a Salesforce App

Skip to first unread message


Jul 7, 2017, 7:18:34 PM7/7/17
to PDFTron WebViewer
At PDFTron, we have a number of clients developing Salesforce apps.  Salesforce provides a full-featured app framework that enables development of web-based apps that build on the wealth of information stored in Salesforce databases.

But a number of our clients have mentioned one roadblock they have trouble overcoming --- displaying and editing PDF documents within their Salesforce apps.  While Salesforce includes a few PDF offerings, our clients have found that existing approaches quite problematic.  (It seems that one can either create a "hybrid" Salesforce app, which is considered insecure; or one can host a PDF viewer in an external environment.  It seems neither approach is optimal.)

Working with those clients, we've been able to create a Salesforce-specific build of PDFNetJS.  For reference --- PDFNetJS is our pure JavaScript PDF viewing and editing toolkit.  PDFNetJS runs entirely inside the modern desktop browser.  You can find out more at the following:

Our Salesforce-specific build of PDFNetJS is crafted to work around issues hosting libraries with Salesforce.  The end result is that you can open, view, edit, and save PDF documents entirely within your Salesforce app.  And since PDFNetJS uses PDFNet's high-quality rendering, you can display PDFs in all browsers consistently and correctly.  (See for more about the dangers of relying on browsers to render PDFs.)

We've posted a developer preview of the Salesforce-ready build of PDFNetJS, downloadable from the following:

We're eager to hear any feedback, good or bad, from Salesforce developers.  So please give it a try and let us know what you think.  Thanks!

Gabe Wonders

Feb 6, 2018, 4:16:39 PM2/6/18
to PDFTron WebViewer
This sounds like exactly what I am looking for within Salesforce. Does PDFNetJS allow you to save the modified PDF directly back into Salesforce?

Matt Parizeau

Feb 7, 2018, 1:31:50 PM2/7/18
to PDFTron WebViewer
See here for how you can get the PDF file data as a blob from WebViewer:

Then you should be able to use this Salesforce API with the blob data:

Matt Parizeau
Software Developer
PDFTron Systems Inc.
Reply all
Reply to author
0 new messages