https://github.com/liorocks/pdfmake-unicode
🖨 Support Unicode Characters in PDFMake library.
https://github.com/liorocks/pdfmake-unicode
pdf pdfmake unicode
Last synced: 7 months ago
JSON representation
🖨 Support Unicode Characters in PDFMake library.
- Host: GitHub
- URL: https://github.com/liorocks/pdfmake-unicode
- Owner: liorocks
- License: mit
- Created: 2017-05-09T12:08:49.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-12T11:13:29.000Z (about 9 years ago)
- Last Synced: 2025-01-14T21:01:31.898Z (over 1 year ago)
- Topics: pdf, pdfmake, unicode
- Language: JavaScript
- Homepage: https://landish.github.io/pdfmake-unicode/
- Size: 3.01 MB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# PDFMake Unicode
[](https://www.npmjs.com/package/pdfmake-unicode)
[](https://www.npmjs.com/package/pdfmake-unicode)
[](https://github.com/Landish/pdfmake-unicode/blob/master/LICENSE)
[](https://landish.github.io/pdfmake-unicode/)
Support Unicode Characters in [PDFmake](https://github.com/bpampuch/pdfmake) library.
## Getting Started
> [pdfmake](https://github.com/bpampuch/pdfmake) is library for PDF printing in pure JavaScript.
By default pdfmake uses [Roboto](https://fonts.google.com/specimen/Roboto) font, which does not support Unicode characters.
This package is an extension for adding unicode character support. It comes with a [Arial GEO](http://fonts.ge/en/pack/28/Arial-GEO) font, which has 4 styles: Regular, **Bold**, *Italic* and ***Bold Italic***.
## Installation
Install with [NPM](https://www.npmjs.com):
```
$ npm install pdfmake-unicode --save
```
Install with [Yarn](https://yarnpkg.com/):
```
$ yarn add pdfmake-unicode
```
Install with [Bower](https://bower.io/):
```
$ bower install pdfmake-unicode --save
```
## Usage
> Note: You **don't** need to include `vfs_fonts.js` file from pdfmake library.
```html
var docDefinition = { content: 'Your unicode text will go here.' };
pdfMake.createPdf(docDefinition).download('filename.pdf');
```
### Use with ES6
```js
import pdfMake from 'pdfmake/build/pdfmake';
import pdfMakeUnicode from 'pdfmake-unicode';
// this part is crucial
pdfMake.vfs = pdfMakeUnicode.pdfMake.vfs;
let docDefinition = { content: 'Your unicode text will go here.' };
pdfMake.createPdf(docDefinition).download('filename.pdf');
```
## Supported Languages
* Georgian
* Russian
* Basic Latin
## Licence
The PDFMake Unicode is open-sourced software licensed under the [MIT license](https://github.com/Landish/pdfmake-unicode/blob/master/LICENSE).