ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: kiwon34 on August 01, 2019, 12:21:18 pm

Title: Export data as pdf.
Post by: kiwon34 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.
Title: Re: Export data as pdf.
Post by: paramvir 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.
Title: Re: Export data as pdf.
Post by: paramvir on July 06, 2023, 03:12:20 pm
Export to pdf is available in v9.0.0
Title: Re: Export data as pdf.
Post by: raulmuna 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
Title: Re: Export data as pdf.
Post by: paramvir 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.