adonis-pdf
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "adonis-pdf", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Create PDF files within Adonis using pdfmake", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,5 +5,14 @@ # adonis-pdf | ||
## Configuration | ||
## Installation | ||
- Run `npm i adonis-pdf` or `yarn add adonis-pdf` | ||
- Create `config/pdf.js` and set any custom fonts you wish to use: | ||
```js | ||
module.exports = { | ||
fontDescriptors: { | ||
// my fonts here | ||
} | ||
} | ||
``` | ||
- Add `'adonis-pdf/providers/PdfProvider'` to `start/app.js` | ||
## Usage | ||
@@ -19,3 +28,3 @@ ```js | ||
const pdf = new PDF({ | ||
// custom config (this would override config/pdf.js ) | ||
// custom config (this will override config/pdf.js ) | ||
}) | ||
@@ -22,0 +31,0 @@ const doc = Pdf.create({ |
2112738
43