RadEditor A4 and Page Break

16 posts, 0 answers
  1. mesource
    mesource avatar
    1 posts
    Member since:
    Aug 2007

    Posted 25 Feb 2009 Link to this post

    I'm using RadEditor to create document that will be converted in PDF.

    How to set in RadEditor the page format size (e.g. A4) and how to set a page break ?

    Thanks.

    A.
  2. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 03 Mar 2009 Link to this post

    Hi Andrea,

    If I understand your scenario correctly, you need to precisely position HTML content in a web editor and later print it. Unfortunately, when dealing with a web environment, browsers have their limitations and it is hard to print HTML content exactly as you see it on the screen.

    In addition, you cannot automatically divide the content in the editor to different pages. Searching for <p> breaks gives the most natural break, but those breaks might occur on an undesired location. That is why the only reliable way to break the page is by manual inserting a page break style. The style='page-break-before: always' will tell the printer that this is the end of the current page and will print the subsequent content on a new page. You can found more information the this KB article: Implementing a Page-break Button.

    If you are able to find any other DHTML editor (not ActiveX or using another technology editor) that offers the requested features, please send us a link to it or its demos. This will help us a lot to implement them in our product.

    Best regards,
    Rumen
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Shaun
    Shaun avatar
    18 posts
    Member since:
    May 2008

    Posted 23 May 2009 Link to this post

    I want to force a page break in the pdf output and have been trying to do as this post and the KB article describes, using the style='page-break-before:always' - but it doesn't seem to work for me. Does this still work?

     

    Thanks,

  5. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 26 May 2009 Link to this post

    Hello Shaun,

    The inline style='page-break-before: always' css attribute works only for web pages but not for PDF documents. If you are using the built-in PDF export feature of RadEditor, please note that currently there is no way to force a page break in the produced PDF file.

    Kind regards,
    Rumen
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Shaun
    Shaun avatar
    18 posts
    Member since:
    May 2008

    Posted 26 May 2009 Link to this post

    Thanks for your reply, for your info, I ended up using a third party HTML to RTF converter which works perfectly. Perhaps you could consider building something similar into the package in the future, as if you want to use the RadEditor for mail-merging - page breaks are a necessity and PDF is pretty limited.. but it's still great control otherwise, and thanks again.
  7. Eirik H
    Eirik H avatar
    36 posts
    Member since:
    Mar 2010

    Posted 19 May 2010 Link to this post

    @shaun, 

    In case you are following this thread, which html->rtf converter did you go for?

    I'm also looking to force page breaks in the exported PDF.

  8. Shaun
    Shaun avatar
    18 posts
    Member since:
    May 2008

    Posted 19 May 2010 Link to this post

    Hi Eirik - We ended up going with http://www.sautinsoft.com/products/html-to-rtf/index.php - let me know if you find a good free one though
  9. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 19 May 2010 Link to this post

    Hi guys,

    I have good news that we were able to implement the requested page break feature. The only requisite is to use at least Q3 2009 build of RadControls for ASP.NET AJAX .

    The solution is to put the following tag <?hard-pagebreak?> in the content on the server where you want to insert a page break. You can implement a custom page break button as in this example Implementing a Page-break Button and insert the following css page break in it:

    <p style='page-break-before:always;margin:0;padding:0'></p>

    After submitting the content replace the paragraph tag above with the following tag <?hard-pagebreak?> that will notify the PDF exporter to put the content after it on a new page.

    You can see how the solution works in the attached video here. A sample project can be downloaded from here.

    Note that the <?hard-pagebreak?> string is not a valid HTML tag and it is stripped by the Rich Text Editing engine of Firefox. For that reason we use <p style='page-break-before:always;margin:0;padding:0'></p> and replace it on the server with <?hard-pagebreak?>.

    Greetings,
    Rumen
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  10. Eirik H
    Eirik H avatar
    36 posts
    Member since:
    Mar 2010

    Posted 19 May 2010 Link to this post

    @Rumen,

    This works perfectly, thank you so much for implementing this!
  11. Siddharth Macwan
    Siddharth Macwan avatar
    11 posts
    Member since:
    Oct 2009

    Posted 04 Aug 2010 Link to this post

    Hi,

    We tried to implement your sample code for implementing the pagebreak in exported pdf however it doesnot work for us.

    The sample solution  you have provided is a VS 2005 solution. We are using VS2008 with  the Telerik.Web.UI.dll version 2010.1.519.35. Any Idea why we are not able to run your sample (A sample project can be downloaded from here.)

    I would really appreciate your help as we badly need to use this pagebreak feature.

    Thanks

    Sid
  12. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 05 Aug 2010 Link to this post

    Hi Sid,

    Please, find attached the required .NET 3.5 VS2008 project.

    Kind regards,
    Rumen
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  13. Siddharth Macwan
    Siddharth Macwan avatar
    11 posts
    Member since:
    Oct 2009

    Posted 05 Aug 2010 Link to this post

    Hi Rumen,

    Thanks for your prompt response. It worked for me.

    Many thanks...

    Sid
  14. taus
    taus avatar
    6 posts
    Member since:
    Feb 2011

    Posted 22 Jan 2014 Link to this post

    Code not available anymore...

    My requirement in asp.net visual studio 2010 is to create a report with multiple pages and page must also show page number at the bottom.

    I don't want to use crystal ssrs or anything else....

    I just want tool that can be like MS Word to simple type and format in multiple pages and at the end print the same page by page.

    I have a licensed version of Telerik Ultimate Product.

    Please help



  15. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 23 Jan 2014 Link to this post

    Hello Taus,

    Page count is not available in RadEditor, nor are there page breaks OOB. This is not a feature HTML has, which is why RadEditor does not have it. It is not a PDF generation/editing tool, but an HTML editor.
    Thus, what I can advise is examining the sample my colleague Rumen had attached to see how you can page content via a custom tool and string replacement. To get page numbers you can find other strings/symbols that you can add to create page count in PDF and add them just before the page break.


    Regards,
    Marin Bratanov
    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.
  16. Alejandro Genovesi
    Alejandro Genovesi avatar
    5 posts
    Member since:
    Jun 2012

    Posted 22 Sep 2015 in reply to Rumen Link to this post

    Please look: 

    http://www.textcontrol.com/en_US/sites/asp-dotnet-rich-text-box/?gclid=CLq0t7jrisgCFUwIkQodVCwMKw

     
  17. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 25 Sep 2015 Link to this post

    Hi,

    Currently RadEditor does not provided the required functionality. Detailed information on RadEditor export to PDF functionality can be found in the following help article: Export to PDF

    You can add a feature request in the public feedback portal of Telerik UI for ASP.NET AJAX: http://feedback.telerik.com/Project/108. You can include the link in it as well.

    Regards,
    Stanimir
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017