-
-
Notifications
You must be signed in to change notification settings - Fork 422
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
Rotation default value not working #999
Comments
i think this is the same like #976 |
Seems to be. Did you find a workaround until we have a fix? |
@ftaffelt yeah, probably is. The wquestion is: does someone know how to overcome that isssue? |
@marcelocerqueira69, I would like to have it resolved too or even a way to achieve that |
Same issue right here |
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 haven't found yet a solution. Can someone help me, please? |
Any news regarding this issue? |
Same problem here, very annoying because the first page of the document is not rotated at loading.. Any idea when it will be corrected? |
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. |
Seems there's an internal change detection issue with the library. I overcame this by forcing the code which sets the new default rotation amount to be a macro task, delaying it's execution: your-pdf-display.component.ts ...
rotation = 0;
ngOnInit(){
setTimeout(() => {
this.rotation = 90;
}, 0);
}
... your-pdf-display.component.html ...
<pdf-viewer
...
[rotation]="rotation">
</pdf-viewer>
... |
Bug Report or Feature Request (mark with an
x
)When I define the rotation by default when I load the document is not applied.
Example:
https://stackblitz.com/edit/ng2-pdf-viewer-qtq9ny?file=src%2Fapp%2Fapp.component.html,src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fapp.component.css
By default I defined 180. When the document is loaded the rotation is not applied and seems to be 0.
If I click on the test button to set the rotation to 90, works.
The text was updated successfully, but these errors were encountered: