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.
Syncfusion Feedback

RTF text cutoff

Thread ID:

Created:

Updated:

Platform:

Replies:

56056 Feb 8,2007 08:23 PM UTC Feb 9,2007 08:54 AM UTC Windows Forms 1
loading
Tags: PDF
Administrator [Syncfusion]
Asked On February 8, 2007 08:23 PM UTC

I am tying to put RTF text into a PDF via IPDFGraphics.DrawRTFText(0,0,rtfString) but it gets sut off at the end of the page. There are numerous posts about this and in the ASP.NET section of PDF it was it would be fixed in 2-3 weeks back in 6/2006 - what happened? Has this been fixed?

Administrator [Syncfusion]
Replied On February 9, 2007 08:54 AM UTC

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




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

Warning Icon 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.Close Icon

;