You are here

function _pdf_reader_load_pdf_js in PDF Reader 7

1 call to _pdf_reader_load_pdf_js()
theme_pdf_reader in ./pdf_reader.module
Theme the field with pdf reader

File

./pdf_reader.module, line 221
pdf reader module file.

Code

function _pdf_reader_load_pdf_js($file_url) {
  $path = drupal_get_path('module', 'pdf_reader');
  $d_path = base_path() . $path;
  drupal_add_js("{$path}/js/pdf.js");
  drupal_add_js("PDFJS.workerSrc = '{$d_path}/js/pdf.js'", 'inline');
  drupal_add_js("{$path}/js/l10n.js");
  drupal_add_js("{$path}/js/compatibility.js");
  drupal_add_js("{$path}/js/viewer.js");
  drupal_add_css("{$path}/css/pdf_reader-viewer.css");
  drupal_add_js('kDefaultURL = "' . $file_url . '";', 'inline');
}