HTML 5 BUTTONS PDF EXPORT NOT WORKING

HTML 5 BUTTONS PDF EXPORT NOT WORKING

DanyVit90DanyVit90 Posts: 9Questions: 3Answers: 0

Hi to everybody,
I'm trying to work with PDF export, but when I try to use the button, console show this error

Uncaught TypeError: (F || u.pdfMake).createPdf is not a function buttons.html5.min.js:35
at D.action (buttons.html5.min.js:35)
at g (dataTables.buttons.min.js:14)
at HTMLButtonElement.<anonymous> (dataTables.buttons.min.js:15)
at HTMLButtonElement.dispatch (jquery.js:3074)
at HTMLButtonElement.elemData.handle (jquery.js:2750)
action @ buttons.html5.min.js:35
g @ dataTables.buttons.min.js:14
(anonymous) @ dataTables.buttons.min.js:15
dispatch @ jquery.js:3074
elemData.handle @ jquery.js:2750


<link rel="stylesheet" href="{{ asset('storage/css/bootstrap.min.css') }}" />
<link href="https://cdn.datatables.net/1.10.24/css/dataTables.bootstrap5.min.css" rel="stylesheet">
<link rel="stylesheet" href="{{ asset('storage/css/loading-bar.css') }}">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,400;1,700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="{{ asset('css/style.css') }}">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.7.0/css/buttons.dataTables.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.0/jquery.validate.js"></script>
<script src="https://cdn.datatables.net/1.10.24/js/jquery.dataTables.min.js"></script>
<script src="{{ asset('storage/js/bootstrap.bundle.min.js') }}"></script>
<script src="https://cdn.datatables.net/1.10.24/js/dataTables.bootstrap5.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/pace-js@latest/pace.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.7.0/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.7.0/js/buttons.html5.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.6.0/jszip.min.js" integrity="sha512-uVSVjE7zYsGz4ag0HEzfugJ78oHCI1KhdkivjQro8ABL/PRiEO4ROwvrolYAcZnky0Fl/baWKYilQfWvESliRA==" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.66/vfs_fonts.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.71/pdfmake.min.js" integrity="sha512-q+jWnBtVH327w/3nlp2Th9Dtjmlfj3Mb4tXCGbYjYWUqtFyIhl1Ul8GXoMkzbWvdIRVlS0P1pyteYUzxArKYOg==" crossorigin="anonymous"></script>

Above there is libraries I used in my project, someone can tell me which is the issue?

Thanks

Answers

  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin

    Thanks for your question. As noted in the forum rules, please post a link to a running test case showing the issue so we can offer some help. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Allan

This discussion has been closed.