Add a space between pages in mobile viewer

12 views
Skip to first unread message

Matt Parizeau

unread,
Nov 13, 2014, 5:10:38 PM11/13/14
to pdfnet-w...@googlegroups.com
Q:

In two page mode in the mobile viewer is it possible to have a space in between the pages?

A:

You could do this by making a couple modifications to MobileReaderControl.js. Find the getFitPageZoom function and in the forEachPageInWrapper callback add the following code just after var page = me.doc.GetPageInfo(idx);
var isFirstPageInWrapper = (idx === me.adjustedPageIndex(pageIndex));
if (me.nPagesPerWrapper === 2 && isFirstPageInWrapper) {
    width
+= 10;
}

Then in the getPageData function add the following code just before if (pageHeight > maxHeight)
var isFirstPageInWrapper = (i === me.adjustedPageIndex(pageIndex));
if (me.nPagesPerWrapper === 2 && isFirstPageInWrapper) {
    totalWidth
+= 10 * fitZoom;
}

Reply all
Reply to author
Forward
0 new messages