Copy link to clipboard
Copied
Hi!
We're trying to put a magazine online and have it working, sort of, using the api and setting it up using the sized container. However, when you click on th icon to show the document it in full screen view, it loads for like a nanosecond then returns to the usual view. Have I missed something or what am I doing wrong?
The code used is (credentials removed):
<div id="adobe-dc-view" style="height: 1275px; width: 900px;"></div>
<script src="https://documentservices.adobe.com/view-sdk/viewer.js"></script>
<script type="text/javascript">
document.addEventListener("adobe_dc_view_sdk.ready", function()
{
var adobeDCView = new AdobeDC.View({clientId: "XXXXX", divId: "adobe-dc-view", locale: "da-DK"});
adobeDCView.previewFile(
{
content: {location: {url: "/wp-content/uploads/2023/02/Ide-Politik-2023_1_email.pdf"}},
metaData: {fileName: "Idé Politik 01-2023"}
}, {embedMode: "SIZED_CONTAINER"});
});
</script>
I also tried using the In-Line view to test how that would work, but using that the page is rendered then immediately clears only to render again to the disapper for good. Don't know if those issues are related.
The page can be viewed at: https://www.kd.dk/medlemsbladet/
Copy link to clipboard
Copied
Apparently this was a conflict between Divi, on Wordpress, and the API. Made a barebone webpage on the same server and it worked.