Skip to main content
Participant
Oct 1, 2022 12:16 PM UTC
Question

PDF Embed Api height

Hello guys.

 

I have a little problem with height of embed PDF. I mean the section of document is low, like on this image: 

 

 

Could You help me and explain what's wrong with the code, which i inserted by "my own HTML" block on my wordpress site?

 

<title>Adobe Document Services PDF Embed API Sample</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta id="viewport" name="viewport" content="width=device-width, initial-scale=1">


<div style="id="adobe-dc-view"></div>
<script src="https://documentservices.adobe.com/view-sdk/viewer.js"></script>
<script type="text/javascript">
document.addEventListener("adobe_dc_view_sdk.ready", function(){
var adobeDCView = new AdobeDC.View({clientId: "5119059d51ba4d56b273cd92f50bde39", divId: "adobe-dc-view"});
adobeDCView.previewFile({
content:{location: {url: "https://documentservices.adobe.com/view-sdk-demo/PDFs/Bodea Brochure.pdf"}},
metaData:{fileName: "Aktualne wydanie"}
}, {defaultViewMode: "FIT_WIDTH", showAnnotationTools: false, showDownloadPDF: false,
showPrintPDF: false});
});
</script>

 

Thank You.

 

Best Regards. 

 

This topic is closed to new replies. Start a new post to keep the conversation going.

10 replies

Participant
Sep 19, 2023 6:00 PM UTC

I am also having this problem - can anyone help?

Translate
Raymond Camden
Community Manager
Community Manager
Sep 19, 2023 6:11 PM UTC

As I said before, this can be done with CSS. If you can't edit the CSS for some reason, try adding an inline style.

Translate
Participant
Sep 19, 2023 6:23 PM UTC

That doesn't make sense that Adobe would make everyone do that instead of having code that adjusted to the page of the PDF. I don't know how to add inline style for the correct size. 

Translate
Raymond Camden
Community Manager
Community Manager
Oct 2, 2022 7:02 PM UTC

Can you use CSS to set the height of the DIV?

Translate
Participant
Nov 6, 2022 10:28 PM UTC

Hello. There is a problem with embed in elementor only, and nothing help to improve viewing, include CSS styles. Thank You for Your help. 

Translate
Raymond Camden
Community Manager
Community Manager
Nov 7, 2022 2:51 PM UTC

Can you explain what Elementor is?

Translate