Skip to main content
Participant
March 16, 2023
Question

Crash on iPhone on zoom

  • March 16, 2023
  • 0 replies
  • 339 views

I'm using the Embed SDK to display a pdf on a page using the IN_LINE embed mode. Everything works ok until I pinch to zoom on iPhone (Safari and Chrome) at which point the page crashes. I've tried hooking into the developer console, but I don't get any perceptible changes before the crash.

Steps to reproduce the behavior:

  1. Go to http://staugustinesvancouver.com/solids on an iPhone
  2. Pinch to zoom
  3. Observe crash

A clear and concise description of what you expected to happen.

  • no crash, just zoom

Smartphone (please complete the following information):

  • Device: iPhone 14 Pro Max
  • OS: iOS 16.3.1
  • Browser: Safari

Here's how the document load is triggered initially

 

<script type="text/javascript">
	document.addEventListener("adobe_dc_view_sdk.ready", function(){
	  switchDocument($('#dinnerMenu'));
	});
</script>

 

And the relevant Embed API code

 

 

function switchDocument(parentDiv){
  var adobeDCView = new AdobeDC.View({clientId: <ID>, divId: 'dinnerMenu'});
  adobeDCView.previewFile({
    content:{location: {url: parentDiv.data('pdf-path')}},
    metaData:{fileName: parentDiv.data('pdf-filename')}
  }, 
	{ 
		embedMode: "IN_LINE", defaultViewMode: "FIT_PAGE"
	});
};

 

This topic has been closed for replies.