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

how to prevent item from splitting to 2 pages when exporting to PDF

5 Answers 259 Views
Grid
This is a migrated thread and some comments may be shown as answers.
ck
Top achievements
Rank 1
ck asked on 19 Sep 2013, 07:44 AM
HI,
using version 2013.2.717.40 with .NET4.0

I am exporting a RadGrid t PDF. How can i force an item to render its content on a single page. I do not want its content to split to 2 pages when it overflows.
does anyone know how to achieve this?

thanks

5 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 19 Sep 2013, 08:46 AM
Hi ,

If you want to set the contents into a single page,you can set the PageHeight property of the Pdf.PLease have a look at this documentation which describes about all the properties.
PDF Export

ASPX:
<ExportSettings>
   <Pdf PageHeight="1000px">
   </Pdf>
</ExportSettings>

Thanks,
Princy
0
ck
Top achievements
Rank 1
answered on 19 Sep 2013, 08:58 AM
Hello,
My item contents do not have fixed heights. All i am sure of is that the vertical space an item will occupy is less than the height of the page so even if i fix a height as you are proposing i would keep running into the same problem.
0
Kostadin
Telerik team
answered on 24 Sep 2013, 07:31 AM
Hello Chad,

I am afraid that RadGrid does not provides an option to fit the content of the grid in a single page. The only possible solution is to increase the height of the pdf file as Princy's suggestion based on the items in the grid. For instance if a single item has a height 5mm you could increase the size by item number*5. I prepared a small sample and attached it to this thread.

Regards,
Kostadin
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
ck
Top achievements
Rank 1
answered on 25 Sep 2013, 09:38 AM
I am afraid that will not solve my problem either.
I am experiencing with iTextSharp and i think i will go with that option. RadGrid's pdf export functionality is too limited for my needs.

thank you
0
Kostadin
Telerik team
answered on 27 Sep 2013, 01:44 PM
Hello Chad,

We are aware about this limitation, but implementation of such feature will lead to a breaking changes in the PDF export which are unacceptable. You could check out the following help article which describes most of the features which are available till now.

Regards,
Kostadin
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
ck
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
ck
Top achievements
Rank 1
Kostadin
Telerik team
Share this question
or