Skip to main content
Participant
October 2, 2021
Question

PDF embed sizing is very thin horizontal sliver across page

  • October 2, 2021
  • 1 reply
  • 1107 views

Hi there - PDF embed is working overall but sizing is a problem. Anyone have a fix for the attached? I'm not modifying the generated code at all except for updating the file link. Thank you in advance!

    This topic has been closed for replies.

    1 reply

    Ben Vanderberg
    Community Manager
    Community Manager
    October 3, 2021

    Likely related to the CSS of your parent tag or your adobe-dc-view tag. I have seen this with frameworks like Bootstrap. The viewer will inherit the height of the parent tag. You can solve this by either creating a div around the adobe-dc-view that has a certain height or you can set a height to the adobe-dc-view directly.

    hsy1234Author
    Participant
    October 3, 2021

    Ben thank you so much for the response. Would you be able to tell me how to add that to the autogenerated code below? Thank you again.

     
    <div id="adobe-dc-view" class="ViewSDK_parentRelativeHeight ViewSDK_hideOverflow" style="height: 620px;"></div>
    <script type="text/javascript">
    document.addEventListener("adobe_dc_view_sdk.ready", function(){ 
    var adobeDCView = new AdobeDC.View({clientId: "dd4430ed32324b81deec22344b20940223484df", divId: "adobe-dc-view"});
    adobeDCView.previewFile({
    content:{location: {url: "xxxxxxxxxxxx.pdf"}},
    metaData:{fileName: "Bodea Brochure.pdf"}
    }, {});
    });
    </script>