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

write content in 2 columns structure

Thread ID:





106851 Jan 29,2013 06:04 AM UTC Jul 12,2019 12:58 PM UTC ASP.NET MVC (Classic) 3
Tags: PDF
David Treves
Asked On January 29, 2013 06:04 AM UTC


Not sure how this can be done. But maybe there's an easy way..

My PDF pages have a 2 columns layout. Imagine this like an article in a newspaper, where you write the text in the left column till it runs out of space and then you continue in the right one.

I imagine this can be achieved using a 2 columns table with a single row that spans across the entire page's height. But that will cause issues, since I need to somehow calculate when I ran out of space on the left and then to break the content and continue on the right column.

Is there a simpler way? Maybe some setting that lets me set the width of those columns and then the text just continues on the right column when needed?

I hope that makes sense..


Geetha M [Syncfusion]
Replied On February 4, 2013 04:41 AM UTC

Hi David,

Thank you for your interest in Syncfusion products.

It is possible to write the data in two columns using the PdfTextElement class and it page layout events. Here is the code snippet:

PdfTextElement element = new PdfTextElement(inputText);

element.BeginPageLayout += new BeginPageLayoutEventHandler(element_BeginPageLayout);

element.EndPageLayout += new EndPageLayoutEventHandler(element_EndPageLayout);

element.Font = new PdfStandardFont(PdfFontFamily.Helvetica, 8f);

static void element_EndPageLayout(object sender, EndPageLayoutEventArgs e)


    samePage = !samePage;

    if (samePage)

        e.NextPage = tempPage;



static void element_BeginPageLayout(object sender, BeginPageLayoutEventArgs e)


    tempPage = e.Page;

    if (samePage)


        SizeF size = e.Page.Graphics.ClientSize;

        e.Bounds = new RectangleF(new PointF(size.Width / 2 + 10, 0), new SizeF(size.Width / 2 - 10, size.Height));




The simple sample showing this is placed in the link below.

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




Matej Grabnar
Replied On July 11, 2019 10:22 AM UTC


the link to sample zip file is not working.

Regards, Matej.

Sowmiya Loganathan [Syncfusion]
Replied On July 12, 2019 12:58 PM UTC

Hi Matej, 

We have created the sample to achieve the requirement for “Write content in two column structure”. Please find the sample for the same from below link, 

Please try the sample in your end and let us know if it solves the issue. 

Sowmiya L 


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