Skip to content
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

Closed
daniela-alves opened this issue May 9, 2023 · 11 comments
Closed

Rotation default value not working #999

daniela-alves opened this issue May 9, 2023 · 11 comments
Labels
Milestone

Comments

@daniela-alves
Copy link

Bug Report or Feature Request (mark with an x)
- [ ] Regression (a behavior that used to work and stopped working in a new release)
- [X ] Bug report -> please search issues before submitting
- [ ] Feature request
- [ ] Documentation issue or request

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.

@ftaffelt
Copy link
Contributor

i think this is the same like #976

@daniela-alves
Copy link
Author

daniela-alves commented May 10, 2023

Seems to be. Did you find a workaround until we have a fix?

@marcelocerqueira69
Copy link

@ftaffelt yeah, probably is. The wquestion is: does someone know how to overcome that isssue?

@Ricardo-Guia
Copy link

@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

@helderdias15
Copy link

Same issue right here

@stale
Copy link

stale bot commented Aug 7, 2023

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.

@stale stale bot added the stale label Aug 7, 2023
@daniela-alves
Copy link
Author

I haven't found yet a solution. Can someone help me, please?

@stale stale bot removed the stale label Sep 29, 2023
@lcvalves
Copy link

Any news regarding this issue?

@mediamix1950
Copy link

Same problem here, very annoying because the first page of the document is not rotated at loading.. Any idea when it will be corrected?
Thx for support

Copy link

stale bot commented Jan 7, 2024

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.

@stale stale bot added the stale label Jan 7, 2024
@jarodsmk
Copy link

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>
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants