Skip to main content
Participant
November 29, 2023
Question

PDF not displayed when using Reapers WebRC

  • November 29, 2023
  • 1 reply
  • 1097 views

Hi,

 

I want to display a pdf using the WebRemoteControl of Reaper.

 

Inside Reaper I have to start the webserver, than I can access the site via 192.168.x.y:8080

When put the adobe api into the html file, I can select a pdf file and it loads, but after one second the whole reader dissapears.

When I open the html file directly (open via the browsers open-dialog, not ip+port), it works fine.

This happen with different browsers (Firefox, Edge, Chrome) on Windows 10, 64 bit

 

Can anyone help me how to get this fixed?

Is it a problem of the Reaper-WebRC, or of adobe api

 

Below you find a minimal example of the used html-code.

 

Thanks a lot for any help

 

<!doctype html>
<html>
<head>

<script src="main.js"></script>
<script src="index.js"></script>

<script type="text/javascript">

function wwr_onreply(results) {

    var ar = results.split("\n"); 

    for (var i=0; i < ar.length ; i++) {

    var tok = ar[i].split("\t");      
        if (tok.length > 0)         
            switch (tok[0]) {
                case "MARKER":
                document.getElementById("marker").innerHTML = tok;                
                break;
        }    
    }         
}
        
wwr_req_recur("MARKER",1000);
wwr_start();

</script>
</head>

<body onload="listenForFileUpload()" style="margin: 0px">
    <div id="adobe-dc-view">
        <div style="margin: 50px;">
            <label for="file-picker">Choose a PDF File:</label>
            <input type="file" id="file-picker" name="file-picker" accept="application/pdf">
        </div>
    </div>
    <script type="text/javascript" src="https://acrobatservices.adobe.com/view-sdk/viewer.js"></script>
</body>

</html>

 

    This topic has been closed for replies.

    1 reply

    Raymond Camden
    Community Manager
    Community Manager
    December 4, 2023

    I've recently seen an issue where the "invalid client id" error is not being shown, and I bet that's what you are seeing there. Have you created a client id that matches the domain hosting the web page?

    Participant
    December 13, 2023

    Hi,

    yes, I tried that, but with no result. I created the credentials, copied the Client-ID and replaced Client-ID in

    var adobeDCView = new AdobeDC.View({clientId: "<YOUR_CLIENT_ID>", divId: "adobe-dc-view"});

     

    Apart from that I am wondering if adobe embed pdf api works for my project. It seems it is made for installation on single server. In my case, the server is run inside Reaper on a localhost on each individual machine, where users download and install it.

    So is it possible to get rid of these credentials? Or to set it to localhost, so it works with any machine it is installed on without any further configuration?

    Raymond Camden
    Community Manager
    Community Manager
    December 13, 2023

    When you put in the client id, did you remove < and >? I've seen some people forget to do that. 

     

    You can't get rid of credentials unfortunately. If your system will always use localhost, you CAN make a key for localhost though.