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

RadPageLayout output to PDF

5 Answers 115 Views
ClientExportManager
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 10 Oct 2017, 05:25 PM
Does exportPDF not work for rendering RadPageLayout contents?  A PDF is generated, but just of a solid white, blank section.  Maybe this is related to media settings or span values?

5 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 11 Oct 2017, 03:49 PM
Hi Alex,

The ClientExportManager tool does work with RadPageLayout component as you can see in the following video: https://www.screencast.com/t/qAuKfy2Ek.

I used as a base the RadWindow content page from this live demo: https://demos.telerik.com/aspnet-ajax/page-layout/overview/defaultcs.aspx.

You wrote that the problem could be a media query or some span values so can you please try to remove the CSS and other page content one by one until you find the reason for the problem?

Regards,
Rumen
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Alex
Top achievements
Rank 1
answered on 11 Oct 2017, 05:15 PM

Thank you form confirming that I can use the control with RadPageLayout.  I've found the cause for the blank page to be connected to RadFormDecorator.  Oddly, if I exclude the following controls, the render works just fine.  Possibly due to the contents of the layout?

<telerik:RadFormDecorator ID="FormDecorator1" runat="server" DecoratedControls="CheckBoxes,Buttons,CheckBoxes,RadioButtons,Scrollbars,TextBox,Textarea,Fieldset,Label,H4H5H6" Skin="Web20" ControlsToSkip="Select,Zone,GridFormDetailsViews"></telerik:RadFormDecorator>

 

Also there seems to be some odd rendering when I shrink the browser.  Are there options to control/force the render to be full screen?

0
Rumen
Telerik team
answered on 16 Oct 2017, 01:53 PM
Hi Alex,

My advice is to replace the select elements with RadDropdownList which has better integration with RadClientExportManager and not style the regular select elements with RadFormDecorator.

As to the odd rendering: can you please provide a video and reproduction steps? 
As to the full screen when exporting the content to PDF: 

My advice is to increase the width of the exported contents by applying the following class to their wrapper (paren) element(s):

.k-pdf-export <parent element selector>
{
    width: 850px;
}

For example if wrapper is a <div> tag with a class .wrapper import this class:


.k-pdf-export .wrapper
{
    width: 850px;
}

If there are multiple <p> tags, set

.k-pdf-export p
{
    width: 850px;
}

You can find more information about the special .k-pdf-export class in the following help article: Change the Exported Content before Export.

Regards,
Rumen
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Alex
Top achievements
Rank 1
answered on 16 Oct 2017, 07:49 PM

Both parts worked out great!  Changing the DropDownLists to RadDropDownLists resolved my issue with the RadDecorator causing issues with the PageLayout.  I was able to put my RadDecorator back to formatting all field types.  

 

Second, using the .k-pdf-export easily allowed me to update the scrolling section that was being cut off to be displayed across the screen (just changing the over-flow CSS value in my case).

 

Thank you so much for the help!

0
Rumen
Telerik team
answered on 17 Oct 2017, 11:05 AM
You are welcome, Alex. Keep the good work!

Best regards,
Rumen
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
ClientExportManager
Asked by
Alex
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Alex
Top achievements
Rank 1
Share this question
or