1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-09 20:52:56 +01:00
invoiceninja/public/js/vfs.js

14 lines
494 B
JavaScript
Raw Normal View History

2016-07-21 14:35:23 +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){
window.pdfMake.vfs['fonts/'+font+'/'+filename] = file;
});
})
}
function ninjaAddVFSDoc(name,content){
window.pdfMake.vfs['docs/'+name] = content;
if(window.refreshPDF)refreshPDF(true);
jQuery(document).trigger('ninjaVFSDocAdded');
}