Wrong order of pdf_make.js and vfs_fonts.js in download page - Causes error in PDF functionality
Wrong order of pdf_make.js and vfs_fonts.js in download page - Causes error in PDF functionality
shuaybi
Posts: 5Questions: 2Answers: 0
Can you please correct the download order of the files pdf_make.js and vfs_fonts.js.
The concatenate/download order should be:
<script type="text/javascript" src="js-new/pdfmake.min.js"></script>
<script type="text/javascript" src="js-new/vfs_fonts.js"></script>
Currently when you select the download/concatenate option the files appear in wrong order causing the PDF functionality to not work.
See related bug:
https://datatables.net/forums/discussion/34057/bug-with-pdf-maker
This discussion has been closed.
Answers
Thanks for pointing that out! Fixed now.
Allan
Actually, that still did not resolve the issue. Looks like your version of vfs_fonts.js is outdated. I had to download the latest version of the vfs_fonts.js file and use that instead of what is downloaded using the datatables download button.
This is also mentioned in the last comment of the following stackoverflow discussion:
https://stackoverflow.com/questions/28320624/typeerror-cannot-read-property-roboto-regular-ttf-of-undefined
The latest version of vfs_fonts.js can be found at:
https://github.com/bpampuch/pdfmake/releases
Allan, if you can please update your version of vfs_fonts.js with the file that is part of the above release. That should solve this problem for everyone.
Thank you.
The pdfmake 0.1.32 release appears to work okay for me here: http://live.datatables.net/coforoza/1/edit .
Is that example not working for you?
Allan
The example is working for me.