Copy link to clipboard
Copied
Can anyone help me how to use PDF Embed API on my WIX site (step by step) ?
Can I use it with an IFRAME ?
Best regards
Claudio
Copy link to clipboard
Copied
You can't use it in an iframe. You need to write JavaScript in order to add the embed. If WIX lets you add custom JS, then you should bve good to go.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
If you can tell me if WIX has a free tier, I can sign up and build a demo - but it would take a few days to find time for it. Also, did anything in my response make sense to you as you didn't comment on it.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Ah cool, glad to help!
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I'm sorry, what? Your last message seemed to imply that WIX let you add custom JS to a page, so I thought the matter was done. If not, can you please re-explain what you are asking?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
That wasn't clear by your response - sorry about that. I can sign up for a WIX account, but before I do, can you tell me what you tried? You did discover that WIX lets you add custom JS. Did you try adding our code? Do you have a URL we can hit?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Ok - I can attempt to make a demo of this, but it may take a while as I've got some other things on my plate, and the holidays coming up. I'll post back when I get this working.
Copy link to clipboard
Copied
Ok, I just tried this and I got it work.
In a page, I added an HTML element. I then literally copied our sample code and it worked - to the point of saying the application domain was invalid, which is expected. Our sample code has a fake ID.
I went to the Adobe console and made a new project. For the domain, I used: htmlcomponentservice.com. This is apparently what WIX uses for HTML embed. It may be different in production. Anyway, I got my key, updated the HTML embed, and it worked.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
In theory - sure. It just depends on how you're doing it.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I put our sample code as seen below.
<div id="adobe-dc-view" style="height: 360px; width: 500px;"></div>
<script src="https://documentcloud.adobe.com/view-sdk/main.js"></script>
<script type="text/javascript">
document.addEventListener("adobe_dc_view_sdk.ready", function(){
var adobeDCView = new AdobeDC.View({clientId: "<YOUR_CLIENT_ID>", divId: "adobe-dc-view"});
adobeDCView.previewFile({
content:{ location:
{ url: "https://documentcloud.adobe.com/view-sdk-demo/PDFs/Bodea%20Brochure.pdf"}},
metaData:{fileName: "Bodea Brochure.pdf"}
},
{
embedMode: "SIZED_CONTAINER"
});
});
</script>
The only change was to use a real id.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
That I cannot help you with. The JavaScript for that is rather simple. But to do it in WIX - I honestly don't know how it would need to be setup.
Copy link to clipboard
Copied
I was able to to pass my url to the html frame and it work well, but only in preview mode.
In live mode (changing url, client ID, ecc. correclty) the html frame does not show any pdf.
Only if the pdf not exists the html frame shows an error message .
Perhaps this is a Wix limitation ? I bought my site, it is not free version ...
Copy link to clipboard
Copied
Can you share the URL? Maybe I can see something.
Copy link to clipboard
Copied
this is coming quite late, but for those with the issue now, use filesusr.com as the domain. It won't work in preview, but it'll work in published.
Copy link to clipboard
Copied
It does not work for me in live mode, only in preview mode.
Any indeas ?
Regards
Copy link to clipboard
Copied
You tried using fileusr.com as the app domain for the credentials?
Copy link to clipboard
Copied