PDF preview

Appframe supports PDF preview for many file types. It uses browser built in PDF viewer to display file. Non PDF files are converted to PDF. It is converting to PDF only first time when previewing. To use this feature you may use data-upload markup or you can generate a link to use it as an IFRAME or have your own link. 

URL: "/api/view-pdf/{ArticleID}/"DataObjectID/{PrimKey}/{FileName}

You might need to use replaceFileNameSpecialChars(FileName) function to remove special symbols which might not be allowed in URL.

    /* function could look like this*/
    function replaceFileNameSpecialChars(pFileName){
        var vFileName = pFileName.replace(/#/g,"").replace(/%/g,"");
        return encodeURI(vFileName);
If file is downloaded instead of using preview, check your browser settings.

Related articles