473,386 Members | 1,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

itextsharp pdf creation(unwanted empty pages)

shilpa george
Hi All,

I am trying to create a pdf using Itextsharp 3.1.3.0. [Platform is ASP.Net 2.0 +C#]. I have given a small portion of the code here.. In my code i am using 2 loops(one is inner loop) to create the pdf. I got the pdf with all the details and the overall look is gud but the problem is empty pages are created in between some records.. I was trying to add new line in my pdf.. I removed all Paragraphs and newline constant(\n)but still have that problem. I searched a solution for this but not getting any right answer. Could anyone please help me with this??


Expand|Select|Wrap|Line Numbers
  1. iTextSharp.text.Table headtable1 = new iTextSharp.text.Table(1, 1);
  2.                 float[] n ={ 100f };
  3.                 headtable1.Widths = n;
  4.                 headtable1.Cellpadding = 0;
  5.                 headtable1.Cellspacing = 0;
  6.                 headtable1.SpaceBetweenCells = 0;
  7.                 headtable1.Border = iTextSharp.text.Rectangle.NO_BORDER;                
  8.                 headtable1.SetAlignment("left");
  9.                 headtable1.AutoFillEmptyCells = true;
  10.  
  11.                 Phrase txtph1 = new Phrase();
  12.  
  13.                 txtph1 = new Phrase(lbl_meetname.Text + " ", FontFactory.GetFont(FontFactory.HELVETICA_BOLD, 13, iTextSharp.text.Font.NORMAL, iTextSharp.text.Color.BLACK));
  14.                 Cell headcell1 = new Cell(txtph1);
  15.                 headcell1.Border = iTextSharp.text.Rectangle.NO_BORDER;
  16.                 headcell1.SetHorizontalAlignment("left");
  17.                 headtable1.AddCell(headcell1, 1, 0);
  18.                 doc.Add(headtable1);
  19.  
Feb 20 '13 #1
0 1287

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: vijaya | last post by:
I want to create a web page programatically with controls like button,datagrid etc added to the web page from a windows application. Please suggest me some solution
5
by: Olaf Gschweng | last post by:
We're new into DB2 and have some problem with DB2 8.1 (?) on a Linux system. We load some big tables of a DB2 database from files every day. We do a "DELETE FROM table" for each table and then we...
1
by: Gerry | last post by:
Has anyone else experienced this problem? I am using iTextSharp to generate PDF documents from XML files. Here is the problem. When I run the app on my development machine, everything works...
0
by: michelle | last post by:
I am experimenting with dynamically creating pages containing custom controls in response to http requests caught by an http handler, in place of writing and requesting aspx files. Specifically, I...
1
by: Patrick Olurotimi Ige | last post by:
Has anybody used the itextsharp http://itextsharp.sourceforge.net to convert asp.net pages to PDF files? Any asp.net examples? *** Sent via Developersdex http://www.developersdex.com ***...
5
by: George | last post by:
Hi, Is it possible to delay session creation in ASP.NET I want the user to browse my site without any session created (no cookies set). My pages will know that is Session = null then Session has...
0
by: Will Arrowsmith | last post by:
Hi All, I am trying to create a .tiff file to fax using the windows fax service FAXCOMLib. I have created an array of images (bitmaps) and converted them to 1pbb format in order to allow...
0
by: Will Arrowsmith | last post by:
Hi All, I am aiming to create a multiframe Tiff file that I can fax using the windows fax service FAXCOMLib. I have created an array of Bitmaps (pages I want in my fax doc) and succesfully...
8
by: meendar | last post by:
what will a object of an Empty class( contain nothing), do on default.What are all the default methods it calls. what is the use of creating the object for an empty class?
3
by: ravitunk | last post by:
hi all....i have VS.net 2005 for framework 2.0 installed on my pc.....can i create web pages for framework 1.1 using VS.net 2005....????....if so how would i do that???.........and also is it...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.