# @bitech-ag/ui5.pdf

> UI5 Controls for rendering pdf files from services

Latest version **1.1.7** (published 2019-11-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install @bitech-ag/ui5.pdf
pnpm add @bitech-ag/ui5.pdf
yarn add @bitech-ag/ui5.pdf
bun add @bitech-ag/ui5.pdf
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.7 |
| Published | 2019-11-14 |
| First published | 2019-10-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 70.9 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Richard Martens |
| Maintainers | bitech-ag |
| Keywords | pdf, openui5, sapui5, ui5, javascript |

## Links

- npm: https://www.npmjs.com/package/@bitech-ag/ui5.pdf
- Repository: https://github.com/Bitech-AG/ui5.pdf
- Homepage: https://github.com/Bitech-AG/ui5.pdf#readme
- Issues: https://github.com/Bitech-AG/ui5.pdf/issues
- npm.io page: https://npm.io/package/@bitech-ag/ui5.pdf

## Dependencies (4)

- [webpack](https://npm.io/package/webpack.md) ^4.41.2
- [pdfjs-dist](https://npm.io/package/pdfjs-dist.md) ^2.1.266
- [@openui5/sap.m](https://npm.io/package/@openui5/sap.m.md) ^1.60.18
- [@openui5/themelib_sap_belize](https://npm.io/package/@openui5/themelib_sap_belize.md) ^1.71.0

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 1.1.7 (latest) — 2019-11-14
- 0.4.2 (alpha) — 2019-10-23
- 1.1.6 — 2019-11-14
- 1.1.5 — 2019-11-03
- 1.1.4 — 2019-11-03
- 1.1.3 — 2019-10-27
- 1.1.2 — 2019-10-23
- 1.1.1 — 2019-10-23
- 1.1.0 — 2019-10-23
- 1.0.0 — 2019-10-23
- 0.4.1 — 2019-10-23

## README

# ui5.pdf
This library contains a number of controls. The main control is the "Viewer". With the help of this control you can integrate the PDF ad into your apps. The presentation of the PDF is done using the Mozilla [PDF.js](https://mozilla.github.io/pdf.js) library. This library has been seamlessly integrated into the control, so there are no problems with the controls' Ui5 lifecycle.

## [Demo](https://bitech-ag.github.io/ui5.pdf)

## How do you integrate the viewer into my application?

With the new capabilities of [UI5 Tooling] (https://sap.github.io/ui5-tooling), it is very easy to integrate open source libraries like this into your own applications. You do not need to copy files to your applications. If your app is older and does not have a Ui5.yaml file, you can create this file with [UI5 Cli] (https://sap.github.io/ui5-tooling/pages/GettingStarted).

1. Insert this repository as a dependency in your Package.json.
```sh
dependencies: {
...
"bitech.ui5.pdf": "1.0.0"
...
```
or you use the command line
```sh
npm install @bitech/ui5.pdf --save
```
2. Extend your ui5.yaml file with
```sh
---
specVersion: "0.1"
kind: extension
type: project-shim
metadata:
  name: bitech.ui5.pdf
shims:
  configurations:
    pdfjs-dist:
      specVersion: "0.1"
      type: module
      metadata:
        name: "@bitech-ag/ui5.pdf"
      resources:
        configuration:
          paths:
            /resources/bitech/ui5/pdf: ""
 ```
Do not forget the three dashes!

### Using in views

Now you can integrate the control into your views.
```sh
<mvc:View ... xmlns:pdf="bitech.ui5.pdf">
...
<pdf:Viewer src="some.pdf" ></pdf:Viewer>
<!-- or 
<pdf:Viewer />
-->
...
</mvc:View>
```

## How do you contribute to the project?

You like our code and you want to get involved with us? You're welcome.

1. install nodejs and npm, see [nodejs](https://nodejs.org/en/download/)
2. install git, see [git](https://git-scm.com/downloads)
3. clone the repo
```sh
git clone https://github.com/Bitech-AG/ui5.pdf.git
```
4. install dependencies and link the library and consumer project
```sh
cd ui5.pdf
npm install
```
5. Start the consumer app
```sh
npm start
```

## Known limitations

The control can not display large PDF files. This would require some incredible rendering to be implemented

## License

MIT

## Author
[<img src="https://bitech.ag/images/icon_netweaver_gr.png">](https://bitech.ag/netweaver-technologies.html)  
*[Business Technologies](https://bitech.ag/netweaver-technologies.html)*  
**[Bitech AG Leverkusen](https://www.bitech.ag)**

---
_Source: https://npm.io/package/@bitech-ag/ui5.pdf · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
