private void printGrid(PDPageContentStream pcs, float offsetX , float offsetY,
						   int numRows, int numCols , float sizeBox ) throws IOException {
		float pageWidth = (float)paper.convertWidth(units)*UNIT_TO_POINTS;
		float pageHeight = (float)paper.convertHeight(units)*UNIT_TO_POINTS;

//		pcs.setLineCapStyle(1);
		pcs.setStrokingColor(0.75);

		for (int i = 0; i <= numCols; i++) {
			float x = offsetX + i*sizeBox;
			pcs.moveTo(x,0);
			pcs.lineTo(x,pageHeight);
		}
		for (int i = 0; i <= numRows; i++) {
			float y = offsetY + i*sizeBox;
			pcs.moveTo(0,y);
			pcs.lineTo(pageWidth,y);
		}
		pcs.closeAndStroke();
	}
private void printGrid ( PDPageContentStream pcs , float offsetX , float offsetY , int numRows , int numCols , float sizeBox ) throws IOException { float pageWidth = ( float ) paper . convertWidth ( units ) * UNIT_TO_POINTS ; float pageHeight = ( float ) paper . convertHeight ( units ) * UNIT_TO_POINTS ; pcs . setStrokingColor ( 0.75 ) ; for ( int i = 0 ; i <= numCols ; i ++ ) { float x = offsetX + i * sizeBox ; pcs . moveTo ( x , 0 ) ; pcs . lineTo ( x , pageHeight ) ; } for ( int i = 0 ; i <= numRows ; i ++ ) { float y = offsetY + i * sizeBox ; pcs . moveTo ( 0 , y ) ; pcs . lineTo ( pageWidth , y ) ; } pcs . closeAndStroke ( ) ; }
Draws the grid in light grey on the document