Hello,
I want to add a pdf table at a particular position and at the same time i
want my table to get splitted across multiple pages. Please provide me an
example.
my code below does not work
table = new PdfPTable(4);
table.addCell("Type");
table.addCell("Description");
table.addCell("Status");
table.addCell("Comments");
table.addCell("Advocacy");
table.addCell("Advocate is required");
table.addCell("Requested");
table.addCell("View");
table.addCell("Interpreter");
table.addCell("German");
table.addCell("Requested");
table.addCell("None");
table.addCell("Transport");
table.addCell("Ambulance required for transport");
table.addCell("Requested");
table.addCell("None");
table.addCell("Type");
table.addCell("Description");
table.addCell("Status");
table.addCell("Comments");
table.addCell("Advocacy");
table.addCell("Advocate is required");
table.addCell("Requested");
table.addCell("View");
table.addCell("Interpreter");
table.addCell("German");
table.addCell("Requested");
table.addCell("None");
table.addCell("Transport");
table.addCell("Ambulance required for transport");
table.addCell("Requested");
table.addCell("None");
table.addCell("Type");
table.addCell("Description");
table.addCell("Status");
table.addCell("Comments");
table.addCell("Advocacy");
table.addCell("Advocate is required");
table.addCell("Requested");
table.addCell("View");
table.addCell("Interpreter");
table.addCell("German");
table.addCell("Requested");
table.addCell("None");
table.addCell("Transport");
table.addCell("Ambulance required for transport");
table.addCell("Requested");
table.addCell("None");
table.addCell("Type");
table.addCell("Description");
table.addCell("Status");
table.addCell("Comments");
table.addCell("Advocacy");
table.addCell("Advocate is required");
table.addCell("Requested");
table.addCell("View");
table.addCell("Interpreter");
table.addCell("German");
table.addCell("Requested");
table.addCell("None");
table.addCell("Transport");
table.addCell("Ambulance required for transport");
table.addCell("Requested");
table.addCell("None");
table.addCell("Type");
table.addCell("Description");
table.addCell("Status");
table.addCell("Comments");
table.addCell("Advocacy");
table.addCell("Advocate is required");
table.addCell("Requested");
table.addCell("View");
table.addCell("Interpreter");
table.addCell("German");
table.addCell("Requested");
table.addCell("None");
table.addCell("Transport");
table.addCell("Ambulance required for transport");
table.addCell("Requested");
table.addCell("None");
table.addCell("Type");
table.addCell("Description");
table.addCell("Status");
table.addCell("Comments");
table.addCell("Advocacy");
table.addCell("Advocate is required");
table.addCell("Requested");
table.addCell("View");
table.addCell("Interpreter");
table.addCell("German");
table.addCell("Requested");
table.addCell("None");
table.addCell("Transport");
table.addCell("Ambulance required for transport");
table.addCell("Requested");
table.addCell("None");
table.setTotalWidth(450);
table.setSplitLate(true);
table.setSplitRows(true);
ColumnText ct = new ColumnText(cb);
ct.setSimpleColumn(document.left(), 0, document.right(),
document.top()
- y + 50);
ct.addElement(table);
int status = ct.go();
Stefano Guidetti wrote:
>
> I use this code to add a table in a document. All work well but:
>
>
>
> In a case 1 the width of the table is conform at the value.
>
> In a case 2 the margin of the table is near 50 and is not possible ti
> reduce
> .
>
>
>
> Decause the 2 tables don't have the same width ???
>
>
>
>
>
> Dim My_Document As New Document(PageSize.A4, 0, 0, 140, 25)
>
>
>
> My_Document.Open()
>
>
>
> ' Case 1
>
>
>
> My_Table_Header.TotalWidth = My_Document.Right - My_Document.Left
>
> My_Table_Header.WriteSelectedRows(0, -1, My_Document.Left,
> My_Document.PageSize.Height - 20, My_ContentByte_Header)
>
>
>
> ' Case 2
>
>
>
> My_Document.Add(My_Table_Body)
>
>
>
> My_Document.Close()
>
>
>
>
> ------------------------------------------------------------------------------
> Got Input? Slashdot Needs You.
> Take our quick survey online. Come on, we don't ask for help often.
> Plus, you'll get a chance to win $100 to spend on ThinkGeek.
> http://p.sf.net/sfu/slashdot-survey
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> iText(R) is a registered trademark of 1T3XT BVBA.
> Many questions posted to this list can (and will) be answered with a
> reference to the iText book: http://www.itextpdf.com/book/
> Please check the keywords list before you ask for examples:
> http://itextpdf.com/themes/keywords.php
>
--
View this message in context:
http://itext-general.2136553.n4.nabble.com/inser-a-pdftable-in-a-document-tp3701920p3718483.html
Sent from the iText - General mailing list archive at Nabble.com.
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts.
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php