You need to sign in to do that
Don't have an account?
Sascha Deinert
PDF File preview
Hi,
in Salesforce lightning in files or Notes/Attachments of a contact or account you can see a preview of the first page from a stored pdf.
How is that possible?
Here is the code which I extract from the page.
Screenshot:
Thanks,
Sascha
in Salesforce lightning in files or Notes/Attachments of a contact or account you can see a preview of the first page from a stored pdf.
How is that possible?
Here is the code which I extract from the page.
<img src="https://DOMAIN.content.force.com/sfc/servlet.shepherd/version/renditionDownload?rendition=THUMB120BY90&versionId=0688E00000091mE&operationContext=CHATTER&contentId=05T8E0000009v54" class="thumbnailImg medium" alt="PDF">
Screenshot:
Thanks,
Sascha
Behind the scenes lightning framework does this work while uploading the file, some code creates a thumbnail while uploading the file which can be done using some javascript.
There are multiple javascript & jquery plugin available to perform such operations. I cannot say that which plugin or code is used by lightning behind the scenes but this is possible using scripting.
Here is a jQuery plugin for an example (http://www.phpgang.com/how-to-show-image-thumbnail-before-upload-with-jquery_573.html)
Hope you find this helpful.