Author Topic: Export data as pdf.  (Read 2387 times)

kiwon34

  • Pro Ultimate
  • Jr. Member
  • *
  • Posts: 52
    • View Profile
Export data as pdf.
« on: August 01, 2019, 12:21:18 pm »
Hello param,

Is there a way to export the grid data in pdf file? I see xlsx, csv, json, html...but no pdf in demo.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6307
    • View Profile
Re: Export data as pdf.
« Reply #1 on: August 01, 2019, 03:34:13 pm »
I couldn't find any pdf library with unicode support last time I checked.

Currently easier solution is to export to html in Chrome and use export to pdf feature of Chrome.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6307
    • View Profile
Re: Export data as pdf.
« Reply #2 on: July 06, 2023, 03:12:20 pm »
Export to pdf is available in v9.0.0

raulmuna

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Export data as pdf.
« Reply #3 on: December 17, 2023, 06:00:16 pm »
Hi

I located pdfmaker in my application in a path like .../plugins/pdf/pdfmaker/0.2/build/pdfmake.min.js. When I try export to PDF, I get an error because the route where seems paramquery is trying reach the file is in http://<my-host-ip>/pdfmake027/pdfmake.min.js

How can I fix the issue?

Thanks

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6307
    • View Profile
Re: Export data as pdf.
« Reply #4 on: December 18, 2023, 07:11:32 am »
Path to pdfmake can be either set in html script tag

Code: [Select]
<script src="path to pdfmake.min.js"></script>
<script src="path to vfs_fonts.min.js"></script>

or with pq.getScripts utlility function:

Code: [Select]
            pq.getScripts(['path to pdfmake.min.js', 'path to vfs_fonts.min.js'], function () {
                grid.hideLoading();
                //finally download the pdf file.
                pdfMake.createPdf(dd).download();
            })

How have you assigned the path to pdfmake.min.js in your script?

Please share a jsfiddle if you need help to resolve the issue.
« Last Edit: December 18, 2023, 07:18:03 am by paramvir »