We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Multi Page RTF (unkown length) into PDF

Thread ID:

Created:

Updated:

Platform:

Replies:

43422 Apr 23,2006 06:44 PM Feb 9,2007 03:57 AM ASP.NET Web Forms (Classic) 3
loading
Tags: PDF
Lee Diggins
Asked On April 23, 2006 06:44 PM

Hi Currently building a report approx 17 pages. I say approximately as some of the content is supplied using RTF with miltple pages. I''ve tried importing the RTF using a mix of your MultiLine text sample and your import RTF samples, but, I just can''t get it to work correctly, I keep getting only one page of the RTF document into the PDF. Can you supply an example of multi page RTF (unkown length)into PDF for me please? Regards, Lee .NET 2.0

Ajish [Syncfusion]
Replied On April 24, 2006 03:50 AM

Hi Lee, Sorry for the inconvenience. Currently there is a bug in DrawRTFText()method and it will be able to import only one page into the PDF document. However it has been internally fixed to import multipage RTF text into PDF document and it will be available in the next release, which is planned in two to three weeks time frame. Thanks, Ajish.

Administrator [Syncfusion]
Replied On February 8, 2007 03:18 PM

I am still having this problem. How were you able to resolve this issue?

Administrator [Syncfusion]
Replied On February 9, 2007 03:57 AM

Hi Jason,

This can be done by setting the BreakBehavior of the GraphicState object to AutoBreakBehavior.Cropping and passing this object to the DrawRTFText method as an argument.

props.BreakBehavior =AutoBreakBehavior.Cropping

//Draw RTF text at the specified Location.
pdfDoc.LastPage.Graphics.DrawRTFText(New PointF(10,50), rtf,props)

The way that RTF support is implemented is by rendering rich text to a vector image using the richtextbox control internally and then the vector image gets rendered into the PDF document. The BreakBehavior setting to the graphicstate object is for making the multipage image span across several pages.


Please take a look into the attached sample and let me know if you have any queries.

Thanks for your interest in Syncfusion products.

Best Regards,
Bhuvaneswari


RTFToPDF0.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;