PDF not displayed when <pdf-app> is placed under a <div> element
See original GitHub issueHi @sandanat , I’ve spent a lot of hours to determine, what’s the reason of not displaying PDF viewer in my Vue app. If you have any workaround for thiss issue, please provide.
Configuration:
- Web browser and it`s version: Firefox 86, Chrome 89
- Operating system and it`s version: Windows 10
- vue-pdf-app version: 1.0.1
Steps to reproduce the problem:
- Use Typescript Example
- In
src/App.vue
place<pdf-app>
element into additional<div>
element like this:
<template>
<div id="app">
<div>
<pdf-app pdf="/sample.pdf"></pdf-app>
</div>
</div>
</template>
- Build and run application, e.g.
npm run serve
- Display application in browser
What is the expected behavior? A PDF is displayed together with top menu.
What went wrong?
PDF and menu are not displayed. No error in console.
This issue completely prevents to use vue-pdf-app
inside a Vue / Vuetify element which internaly creates <div>
element.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Display Adobe pdf inside a div - Stack Overflow
I have a pdf file that the user has to see and click on the "I agree" button. How do you display a...
Read more >Displaying PDF in React app - Level Up Coding
I want to show you an easy and simple way to display PDF files using React in the browser. I will be using...
Read more >wojtekmaj/react-pdf: Display PDFs in your React app ... - GitHub
React-PDF. Display PDFs in your React app as easily as if they were images. Lost? This package is used to display existing PDFs....
Read more >Troubleshoot viewing PDF files on the web - Adobe Support
Follow these steps to solve the common issues around viewing PDF files from a website.
Read more >How to Embed a PDF in an HTML Website | PDF.js Express
approaches to displaying PDFs in the browser and how you can quickly ... Place the following <div> element where you want the PDF...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I consider this as solved - suggestion with
style="height: 100vh;"
works well.Thanks for explanation.
what if the pdf is inside the modal? and my modal is just half of the window size, applying 100vh makes the pdf go beyond the modal height.