Skip to content

4. Modify BookReaderJSSimple.js in BookReaderDemo dir

Andrija Sagicc edited this page Jun 15, 2017 · 2 revisions

Define a dimensions of image - check in file properties.

NOTE: Recommended that all images have the same dimensions (eg. 1200x860).
Add new dimension parameters in lines 11 and 16

Dimensions

Link it to your images

Add link to images of the object in line 28
NOTE: check the extension of the file, if it is .JPG then modify '.jpg' at he end of a line to '.JPG'
You can use this model var url = '../../filename_'+leafStr.replace(re, imgStr)+ '.jpg'; to call directly from dir and not from http(s). This is good solution if you work in local and then update it all on a server, besides you dont need to search for an address of that file
(eg. https://server.name/dir1/dir2/filename_001.jpg).
It will work whereever you put it.

Link-to=images IMPORTANT: In line 25 the value of '000' mean that there are less then 1000 files in dir and the number in file name is 001-999. If an object have more than 1000 files then number it in name started from 0001 and modify a value as '0000'.

Define number of pages, Title an link to website page of the object

Define number of image files you have in line 80
Add Title and past a link to web page of the digital object is.

Description-and-pages

THAT'S IT!