alekswebnet / pdfjs-viewer-element Goto Github PK
View Code? Open in Web Editor NEWThe simplest integration of PDF.js default viewer using the iframe element and web component
Home Page: https://alekswebnet.github.io/pdfjs-viewer-element/
The simplest integration of PDF.js default viewer using the iframe element and web component
Home Page: https://alekswebnet.github.io/pdfjs-viewer-element/
ref: mozilla/pdf.js#12625
const ViewerCssTheme = {
AUTOMATIC: 0, // Default value.
LIGHT: 1,
DARK: 2,
};
Even better if we can pass options to the component or give us callback which allows to set the options.
For now, the browser continually defines the language of the viewer. Needed the possibility of setting any language, that no depends on the browser.
STR:
src
or viewer-path
README.md uses a function with callback.
viewerApp.eventBus.on('pagesloaded', () => {
console.log('Viewer pages loaded')
})
while typings shows eventBus: Record<string, any>;
.
if there is on how do I remove event listeners?
Is it possible to invoke PDFViewerApplication.open()
method to open files loaded outside of the librar?
see here:
https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-support
use Uint8Array instead of URL in the PDFViewerApplication.open
I load the pdf with src and would like to avoid others clicking Open File to open a menu.
Would love to see a bit more documentation on how to use inside framworks like Vue.
See post comments here: https://stackoverflow.com/questions/77881917/is-it-possible-to-create-a-web-component-of-pdfjs
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.