-
-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple viewers on one page #806
Comments
My current workaround: <pdf-viewer
class="pdf-viewer"
[class.pdf-viewer--relative]="positionPdfViewerRelative"
[src]="objectUrl"
[fit-to-page]="true"
[show-all]="true"
(after-load-complete)="handlePdfLoaded()"
></pdf-viewer> public positionPdfViewerRelative: boolean = false;
public handlePdfLoaded(): void {
this.positionPdfViewerRelative = true;
} .pdf-viewer {
display: block;
&--relative {
::ng-deep .ng2-pdf-viewer-container {
position: relative;
}
}
} |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Bump to remove stale. |
Same here: works fine if I remove position:absolute from F12 but gives error if change the style programmatically. |
Same issue here, don't understand why this restriction is here. |
@podger have you tried my workaround to eliminate the error? |
I "solved" downgrading the package to the older version. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I'm going through the same problem. "ng2-pdf-viewer": "^9.1.5", |
I'm using 10.2.2 and have similar problems also. I just want to display pdf's as part of regular flow on the page. E.g if the pdf is 100 pages long, then it will push content below it 100 pages down. Only way I can get it to work is with Luckily @Spielboerg fix works for me, so a big thanks for that 👍 |
Bug Report or Feature Request (mark with an
x
)I want to display multiple PDF files one below the other on one page. Also the PDF viewer should display all pages below each other (the black rectangle stands for the viewport):
However, since the viewer container is absolutely positioned, this does not work at the moment because the viewers are stacked on top of each other.
I changed the style from
.ng2-pdf-viewer-container
toposition: relative
which leads to this error:When I remove the
position: absolute
rule from the viewer-container in the dev tools of the browser, the preview works exactly as expected. So I don`t understand why this restriction is there?The text was updated successfully, but these errors were encountered: