This a styled invoice Template jsPDF in a simple ES6 webpack setup.
Included custom fonts with this jsPDF CustomFont support plugin. Even it's said that this functionality is already integrated in jsPDF. It is now working with my used custom font.
For a bit simpler usage i would suggest to refer back to Version 1.0 of this development. Which isn't using jspdf-yworks package and integrates graphics as simple base64.
Setup dev env
yarn run webpack
you might need to have webpack installed too.
Create custom Font file
- Copy your fonts into the fonts subdirectory.
node makeFonts.jsto create a new print/default_vfs.js.
Print "Templates" or Components are hidden in
src/print/jspdf.js serves the main start for the printing functionality.
Some functional tools are placed in
- the yworks fork of jsPDF is used for their proper SVG integration
- custom font
work sansisn't working in any case. sometimes i do switch font temporally for some calculations. e.g. for functions
- currently using localStorage to save the background graphic globally for synchronous usage. Might not be the best idea.