eprints/eprints_pdf_viewer
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
Replaces the embed tag with a JavaScript based PDF viewer. This is using https://mozilla.github.io/pdf.js/ It will by default replace the embed tag. Can also be used on demand with our API: pdf_api_load_pdf(id, url, load_function) Also by default will accept the URL parameters pdf_page and pdf_search, which will automatically take the user to a particular page or run a particular search Such functionality can also be done via API: pdf_api_get_window_for_id(id) pdf_api_go_to_page(pdf_window, page) pdf_api_get_current_page(pdf_window) pdf_api_get_metadata(pdf_window) pdf_api_highlight_term(pdf_window, term) Server config: Need to be able to serve mjs files, e.g. Edit /etc/mime.types, add in mjs to the javascript line or AddType text/javascript .mjs to your apache configuration