Skip to content

liorocks/pdfmake-unicode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDFMake Unicode

npm npm license Demo

Support Unicode Characters in PDFmake library.

Getting Started

pdfmake is library for PDF printing in pure JavaScript.

By default pdfmake uses Roboto font, which does not support Unicode characters.

This package is an extension for adding unicode character support. It comes with a Arial GEO font, which has 4 styles: Regular, Bold, Italic and Bold Italic.

Installation

Install with NPM:

$ npm install pdfmake-unicode --save

Install with Yarn:

$ yarn add pdfmake-unicode

Install with Bower:

$ bower install pdfmake-unicode --save

Usage

Note: You don't need to include vfs_fonts.js file from pdfmake library.

<script src="pdfmake.min.js"></script>
<script src="dist/pdfmake-unicode.js"></script>
<script>
  var docDefinition = { content: 'Your unicode text will go here.' };
  pdfMake.createPdf(docDefinition).download('filename.pdf');
</script>

Use with ES6

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.

About

🖨 Support Unicode Characters in PDFMake library.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published