The mailing-list you are using is being discontinued. Please use the 
proper channel for questions: http://itextpdf.com/support

On 10/8/2015 9:14 AM, avchavan wrote:
> Hi, I am creating a PDF using iText 5.5.6.
> I wanted to tag table, row and cell as a DIV.
> I have written the following code but only the table gets marked as a DIV
> and not the row and cell.
>
>                          PdfPTable table = new PdfPTable(2);
>                       table.setRunDirection(PdfAWriter.RUN_DIRECTION_LTR);
>                       table.setRole(PdfName.DIV);
>                       table.setWidthPercentage(80);
>                       table.setWidths(new float[] { 0.8f, 1.2f });
>                       table.setHorizontalAlignment(PdfPTable.ALIGN_LEFT);
>                       table.setSpacingBefore(10);
>                       table.setSpacingAfter(15);
>                       Paragraph p3 = new Paragraph("Name:", font12);
>                       Paragraph p4 = new Paragraph("FirstName LastName", 
> font12);
>                       Paragraph p5 = new Paragraph("DOB: ", font12);
>                       Paragraph p6 = new Paragraph("00-00-0000", font12);
>                          PdfPCell cellp3 = new PdfPCell(p3);
>                       cellp3.setBorder(0);
>                       PdfPCell cellp4 = new PdfPCell(p4);
>                       cellp4.setBorder(0);
>                       cellp3.setRole(PdfName.DIV);
>                       cellp4.setRole(PdfName.DIV);
>                       table.addCell(cellp3);
>                       table.addCell(cellp4);
>                       PdfPCell cellp5 = new PdfPCell(p5);
>                       cellp5.setBorder(0);
>                       PdfPCell cellp6 = new PdfPCell(p6);
>                       cellp6.setBorder(0);
>                       cellp5.setRole(PdfName.DIV);
>                       cellp6.setRole(PdfName.DIV);
>                       table.addCell(cellp5);
>                       table.addCell(cellp6);
>
> How to solve this?
>
>
>
> --
> View this message in context: 
> http://itext.2136553.n4.nabble.com/Marking-table-ro-and-cell-as-DIV-tp4660908.html
> Sent from the iText mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> 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


------------------------------------------------------------------------------
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
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

Reply via email to