Copy link to clipboard
Copied
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>
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Yes, I removed the <>.
And it's still the same:
When I open the html directly (File->Open->Index.html) everything works fine, no matter if an individual client-id is specified or not.
When I start the server (by starting Reaper) and accessing index.html via '<local-ip>:8080' the viewer disappears as soon a pdf-file is loaded, no which client-id is set.
Copy link to clipboard
Copied
If local-ip is dynamic, then no, PDF Embed will not work for you. If you can use 127.0.01, then you would be ok... mostly sure on that. Actually no, we ask for domain names, not IPs. Can you use a local HOSTS file to map something to the IP?