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

Adobe pdf embed api lightbox not working in mobile browsers

Community Beginner ,
Oct 22, 2022 Oct 22, 2022

Copy link to clipboard

Copied

Code

<script src="https://documentservices.adobe.com/view-sdk/viewer.js"></script>
<script type="text/javascript">
  document.addEventListener("adobe_dc_view_sdk.ready", function () {
    document.getElementById("CV").addEventListener("click", function () {
      var adobeDCView = new AdobeDC.View({
        clientId: "203e1bacaee04c58b0e7c0ffeddfb6e7",
      });
      adobeDCView.previewFile(
        {
          content: {
            location: {
              url: "https://dhanurjan.ga/wp-content/uploads/2022/10/Dhanurjan-CV.pdf",
            },
          },
          metaData: { fileName: "Dhanurjan-CV.pdf" },
        },
        { embedMode: "LIGHT_BOX" }
      );
    });
  });
</script>

I have a button with ID = CV.

When I click it pdf opens. But it not working in mobile browsers.

Website URL: dhanurjan.ga

Views

517

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

correct answers 1 Correct answer

Community Beginner , Oct 23, 2022 Oct 23, 2022

Turned off minify JavaScript option in the wp-rocket cache plugin. After that everything works fine.

Votes

Translate

Translate
Community Beginner ,
Oct 22, 2022 Oct 22, 2022

Copy link to clipboard

Copied

Getting this error only in mobile view.

Screenshot 2022-10-23 013856.png

 

 

 

Votes

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
Community Beginner ,
Oct 23, 2022 Oct 23, 2022

Copy link to clipboard

Copied

LATEST

Turned off minify JavaScript option in the wp-rocket cache plugin. After that everything works fine.

Votes

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
Resources