Eric Summkeller wrote: > I draw the border of a PdfPCell with the cellLayout() method of a > PdfPCellEvent. To draw the lines I use the setLineDash() method. My question > is which parameters should I use to draw a line with only dots?
That's a good question, and the answer is surprisingly easy (although I had to look it up myself while writing the iText book). First you need to set the line cap to LINE_CAP_ROUND: cb.setLineCap(PdfContentByte.LINE_CAP_ROUND); Then you have to use dashes that are 0 units long. cb.setLineDash(0, 10, 5); This will add dashes size 0 every 10 units with a phase 5. Because of the 'rounded caps' a dash with size 0 will look like a dot. See figure 12 in chapter 10 of the book: http://itext.ugent.be/itext-in-action/figures/png/10_12.png br, Bruno ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
