Skip to content

Commit

Permalink
Merge pull request #508 from VadimDez/fix-scale-with-rotation
Browse files Browse the repository at this point in the history
Fix PDF scaling when rotating
  • Loading branch information
VadimDez authored Aug 11, 2019
2 parents 5729c9d + 228028d commit 7110f5b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/pdf-viewer/pdf-viewer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,10 @@ export class PdfViewerComponent
(this._fitToPage &&
viewport.width > this.element.nativeElement.offsetWidth)
) {
scale = this.getScale((page as any).getViewport({ scale: 1 }).width);
scale = this.getScale(
(page as any).getViewport({ scale: 1, rotation: this._rotation })
.width
);
stickToPage = !this._stickToPage;
}

Expand Down

0 comments on commit 7110f5b

Please sign in to comment.