Please take a look at the Grid example. Let's write the loops that draw the grid:
PdfCanvas canvas = new PdfCanvas(pdfDoc.addNewPage()); for (float x = 0; x
Here we use
pageSize variable to learn the width and the height of the PDF file and just increment x and y with 72 user units (this means that the distance between the dots will be 1 inch).
Click this link if you want to see how to answer this question in iText 5.