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. Image for the cookie policy date

WordWrap with ParagraphIndent

I've tried to use Syncfusion PDF product and print text, but we want to print running text with different fonts. What is the best solution for this?

For now we print the first text (text1) and then uses the LastLineBounds in the PdfTextLayoutResult to get the width, we then print the second text (text2) with another font and use the ParagraphIndent in to start text2 where text1 ends. This works but we dont want to clip word in text2 if the word i to long in the indentend line, so we specify PdfWordWrapType.WordOnly, but if the word has to be clipped (because there is no space left), the whole text2 dissapears from page. If we specify PdfWordWrapType.Word it clips the first word and text2 is visible again.


3 Replies

GM Geetha M Syncfusion Team May 25, 2012 05:34 AM UTC

Hi Kim,

Thank you for your interest in Syncfusion products.

I am afraid that I am not able to reproduce the problem. I created a simple sample to test the word wrap and it works fine. I had placed the sample in the link below. Could you please modify this sample and send back to me?

Regards

Geetha



WordWrapTest_b3f418bb.zip


KI Kim June 4, 2012 01:17 PM UTC

Thanks for reply! I just changed the test-text to reproduce it, see the attachment



WordWrapTest2_dd8f62b.zip


GM Geetha M Syncfusion Team June 6, 2012 04:27 AM UTC

Hi Kim,

Thank you for the details.

I was able to see the problem with your sample. With current implementation, the PdfWordWrapType.WordOnly won't wrap the word going out of bounds and the process will be finished. As far as PdfWordWrapType.Word, the text will be wrapped by words and if a word is longer than the bounds, it will be wrapped by characters. However, could you please create a direct trac incident with details so that we will consider it as a feature request?

Regards

Geetha

Loader.
Live Chat Icon For mobile
Up arrow icon