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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SplitTextLines problem

Thread ID:





100111 Jul 5,2011 02:40 PM UTC Jul 6,2011 12:41 PM UTC ASP.NET Web Forms (Classic) 1
Tags: PDF
Asked On July 5, 2011 02:40 PM UTC

Hi all,

i have problem with SplitTextLines property,

here is the sample code i use:

Using htmlconverter As New HtmlConverter()
htmlconverter.AutoDetectPageBreak = True
htmlconverter.EnableHyperlinks = True
'Renders html from the string to image.
Dim mf As New PdfMetafile(TryCast(htmlconverter.FromString(sourceStr, HttpContext.Current.Server.MapPath("./export/") & fileName & ".html", ImageType.Metafile, CInt(Math.Truncate(width * 1.3)), -1, AspectRatio.KeepWidth), Metafile))
mf.Quality = 100

Dim format As New PdfMetafileLayoutFormat()
format.Break = PdfLayoutBreakType.FitPage
format.Layout = PdfLayoutType.Paginate
format.SplitTextLines = False
format.SplitImages = False

'Draws the image.
mf.Draw(page, New PointF(0, 0), format)
End Using

as you can see i am setting format.SplitTextLines = False but whenever i have a page break there can be a split in text on two pages

here is the sample HTML generated by the aspx:

3 *

the span element somethimes is split between pages

Geetha M [Syncfusion]
Replied On July 6, 2011 12:41 PM UTC

Hi Alek,

Thank you for your interest in Syncfusion products.

Page break and SplitText are two different functionalities. If you want to avoid moving to next page during page break, please set AutoDetectPageBreak to false.

htmlconverter.AutoDetectPageBreak = False

Please try this and let me know if you have any questions.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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