Skip to content
Snippets Groups Projects
Commit a1d387e2 authored by Ron Lucke's avatar Ron Lucke Committed by Jan-Hendrik Willms
Browse files

fix #4186

Closes #4186

Merge request studip/studip!3086
parent 639d258e
No related branches found
No related tags found
No related merge requests found
......@@ -420,7 +420,7 @@ export default {
if (this.currentUrl) {
let view = this;
view.pdfEventBus = new EventBus();
view.pdfLoadingTask = getDocument(this.currentUrl).promise;
view.pdfLoadingTask = getDocument({ url: this.currentUrl, verbosity: 0 }).promise;
view.pdfLoadingTask.__PDFDocumentLoadingTask = true;
// Link Service
view.pdfLinkService = new PDFLinkService({
......@@ -487,7 +487,11 @@ export default {
.then((pdfPage) => {
view.pdfPage = pdfPage;
const width = outerContainer.offsetWidth;
view.baseScale = (width / pdfPage.view[2] / 1.33).toFixed(2);
let pdfWidth = pdfPage.view[2];
if (pdfPage.rotate === 90 || pdfPage.rotate === 270) {
pdfWidth = pdfPage.view[3];
}
view.baseScale = (width / pdfWidth / 1.33).toFixed(2);
view.scale = view.baseScale;
// Creating the page view with default parameters.
let defaultViewport = pdfPage.getViewport({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment