API Docs for: 2.0.0

Class pdf_viewer

Class defined in: public/src/pdf_viewer_single.js:24

PDF viewing application, based on pdf.js library

`eTitle( )
public/src/pdf_viewer.js:190

Update the tile with current page number

addWidgetControlsToPdfViewer( )
public/src/pdf_viewer.js:167

Adds custom widgets to app

addWidgetControlsToPdfViewer( )
public/src/pdf_viewer_single.js:124

Adds custom widgets to app

changeThePage( responseObject )
public/src/pdf_viewer_single.js:293

Support function to allow page changing through right mouse context menu.

Parameters:
  • responseObject <Object>

    contains response from entry selection

changeThePage( responseObject )
public/src/pdf_viewer.js:871

Support function to allow page changing through right mouse context menu.

Parameters:
  • responseObject <Object>

    contains response from entry selection

draw( date )
public/src/pdf_viewer_single.js:147

Draw function, renders the current page into a canvas

Parameters:
  • date <Date>

    current time from the server

event( eventType, position, user_id, data, date )
public/src/pdf_viewer_single.js:337

Handles event processing, arrow keys to navigate, and r to redraw

Parameters:
  • eventType <String>

    the type of event

  • position <Object>

    contains the x and y positions of the event

  • user_id <Object>

    data about the user who triggered the event

  • data <Object>

    object containing extra data about the event,

  • date <Date>

    current time from the server

event( eventType, position, user_id, data, date )
public/src/pdf_viewer.js:915

Handles event processing, arrow keys to navigate, and r to redraw

Parameters:
  • eventType <String>

    the type of event

  • position <Object>

    contains the x and y positions of the event

  • user_id <Object>

    data about the user who triggered the event

  • data <Object>

    object containing extra data about the event,

  • date <Date>

    current time from the server

init( data )
public/src/pdf_viewer.js:52

Init method, creates an 'img' tag in the DOM and a few canvas contexts to handle multiple redraws

Parameters:
  • data <Object>

    contains initialization values (id, width, height, ...)

init( data )
public/src/pdf_viewer_single.js:31

Init method, creates an 'img' tag in the DOM and a few canvas contexts to handle multiple redraws

Parameters:
  • data <Object>

    contains initialization values (id, width, height, ...)

load( state, date )
public/src/pdf_viewer_single.js:72

Load the app from a previous state, parses the PDF and creates the widgets

Parameters:
  • state <Object>

    object to initialize or restore the app

  • date <Date>

    time from the server

pageCallback( responseObject )
public/src/pdf_viewer.js:541

Callback from right-click menu for adding/removing pages

Parameters:
  • responseObject <Object>

    contains operation to perform

resize( date )
public/src/pdf_viewer_single.js:211

Resize function, resizes all the canvas contexts

Parameters:
  • date <Date>

    current time from the server