Skip to main content

Posts

Showing posts from May, 2017

JSPDF Custom Font Add Not Working

CSS Code @font - face { font - family : Calibri ; src : url ( "fonts/calibri.ttf" ); font - style : normal ; } JS Code doc . setFont ( 'Calibri' ); doc . setFontSize ( 7.5 ); doc . setFontType ( "normal" ); doc . text ( 10 , 10 , "Hi, How r u" ); I want to add Calibri Font, but it is not working List of js script included <script src = "/assets/global/scripts/jspdf/jspdf.js" type = "text/javascript" ></script> <script src = "/assets/global/scripts/jspdf/plugins/acroform.js" type = "text/javascript" ></script> <script src = "/assets/global/scripts/jspdf/plugins/from_html.js" type = "text/javascript" ></script> <script src = "/assets/global/scripts/jspdf/plugins/addhtml.js" type = "text/javascript" ></script> <script src = "/assets/global/scripts/jspdf/plugins/addi...