This is a migrated thread and some comments may be shown as answers.

PDF Export Issues

1 Answer 435 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Elliot
Top achievements
Rank 1
Elliot asked on 10 Dec 2015, 03:42 PM

I have a number of questions/problems with the PDF Export of the grid:

1. Is there a way to have the export not include the toolbar, group by column holder ("Drag column here...") and auto filter row?  When I export to excel these items are not included.
2. I have a margin set on the export however the grid only takes up 2/3rds of the document when set in landscape.  Is this a bug or is there a way to have it fill the space?  See attached file for example and the export settings below.
3. Pages are getting set to different widths for some reason?

Here are the settings I am using:

pdf: {
                allPages: true,
                author: "PowerVu",
                creator: "PowerVu",
                fileName: "Project Invoicing.pdf",
                landscape: true,
                margin: {
                    left: ".5in",
                    right: ".5in",
                    top: ".5in",
                    bottom: ".5in"
                }
            }

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 14 Dec 2015, 03:28 PM
Hi,

You may use the special .k-pdf-export class in a combination with other elements selectors to customize their appearance on exporting. For example, you may shrink/expand some columns or hide irrelevant ones. You may see how this class is used in the Customizing Page Layout help article. In the Export to PDF Grid demo, the header and pager are hidden to the export with the following rules:

/* Hide the Grid header and pager during export */
.k-pdf-export .k-grid-toolbar,
.k-pdf-export .k-pager-wrap
{
    display: none;
}

So you may use a similar approach to hide other Grid elements for the exported PDF.

In order to expand the Grid, you may set specific width to your columns while exporting through the .k-pdf-export class.


Regards,
Dimitar
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Elliot
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or