Skip to main content
Participating Frequently
June 22, 2020
Question

Challenges with View SDK

  • June 22, 2020
  • 2 replies
  • 2242 views

Hi folks, was happy to find this capability this morning.  I was set up in a few minutes, and at first glance everything worked fine.

 

Until:

  1. I tried to embed two PDFs on the same page.  I'm using a SIZED_CONTAINER and want to be able to have more than one PDF previewed on a page.  This doesn't seem to work, unless I'm missing something?
  2. I tried to use it on mobile.  The size of the box is fine, but when I go full-screen (iOS.latest) something odd happens.  The 250x250 box that was previewing doesn't change size.  The content behind it does.  So, I'm stuck viewing full-screen content within a 250x250 window.

 

Appreciate a little help on what I'm doing wrong.  These things seem like they should be doable.  Thanks!

This topic has been closed for replies.

2 replies

ALB13Author
Participating Frequently
July 2, 2020

Here's a video example of the full-screen issue I'm having on mobile (item #2 above).  Works fine on desktop.

https://www.dropbox.com/s/ove29ittyw6s8li/video%20jul%2002%2C%208%2013%2007%20am.mp4?dl=0

 

As you can see it works fine with the 250px square.  But when you full-screen it does odd things.  And, no way to get out of full screen mode.

 

Appreciate some guidance here.

Adobe Employee
July 7, 2020
 

Thanks for sharing the video, unfortunatley we are not able to replicate the issue #2 with the details shared. It would be really great if you can share the hosted html(or the complete html content) so that we can debug it further 

ALB13Author
Participating Frequently
July 7, 2020

Hey SurenP, thanks for the note.

 

Some updates to what I'm seeing:

  • Chrome web - works great.
  • Chrome on iOS - works fine, minus that I can't seem to exit out of full-screen mode.
  • Safari web + iOS - Strange behavior, similar to what is shown in video.

 

Here's where you can see it in action:

https://platform.sandiegovp.com/version-test/adobe

 

THANKS for the help!

Joel Geraci
Community Expert
Community Expert
June 22, 2020

Please share your code

ALB13Author
Participating Frequently
June 22, 2020

Hi Joel, it's a cut/paste from the custom embed configuration.

 

<div id="adobe-dc-view" style="height: 250px; width: 250px;"></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: "<<ID>>", divId: "adobe-dc-view"});
		adobeDCView.previewFile({
			content:{location: {url: "<<URL>>"}},
			metaData:{fileName: "<<NAME>>"}
		}, {embedMode: "SIZED_CONTAINER", showDownloadPDF: false, showPrintPDF: false});
	});
</script>

 

Joel Geraci
Community Expert
Community Expert
June 23, 2020

I suspected as much. You need to have two different <div> IDs and two different variable names for the AdobeDC.View objects in order to display two Views in the same HTML page.