Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

PDF Embed Api height

New Here ,
Oct 01, 2022 Oct 01, 2022

Hello guys.

 

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

 

Zrzut ekranu 2022-10-1 o 13.58.27.png

 

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. 

 

TOPICS
PDF Embed API
2.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Oct 02, 2022 Oct 02, 2022

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 06, 2022 Nov 06, 2022

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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Nov 07, 2022 Nov 07, 2022

Can you explain what Elementor is?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 12, 2022 Dec 12, 2022

Elementor is a third party editor used along with Wordpress.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Dec 13, 2022 Dec 13, 2022

I guess don't use Elementor? If it prevents you from applying CSS to a div, then it's getting in the way.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 19, 2023 Sep 19, 2023

I am also having this problem - can anyone help?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 19, 2023 Sep 19, 2023

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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 19, 2023 Sep 19, 2023

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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 19, 2023 Sep 19, 2023

Using the sizing features of the web platform itself makes perfect sense. The web already has robust ways to control the size of elements built in - it wouldn't make sense for us to rebuild that. If you put a large PDF in an element sized smaller, it's not going to look good, but it doesn't make sense to just "grow" the div as that could break other parts of the page. You could consider getting the properties of the PDF and resizing then.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 19, 2023 Sep 19, 2023
LATEST

As a reminder, don't forget the Embed viewer has a button to go full screen, and we have the Lightbox mode. Also, In-Line mode will stretch the height automatically.

 

You've got many options here.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources