Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
Do you have this online where we can see?