diff --git a/src/app/pdf-viewer/pdf-viewer.component.scss b/src/app/pdf-viewer/pdf-viewer.component.scss index 929fbcbb..5d1c338e 100644 --- a/src/app/pdf-viewer/pdf-viewer.component.scss +++ b/src/app/pdf-viewer/pdf-viewer.component.scss @@ -72,6 +72,7 @@ -moz-text-size-adjust: none; text-size-adjust: none; forced-color-adjust: none; + transform-origin: 0 0; } .textLayer span, diff --git a/src/app/pdf-viewer/pdf-viewer.component.ts b/src/app/pdf-viewer/pdf-viewer.component.ts index 26b20134..abb76b0b 100644 --- a/src/app/pdf-viewer/pdf-viewer.component.ts +++ b/src/app/pdf-viewer/pdf-viewer.component.ts @@ -561,9 +561,10 @@ export class PdfViewerComponent this._rotation !== 0 || this.pdfViewer.pagesRotation !== this._rotation ) { - setTimeout(() => { - this.pdfViewer.pagesRotation = this._rotation; - }); + // wait until at least the first page is available. + this.pdfViewer.firstPagePromise?.then( + () => (this.pdfViewer.pagesRotation = this._rotation) + ); } if (this._stickToPage) {