Thanks Eduard. That helps.
I had found a simple solution for the above use case - emebdding a table
with no borders into a table with single cell.
But , I had other customizations which could not be done by above solution
but can be easily done with the way you described :).

Regards,
Nishant


On Sun, Jul 27, 2014 at 3:40 PM, Eduard Drenth <eduarddre...@gmail.com>
wrote:

> You could use pdfptableevent.
>
> In my own iText based library I have this:
>
>
> http://www.vectorprint.nl/userContent/reporttarget/site/apidocs/com/vectorprint/report/itext/style/ZebraStripes.html
>
>
> https://java.net/projects/vectorprintreport/sources/subversion/content/trunk/src/main/java/com/vectorprint/report/itext/style/ZebraStripes.java?rev=596
>
> It has a method you can override, for example:
>
> protected void paintRow(int row, Rectangle rect, PdfContentByte[]
> canvases, boolean last, boolean first) {
>         if (last) {
>                 // set left, bottom, right border
>         } else if (first) {
>                 // set left, top, right border
>         } else {
>                 // set left, right border
>         }
>         canvases[PdfPTable.BACKGROUNDCANVAS].rectangle(rect);
> }
>
> suc6
>
> On 27-07-14 11:13, Nishant Bulchandani wrote:
> > Hi iText Users,
> >
> > I want to render tables which have a border outside them , but none
> inside.
> >
> > I know I can use PDFPCell.setBorder to disable borders of all cells
> > inside table , but I want a border outside the whole table as well. Any
> > way in iText to do so? I don't see any such method in the API.
> >
> > Adding to directContent might be possible, but it would create
> > complications when table stretches against pages..suggestions?
> >
> >
> > Regards,
> >
> > Nishant
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > Want fast and easy access to all the code in your enterprise? Index and
> > search up to 200,000 lines of code with a free copy of Black Duck
> > Code Sight - the same software that powers the world's largest code
> > search on Ohloh, the Black Duck Open Hub! Try it now.
> > http://p.sf.net/sfu/bds
> >
> >
> >
> > _______________________________________________
> > 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
> >
>
>
> ------------------------------------------------------------------------------
> Want fast and easy access to all the code in your enterprise? Index and
> search up to 200,000 lines of code with a free copy of Black Duck
> Code Sight - the same software that powers the world's largest code
> search on Ohloh, the Black Duck Open Hub! Try it now.
> http://p.sf.net/sfu/bds
> _______________________________________________
> 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
>
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
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