# angular2-pdf417-barcode

> PDF417 barcode generator Module for Angular 2

Latest version **0.3.0** (published 2016-10-11) · LGPL-3.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install angular2-pdf417-barcode
pnpm add angular2-pdf417-barcode
yarn add angular2-pdf417-barcode
bun add angular2-pdf417-barcode
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2016-10-11 |
| First published | 2016-10-11 |
| Weekly downloads | 0 |
| License | LGPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+4 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Anton Semjonov |
| Maintainers | ansemjo |
| Keywords | angular2, angular, module, pdf417, pdf417-js, barcode, generator, typescript |

## Links

- npm: https://www.npmjs.com/package/angular2-pdf417-barcode
- Repository: https://github.com/ansemjo/angular2-pdf417-barcode
- Homepage: https://github.com/ansemjo/angular2-pdf417-barcode#readme
- Issues: https://github.com/ansemjo/angular2-pdf417-barcode/issues
- npm.io page: https://npm.io/package/angular2-pdf417-barcode

## Dependencies (1)

- [locutus](https://npm.io/package/locutus.md) ^2.0.5

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.3.0 (latest) — 2016-10-11
- 0.2.1 — 2016-10-11

## README

# Angular2 PDF417 Barcode

_PDF417 barcode generator Module for Angular 2_

An Angular2 component/module that creates a canvas with a PDF417 barcode from any string input.

## pdf417-js

This package uses PDF417-js, which is a direct port of parts of the [TCPDF PHP library].
The original library is licensed under the [LGPL], which also applies to this derivative work.

[TCPDF PHP library]: https://www.tcpdf.org/ "TCPDF project homepage"
[LGPL]: LICENSE

The version used for porting is `tcpdf_6_2_11` or more specific PDF417 class version `1.0.005`.

Original port is available on GitHub: [bkuzmic/pdf417-js]
[bkuzmic/pdf417-js]: https://github.com/bkuzmic/pdf417-js

## Angular 2

This package is for use in the [Angular 2] framework.
[Angular 2]: https://angular.io/

# Usage

In a parent / shared module, import the PDF417BarcodeComponent,
either by exporting the Component as a Directive or simply re-export the provided module:

```javascript
/* angular */
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule  } from '@angular/forms';

/* third-party */
import { PDF417BarcodeModule } from 'pdf417-module';
...

@NgModule({
  exports: [
    CommonModule,
    FormsModule,
    PDF417BarcodeModule,
  ]
}) export class SharedModule { }
```

Then use it in your component's template:

```html
...
<div class="barcode">
  <h5>Scan me:</h5>
  <pdf417barcode [text]="'Hello, World!'"></pdf417barcode>
</div>
```
![barcode](https://cloud.githubusercontent.com/assets/11139925/19278474/9c18d700-8fdd-11e6-91c2-84727749e9b4.png)

## options

The component also accepts an `opts` object with some options:
 - `aspect: float` aspect ratio of the generated barcode
 - `errlvl: [-1 .. 8]` error correction level in the barcode, `-1` means `auto`
 - `pxw: float` pixel width
 - `pxh: float` pixel height

The default options are:
```javascript
defaults = { aspect: 4, errlvl: -1, pxw: 1, pxh: 1 }
```
 
Use property binding like this:
```html
<pdf417barcode [text]="'Hello, World!'" [opts]="{ pxw: 2, pxh: 2 }"></pdf417barcode>
```

---
_Source: https://npm.io/package/angular2-pdf417-barcode · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
