I am drawing pdf images using the iText Java framework. I need to draw lines of the specified width. There is a method setLineWidth(float width)in the class PdfContentBytethat should change it. However, no matter what value I pass as my parameter, the lines drawn are always redundant.
In javadoc from setLineWidththere is the following line:
The line width determines the thickness of the line used to move along the path, and is measured in units of user space.
I do not know what a "space unit" is. Everything else in iText seems to be measured at a point (about 1/72 of an inch). I cannot find a link to what "space units" are and how to change them.
the code:
to.setLineWidth(thickness);
to.moveTo(x, y);
to.lineTo(x + 100, y + 100);
The variable tocontains an instance PdfContentByte.
source
share