Created
November 5, 2017 17:50
-
-
Save koohq/e21ae34a2bd4fa445f98f571c3f22b0d to your computer and use it in GitHub Desktop.
A snippet to enable the PDF file preview by using 'filePreview.js'.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* sp-pdfpreview.js | |
* | |
* (c) 2017 koohq. Licensed under CC0. | |
* https://creativecommons.org/publicdomain/zero/1.0/legalcode | |
*/ | |
(function enablePDFPreview() { | |
ExecuteOrDelayUntilScriptLoaded(function() { | |
filePreviewManager.previewers.extensionToPreviewerMap.pdf = [embeddedWACPreview, WACImagePreview]; | |
embeddedWACPreview.dimensions.pdf = { width: 379, height: 252 }; | |
}, 'filePreview.js'); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment