When using Microsoft Internet Explorer or Edge, PDFs embedded as an iframe may not be displayed. 

This is a known issue with these web browsers and not related to PDFreactor in particular.


More information about this security restriction can be found on Microsoft Developer Network here:

"For security reasons, data URIs are restricted to downloaded resources. Data URIs cannot be used for navigation, for scripting, or to populate frame or iframe elements."


The JavaScript integration example we provide on our website can be changed in the following way in order to be used with Internet Explorer or Edge. This will save the PDF as a blob instead of embedding it into an iframe:


<!DOCTYPE html>
<html>
    <head>
        <!-- You can download the PDFreactor Web Service JavaScript client from: 
            http://www.pdfreactor.com/download/get/?product=pdfreactor&type=webservice_clients&jre=false -->
        <script src="PDFreactor.js"></script>
        <script>
        window.onload = function() {                
            
            // Create new PDFreactor instance                
            var pdfReactor = new PDFreactor("https://cloud.pdfreactor.com/service/rest");                
            // Create a new PDFreactor configuration object                
            var config = {                    
            // Specify the input document                    
                document: "http://www.pdfreactor.com/product/samples/textbook/textbook.html",
            }
            
            pdfReactor.convert(config).then(function(result) {                    
                // do something with the result, e.g. set it as the src of an IFRAME to display the PDF in the same page  
                
                // if Internet Explorer or Edge is used, save the converted PDF as blob
                if (window.navigator && window.navigator.msSaveOrOpenBlob) {
                    var byteCharacters = atob(result.document);
                    var byteNumbers = new Array(byteCharacters.length);
                    for (var i = 0; i < byteCharacters.length; i++) {
                        byteNumbers[i] = byteCharacters.charCodeAt(i);
                    }
                    var byteArray = new Uint8Array(byteNumbers);
                    var blob = new Blob([byteArray], {
                        type: 'application/pdf'
                    });
                    window.navigator.msSaveOrOpenBlob(blob, "output.pdf");
                // for all other web browsers, display the converted PDF as iframe
                } else { 
                    document.getElementById("result").src = "data:application/pdf;base64," + result.document; 
                }                     
            }).catch(function(error) {                    
                document.body.innerHTML = "<h1>An Error Has Occurred</h1><h2>" + error + "</h2>";
            });
        }
        </script>
    </head>
    <body>
        <iframe id="result" style="width: 100%; height: 95vh"></iframe>
    </body>
</html>