https://github.com/appfeel/pdf-component
Web custom component to embed a pdf viewer in any html
https://github.com/appfeel/pdf-component
Last synced: about 2 months ago
JSON representation
Web custom component to embed a pdf viewer in any html
- Host: GitHub
- URL: https://github.com/appfeel/pdf-component
- Owner: appfeel
- License: mit
- Created: 2022-01-30T10:45:27.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-02-07T19:06:24.000Z (over 3 years ago)
- Last Synced: 2024-04-30T02:22:37.625Z (about 1 year ago)
- Language: TypeScript
- Size: 237 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README

# pdf-component
Web component to render pdf documents on any html.
## Javascript
```html
```
## React
```bash
npm i pdf-component-react
``````tsx
import { PdfComponent } from 'component-library-react';render() {
return ;
}
```## Vue
```bash
npm i pdf-component
``````ts
import Vue from 'vue';
import App from './App.vue';import { applyPolyfills, defineCustomElements } from 'pdf-component/loader';
Vue.config.productionTip = false;
// Tell Vue to ignore all components defined in the pdf-component
// package.
Vue.config.ignoredElements = [/pdf-component/];// Bind the custom elements to the window object
applyPolyfills().then(() => {
defineCustomElements();
});new Vue({
render: h => h(App)
}).$mount('#app');
```The components should then be available in any of the Vue components
```ts
render() {
return (
);
}
```More info: https://stenciljs.com/docs/vue
## Angular
```bash
npm i pdf-component-angular
``````ts
import { PdfComponent } from 'pdf-component-angular';
import { SomeComponent } from './some.component';@NgModule({
imports: [PdfComponent],
declarations: [SomeViewComponent],
exports: [SomeComponent]
})
export class SomeViewModule {}
```Usage in your templates:
```html
```