Export to PDF failure

hello, webix team!
I tried to use the webix.toPDF() to export my all data, but it just export the visible data of view. Both datatable and spreadsheet are not export the all data. Is this the bug? How can I fix it?

https://snippet.webix.com/9y2swobx
https://snippet.webix.com/3kgpfrpn

Hello,

For wide Datatable/Spreadsheet you can consider the following settings to accomodate all the data in the exported document:

webix.toPDF($$("ssheet"), {orientation:"landscape", autowidth:true });

https://snippet.webix.com/ngyz9zpf

Also, with Datatable it is possible to provide column sizes during export.

@Helga Thanks for your reply!
How to export only column A-G and row 1-4 with portrait orientation?

https://snippet.webix.com/ngyz9zpf

Hello @Karena ,

to export concrete cells you need to make some manipulations:

to export only column A-G

var columns = [];
        for(var i = 1; i<=7;i++)
        	columns.push({id:i});

>row 1-4

using filter as

filter:function(obj){
            return obj.id<5;
          }

Please check the sample: https://snippet.webix.com/kjglilpp

Just a small addition - with columns another technique is also possible: you can provide an object with not needed columns as an ignore setting: Code Snippet

@Nastja @Helga is it possible to filter the rows based on one of the column values instead of the id? For example in your snippet (https://snippet.webix.com/kjglilpp), if I wanted to only return countries that had more than 1,000 in April, I would hope to be able to do something like this:

      filter:function(obj){
        return obj.April > 1000;
      }

However, I can’t seem to get it to work:
https://snippet.webix.com/qznzgb5v

Hey @paco, when it comes to the spreadsheet specifically, it seems like you can only filter based on ids. You can still select the wanted columns via the columns config - https://snippet.webix.com/zns0jw1i, but something like iterating through the key/value pairs and trying to filter based on that won’t work: https://snippet.webix.com/tkwti4qd. This sort of filtering would work fine in a normal datatable though: https://snippet.webix.com/n2mgxook, since you actually have columns as object properties.