Kendo.DawDom export pdf with page break doesn't work

0 Answers 315 Views
Grid
dominic
Top achievements
Rank 1
dominic asked on 15 Oct 2021, 12:27 PM

I am trying to export a <ul> element in pdf using the drawDom.drawing.pdf.saveAs(...) method (kendo.drawing.pdf.saveAs(grid, test.pdf"))) with the following parameters :

grid.options.set("pdf", {
                forcePageBreak: ".pageBreak",
                allPages: true,
                avoidLinks: true,
                multiPage: true,
                
                margin: {
                    left: "20mm",
                    right: "20mm",
                }
            });

But even with the class "pageBreak" being properly added to my elements it still doesn't work properly. My pdf page doesn't separate into different pages. And if I add a paperSize:"A4" for example, the pdf becomes blank.

 

Nikolay
Telerik team
commented on 20 Oct 2021, 06:35 AM

Hi Dominic,

For setting Grid's options you need to use the setOptions() method. Please update the shared with this method.

If this doesn't resolve the situation I will ask you to share the Grid declaration in a Dojo demo. Having this will help me fully understand the case and allow me to advise further. You can use the following as a starting point:

Regards,

Nikolay

 

No answers yet. Maybe you can help?

Tags
Grid
Asked by
dominic
Top achievements
Rank 1
Share this question
or