{"repo":"AndreKelling/jspdf-template","free":true,"listed":false,"github":"https://github.com/AndreKelling/jspdf-template","clone":"git clone https://github.com/AndreKelling/jspdf-template.git","description":"Invoice template and setup for jsPDF usage in ES6.","language":"JavaScript","stars":54,"topics":["jspdf","jspdf-yworks","svg-images","boilerplate"],"license":null,"category":"saas-starters-boilerplates","readme_excerpt":"jsPDF Template This is a styled invoice Template jsPDF in an ES module setup. Includes svg2pdf for better SVG support. Here there is a demo. It is primarily for bundling into JS for usage in a browser. There was this issue which was getting closed. It should work on nodeJS side just without the .html() method. Which is not used here. I did not test it yet. Install 1. npm install If you want the usable node package, you can install it via npm: npm i jspdf-invoice -S it is here https://www.npmjs.com/package/jspdf-invoice Build Creates a bundle JS file which provides the global method printPDF() . For demonstration a docs GitHub page is here. 1. npm run build Development 1. npm run dev 2. npm run serve Publish Is done via GitHub action. raise version in dist/package.json A copy of the src dir is taken as artifact for the node package in the dist dir. Custom-Font file I do use a custom font here. Which is prepared as base64 code like following: https://github.com/parallax/jsPDF#use-of-unicode-characters--utf-8 1. My custom fonts are laying as .ttf font-files in src/fonts subdirectory. 2. prepared JS script with the font's base64 code are in src/print/fonts 3. they got a import { jsPDF } from 'jspdf'; added at the very top Structure Print components or template partials are placed in src/print/partials fetchSvg and newPage are tools placed in src/print/utils Image sizes Images need to be SVG in here! Logo Size: width=\"40\" height=\"49\" Address-bar: width=\"668\" height=\"56\", which is ","default_branch":null,"files":null,"tree":[],"storefront":"/r/AndreKelling","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/AndreKelling/jspdf-template/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}