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

PDF Embed API pageControl issue

Adobe Employee ,
Jun 16, 2022 Jun 16, 2022

I am using the PDF Embed API to add a PDF viewer to my popup dialog box.

For some reason, the pageControl doesn't scroll the page when I click up/down button. So, I tried hiding the pageControl using the following configuration, but it doesn't seem to work

 const viewerConfig = {
        showPageControls: false,
        embedMode: "IN_LINE"
    };

 below is my code snippet

var mainScript  = document.createElement("script");
mainScript.setAttribute('src', 'https://documentcloud.adobe.com/view-sdk/main.js' );

var pdfviewerScript =  document.createElement("script");
pdfviewerScript.setAttribute('src','pdfviewer.js');

dialog.content.appendChild(mainScript);
dialog.content.appendChild(pdfviewerScript);
dialog.show();

 pdfviewer.js

(function (document, $){
    const viewerConfig = {
        showPageControls: false,
        embedMode: "IN_LINE"
    };

    document.addEventListener("adobe_dc_view_sdk.ready", function()
    {
        var filePath = document.getElementById("pdf-timeline-script").getAttribute("filepath");
        var adobeDCView = new AdobeDC.View({clientId: <ClientID>, divId: "pdf-timeline-preview"});
        adobeDCView.previewFile(
            {
                content:   {location: {url: filePath}},
                metaData: {fileName: "fileName"}
            }, viewerConfig);
    });
})(document, $)

 How can I resolve the pageControl scroll issue or hiding it? Thanks!

TOPICS
PDF Embed API
264
Translate
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
Adobe Employee ,
Jun 20, 2022 Jun 20, 2022
LATEST

Do you have this online where we can see?

Translate
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