Last active
December 11, 2018 17:39
-
-
Save jjsub/989d90756790d9e5042ed60990ec5da3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npm install pdfmake | |
//It's very important to follow this order | |
import pdfFonts from 'pdfmake/build/vfs_fonts'; | |
import pdfMake from 'pdfmake/build/pdfmake'; | |
//It's a important one too | |
pdfMake.vfs = pdfFonts.pdfMake.vfs; | |
// Methods: | |
// How to generate a black page | |
{ text: '', style: 'header' , pageBreak:'before'} | |
// Margin:Here is how it works… is not pure like CSS | |
`margin: [0,5,0,100]` => margin: [⬅️, ⬆️, ➡️, ⬇️ ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment