invoiceninja/resources/assets/js/vfs.js

14 lines
494 B
JavaScript
Raw Normal View History

2016-01-07 09:08:30 +02:00
window.pdfMake = window.pdfMake || {}; window.pdfMake.vfs = {};
if(window.ninjaFontVfs)ninjaLoadFontVfs();
function ninjaLoadFontVfs(){
jQuery.each(window.ninjaFontVfs, function(font, files){
jQuery.each(files, function(filename, file){
2016-03-23 18:40:42 -04:00
window.pdfMake.vfs['fonts/'+font+'/'+filename] = file;
2016-01-07 09:08:30 +02:00
});
})
2016-03-23 18:40:42 -04:00
}
function ninjaAddVFSDoc(name,content){
window.pdfMake.vfs['docs/'+name] = content;
if(window.refreshPDF)refreshPDF(true);
jQuery(document).trigger('ninjaVFSDocAdded');
2016-01-07 09:08:30 +02:00
}