.ng2-pdf-viewer-container not in parent container
See original GitHub issueBug Report or Feature Request (mark with an x
)
- [X] Regression (a behavior that used to work and stopped working in a new release)
- [ ] Bug report -> please search issues before submitting
- [ ] Feature request
- [ ] Documentation issue or request
File : pdf-viewer.component.scss
In the latest version, the .ng2-pdf-viewer-container is set with position:absolute and width:100% This leads to multiple styling problems, especially in pages where the pdf viewer is supposed to be contained in a container.
In previous versions, the position was set to relative and there was no problems.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How the make PDF fit the height - ng2-pdf-viewer
It is because, ng2-pdf-viewer changing the height according the it's settings and then when pdf page is rendered, we change it to the...
Read more >ng2-pdf-viewer - npm
Start using ng2-pdf-viewer in your project by running `npm i ng2-pdf-viewer`. ... and make sure that it's not bigger then container block.
Read more >ng2-pdf-viewer (ok) - StackBlitz
Dependencies · <h2>PDF Viewer</h2> · <div · id="outerContainer" · style="position:absolute;width:400px; · height:600px; overflow:auto;" · > · <div (click)="prevPage()"> ...
Read more >ng2-pdf-viewer/README.md - UNPKG
Works in combination with `[original-size]="true"`. You can show your document in original size, and make sure that it's not bigger then container block....
Read more >Source - GitHub
[[#854](https://github.com/VadimDez/ng2-pdf-viewer/issues/854)] - TypeError: Cannot read properties of ... .ng2-pdf-viewer-container not in parent container ...
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 Free
Top 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
Workaround could be to set the container <pdf-viewer> to position:relative. Took me also i while to figure out.
I think it is a duplicate of #805 (workaround provided) Here is the change to blame: https://github.com/VadimDez/ng2-pdf-viewer/commit/8d4f8ad25107a98e920ab18e32b828c2e5597e54#diff-c0a5f3426a537629a18cbeb63abc55b7ce727f267c2e85acf84c88ddd96e4cb1R3