I work for a company that makes extensive use of iText, and we've managed to use it 'as is', so I've never had occasion to submit a bugfix. The only thing we've been unable to workaround is the fact that the underline is quite a bit below the baseline of the font. The iText library draws the underline at a distance of 1/3 the hight of the font below the baseline, (4 pts for a 12 pt font), but to our eye, simply putting it 1pt below the baseline regardles of font size looks much better. We've modified the function writeLineToContent from the class com.lowagie.text.pdf.PdfDocument to use a hardcoded 1 rather than the variable shift:
if (chunk.isAttribute(Chunk.UNDERLINE)) { float subtract = lastBaseFactor; if (nextChunk != null && nextChunk.isAttribute(Chunk.UNDERLINE)) subtract = 0; if (nextChunk == null) subtract += hangingCorrection; // graphics.moveTo(xMarker, yMarker - shift); graphics.moveTo(xMarker, yMarker - 1); // graphics.lineTo(xMarker + width - subtract, yMarker - shift); graphics.lineTo(xMarker + width - subtract, yMarker - 1); graphics.stroke(); }
This isn't a bug-fix, per se, but merely an aesthetic change. Aside from submitting this to the mailing list, is there anything we need to do before we can use the updated code in our project and still be within the terms of the license?
Thanks,
Matt