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.

Long text (more pages)

Thread ID:

Created:

Updated:

Platform:

Replies:

120892 Oct 26,2015 02:11 AM Oct 28,2015 01:04 AM Xamarin.Forms 3
loading
Tags: PDF
Lorenzo Giudici
Asked On October 26, 2015 02:11 AM

I ve got a long text. How can I divide  my text In multiple pages in automatic? 

Praveenkumar H [Syncfusion]
Replied On October 27, 2015 01:46 AM

Hi Lorenzo,

You can draw long text using “PdfTextElement” class and you can automatically paginate the text to multiple pages, please refer the following code snippet.


PdfDocument doc = new PdfDocument();

PdfPage page = doc.Pages.Add();

PdfTextElement element = new PdfTextElement(longText);

PdfLayoutFormat format = new PdfLayoutFormat();

format.Layout = PdfLayoutType.Paginate;


element.Draw(page, 0, 0,format);

MemoryStream stream = new MemoryStream();


doc.Save(stream);

doc.Close(true);

Please let us know if you need further assistance.

With Regards,
Praveen


Lorenzo Giudici
Replied On October 27, 2015 12:37 PM

It works well! Thanks

KarthikeyanC [Syncfusion]
Replied On October 28, 2015 01:04 AM

Hi Lorenzo,
We are glad to know that your requirement has been fulfilled, please let us know if you need any further assistance.

Regards,
Karthikeyan.C

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.

;