I have a PDF embedded in an iframe, which is contained in a DIV so I have control of its scroll position. The height is dynamically calculated based on the page length of the PDF which is stored in the database.
It works with small documents (< 10 pages), but once you hit 30 pages, it ends up showing as just black. If I zoom out on the browser to 33%, then it starts to show up.
Here's the code:
<div id="document_pdf-wrapper" height="800px">
<iframe src="filepath.pdf#zoom=100&scrollbars=0" width="1200px" height="{{ document.page_length * 1085 }}px" /></iframe>
Anyone know why it's showing up as black but only when the pdf is >35 pages?
Thanks.
Edit: So the way I was doing it was calculating the height of the iframe, and it turns out that after around 20 pages, the height becomes too large and shows black for the PDF. Anyone know a work-around?