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

RadEditor A4 and Page Break

17 Answers 551 Views
Editor
This is a migrated thread and some comments may be shown as answers.
mesource
Top achievements
Rank 1
mesource asked on 25 Feb 2009, 02:08 PM
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.

17 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 03 Mar 2009, 06:20 PM
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.
0
Shaun
Top achievements
Rank 1
answered on 24 May 2009, 03:55 AM

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,

0
Rumen
Telerik team
answered on 26 May 2009, 10:26 AM
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.
0
Shaun
Top achievements
Rank 1
answered on 26 May 2009, 11:08 AM
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.
0
Eirik H
Top achievements
Rank 2
answered on 19 May 2010, 10:22 AM

@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.

0
Shaun
Top achievements
Rank 1
answered on 19 May 2010, 11:03 AM
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
0
Rumen
Telerik team
answered on 19 May 2010, 12:15 PM
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.
0
Eirik H
Top achievements
Rank 2
answered on 19 May 2010, 12:34 PM
@Rumen,

This works perfectly, thank you so much for implementing this!
0
Siddharth Macwan
Top achievements
Rank 1
answered on 04 Aug 2010, 05:19 PM
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
0
Rumen
Telerik team
answered on 05 Aug 2010, 12:12 PM
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
0
Siddharth Macwan
Top achievements
Rank 1
answered on 05 Aug 2010, 02:38 PM
Hi Rumen,

Thanks for your prompt response. It worked for me.

Many thanks...

Sid
0
taus
Top achievements
Rank 1
answered on 22 Jan 2014, 11:42 AM
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



0
Marin Bratanov
Telerik team
answered on 23 Jan 2014, 11:47 AM
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.
0
Alejandro Genovesi
Top achievements
Rank 2
answered on 22 Sep 2015, 02:33 PM

Please look: 

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

 
0
Stanimir
Telerik team
answered on 25 Sep 2015, 11:27 AM
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
0
kalpa
Top achievements
Rank 1
answered on 19 Oct 2017, 08:00 AM
I am trying to add  page break while generating to word and it is still not working for me. does this solution possible for word also??i need a reply as soon as possible. i used div tag for editor modes.
0
Rumen
Telerik team
answered on 19 Oct 2017, 01:02 PM
Hi,

The export to DOCX is performed using the Telerik RadWordsProcessing Library which offers page break functionality explained in this article Break.


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
Editor
Asked by
mesource
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Shaun
Top achievements
Rank 1
Eirik H
Top achievements
Rank 2
Siddharth Macwan
Top achievements
Rank 1
taus
Top achievements
Rank 1
Marin Bratanov
Telerik team
Alejandro Genovesi
Top achievements
Rank 2
Stanimir
Telerik team
kalpa
Top achievements
Rank 1
Share this question
or