Webix Jet pdf export

Hi,
thank you for the great update!
I try to use the pdf-export with webix jet and it does not work.
Using regular javascript it works (i used a sample of you), but in combination with webix Jet, there is no error message and the pdf is not generated…

Any hints?
Thanks,
Martin

define([

], function () {





// var big film set is loaded...


    var ui = {
        margin:10,
        rows:[
            { view:"datatable", data:big_film_set, height:600, width:500, columns:[
                { id:"rank",	header:"", css:"rank", width:50},
                { id:"title",	header:"Film title",	fillspace:true },
                { id:"year",	header:"Year", width:80},
                { id:"votes",	header:"Votes",	width:100}
            ]},
            { margin:5, cols:[
                { view:"button", value:"Export all", autowidth:true, click:function(){
                    webix.toPDF($$("$datatable1"));
                }},
                { view:"button", value:"Export 'title' & 'rank' with custom file name", autowidth:true, click:function(){
                    webix.toPDF($$("$datatable1"), {
                        columns:{ rank:true, title:true },
                        filename:"datatable"
                    });
                }}
            ]}
        ]
    };


    return {
        $ui: ui,
        $oninit: function (view) {

        }


    };


});

Hi Martin,

we will fix this issue, but as a temporary solution you can include a lib file directly into the index.html of your jet application:

<script type='text/javascript' src='http://cdn.webix.com/extras/pdfjs.js'>
</script>

It’s a third-party library used by Webix for PDF export.

Thank you very much!

Using the temporary solution I have the following message in the console and no pdf…

“Uncaught Error: See almond README: incorrect module build, no module name”

For me it did the job nicely. But still forget about the temp solution, export is fixed now and should work out of the box.

Just clear the browser cache.

Hey, it is again not working…

Now I get the message:
Failed to load resource: the server responded with a status of 404 (Not Found)
(index):1 XMLHttpRequest cannot load http://cdn.webix.com/edge/fonts/PTS-webfont.ttf. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost’ is therefore not allowed access. The response had HTTP status code 404.

Hi, please check again, it should work now.

Thank you! It’s working again.

In the past versions of the pdf export the footer of a datatable was included in the export. Is there a way or option to include the footer again in the new version?
Thanks!

Unfortunately, in the current implementation footers are not exported. But we can include the option in one of the future updates.

Any news concerning the including of the footer in the pdf/excel export?

Thanks,
Martin

I’m having the same problem @martinfruemorgen reported on March, 3rd:

XMLHttpRequest cannot load http://cdn.webix.com/edge/fonts/PTS-webfont.ttf. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://tlksrv34’ is therefore not allowed access. The response had HTTP status code 404

I’m using Webix 3.2

I’m getting a 403 forbidden and a No ‘Access-Control-Allow-Origin’ message on http://cdn.webix.com/extras/pdfjs.js. Trying toPDF for the first time.

Hi @ofpires, @gregf,

Could you please check it again on Webix 3.3? Are these issues still remain?

@Listopad : It’s working on Webix 3.3 !!
Thank you

Hi,

there is a problem with webix 5.0 in combination with the old jet framework (0.5).
When exporting a datatable to excel, I see the error
“Uncaught Error: See almond README: incorrect module build, no module name”

This can be fixed by insertint
src=‘https://cdn.webix.com/extras/xlsx.core.styles.min.js’> in the script code
in index.html, but is most probably a bug.

Thanks,
Martin

Hi,

The online libs there updated. Please try to clear cache and run the same functionality again. Must work correctly now.