Java
  Home arrow Java arrow Page 4 - Adding Columns With iTextSharp
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
JAVA

Adding Columns With iTextSharp
By: Peyton McCullough
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 5
    2008-06-24


    Table of Contents:
  • Adding Columns With iTextSharp
  • An example
  • Creating multiple columns
  • Manually adding columns

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Adding Columns With iTextSharp - Manually adding columns
    ( Page 4 of 4 )

    The AddRegularColumns method automatically sets up columns. However, there are some cases where more control is needed. In these cases, it's possible to manually add columns to a MultiColumnText object, and it's not very difficult to do, thankfully.

    Simple columns can be added using the AddSimpleColumn method. This method takes two arguments: the distance of the left side of the column from the left side of the page, and the distance of the right side of the column from the left side of the page. Using this method, it would be possible to create two unequal columns on a page:


    columns.AddSimpleColumn(72, 72 * 3);

    columns.AddSimpleColumn(72 * 4, 72 * 7.5f);


    In the example above, one column is created that is two inches wide, and another column is created that is three and a half inches wide. Once the columns are created, though, the basic behavior is the same. Text will automatically flow from one column to another on as many pages as needed.

    Now you should be familiar with the basics of column creation in iTextSharp. Try creating a few examples of your own with columns.



     
     
    >>> More Java Articles          >>> More By Peyton McCullough
     

       

    JAVA ARTICLES

    - Exception Handling Techniques in Java
    - More About Multithreading in Java
    - The Basics of Multiple Threads in Java
    - Data Access Using Spring Framework JDBC
    - New Object Initialization in Java
    - Adding Images With iTextSharp
    - Adding Columns With iTextSharp
    - Creating Simple PDF Files With iTextSharp
    - The Spring Framework: Understanding IoC
    - Introducing the Spring Framework
    - Java Classes
    - Completing the Syntactic Comparison of Java ...
    - Syntactic Comparison of Java and C/C++
    - Java Statements
    - Conditionals, Expressions and Other Java Ope...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek