RadPageLayout output to PDF

6 posts, 0 answers
  1. Alex
    Alex avatar
    48 posts
    Member since:
    Jun 2011

    Posted 10 Oct 2017 Link to this post

    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?
  2. Rumen
    Admin
    Rumen avatar
    13538 posts

    Posted 11 Oct 2017 Link to this post

    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.
  3. Alex
    Alex avatar
    48 posts
    Member since:
    Jun 2011

    Posted 11 Oct 2017 in reply to Rumen Link to this post

    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?

  4. Rumen
    Admin
    Rumen avatar
    13538 posts

    Posted 16 Oct 2017 Link to this post

    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.
  5. Alex
    Alex avatar
    48 posts
    Member since:
    Jun 2011

    Posted 16 Oct 2017 in reply to Rumen Link to this post

    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!

  6. Rumen
    Admin
    Rumen avatar
    13538 posts

    Posted 17 Oct 2017 Link to this post

    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.
Back to Top