Rajput, Sunil (Cognizant) wrote:

Hi,

I m not able to check the exact size of the PDF file.

       Rectangle pageSize = new Rectangle(790,610);
       Document         document = new Document(new Rectangle(790,*610*));

Why define a Rectangle pageSize and then not use this object?

       document.open();

      StringBuffer sBuff1 = new StringBuffer("<HTML><body>");
...
      document.add(new Paragraph(sBuff1.toString());

This is some very odd code.
Is it your intention to show HTML in your PDF file?
If so, please ignore my remark.

      document.close();

now I want to know that , how many line can be inserted in the same page.

That would depend on the leading (space between the line) you have defined (explicitely or implicitely).

Is there any function that tells me that u have used this much page size and u r at some x location.

You are adding a Paragraph, so you could use a PageEvent and ask for the end position in the onEndParagraph event. There are other possibilities, but PageEvents are a good place to start:
http://itextdocs.lowagie.com/tutorial/directcontent/pageevents/

I have data that only contains text…. , I m using the PdfPTable for writing the Data in Tabular format.

This sentence is in contrast with the example above. There's too much information missing in your question to give you a useful answer.

Please read the tutorial first. It will save you a lot of time.
http://itextdocs.lowagie.com/tutorial/objects/tables/pdfptable

br,
Bruno


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to