• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

defaultViewMode does not work correctly in mobile browsers

New Here ,
Nov 25, 2022 Nov 25, 2022

Copy link to clipboard

Copied

I have a problem with the defaultViewMode in the modern viewer on mobile.
The page is not rendered correctly with either FIT_PAGE

Bildschirmfoto am 2022-11-25 um 11.42.51.png

or FIT_WITH option.

Bildschirmfoto am 2022-11-25 um 11.43.47.png

 

Both options work correctly in legacy viewer:

Bildschirmfoto am 2022-11-25 um 11.44.17.png

This is my sample:

    <div id="adobe-dc-view"></div>
    <script type="text/javascript">
        var urlParams = new URLSearchParams(window.location.search);
        document.addEventListener("adobe_dc_view_sdk.ready", function () {
            var adobeDCView = new AdobeDC.View({ 
		clientId: "", 
		divId: "adobe-dc-view", 
		locale: "de-DE" });
            adobeDCView.previewFile({
              content: { location: { url: urlParams.get('file') } },
              metaData: { fileName: "test" }
            },{ 
		embedMode: "FULL_WINDOW", 
		defaultViewMode: "FIT_PAGE"
	     });
        });

 

TOPICS
PDF Embed API

Views

50

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources