Skip to main content
Participant
Oct 2, 2021 1:48 AM UTC
Question

PDF embed sizing is very thin horizontal sliver across page

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 is closed to new replies. Start a new post to keep the conversation going.

    3 replies

    Ben Vanderberg
    Community Manager
    Community Manager
    Oct 3, 2021 2:49 AM UTC

    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.

    Translate
    hsy1234Author
    Participant
    Oct 3, 2021 2:58 AM UTC

    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>
    Translate