Skip to content

This is an ingredient providing a full-featured PDF viewer, in place of the embed tag

License

Notifications You must be signed in to change notification settings

eprints/eprints_pdf_viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

About

This is an ingredient providing a full-featured PDF viewer, in place of the embed tag

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published