1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Adding support for page rotation

This commit is contained in:
Brendan Dahl 2011-08-06 14:41:18 -07:00
parent ad02c82f6a
commit 4377eed920
5 changed files with 53 additions and 11 deletions

View file

@ -104,10 +104,7 @@ var PDFView = {
var thumbnails = this.thumbnails = [];
for (var i = 1; i <= pagesCount; i++) {
var page = pdf.getPage(i);
var mediaBox = page.mediaBox;
var width = (mediaBox[2] - mediaBox[0]);
var height = (mediaBox[3] - mediaBox[1]);
pages.push(new PageView(container, page, i, width, height, page.stats));
pages.push(new PageView(container, page, i, page.width, page.height, page.stats));
thumbnails.push(new ThumbnailView(sidebar, pages[i - 1]));
};