How Do I Correctly Set defaultViewMode to FIT_WIDTH in View SDK?
I have read all of the basic instructions for the View SDK, and I am trying to set my pdf viewer to open documents with the "FIT_WIDTH" defaultViewMode. I have tried various placements for the setting, and I suspect my syntax is just not correct. Here is my code:
<div id="adobe-dc-view" style="width:60%;height:600px;padding-top:50px"></div>
<script src="https://documentcloud.adobe.com/view-sdk/main.js"></script>
<script type="text/javascript">
document.addEventListener("adobe_dc_view_sdk.ready", function(){
var adobeDCView = new AdobeDC.View({clientId: "06179511ab964c9284f1b0887eca1b46", divId: "adobe-dc-view"});
adobeDCView.previewFile({
content:{location: {url: "https://www.shcsfarmington.org/Newsletter_050420.pdf"}},
metaData:{fileName: "Newsletter_050420.pdf"}
}, {embedMode: "SIZED_CONTAINER", defaultViewMode: "FIT_WIDTH"});
});
</script>This is my best guess as to the placement and syntax, but it is not working - as you can see at this web page here: https://www.shcsfarmington.org/pdf-view.html
This is the last hurdle, I believe, in order to get the Adobe viewer embedded the way I would like, so I appreciate any help to accomplish this. Thanks.
