When you create a PGraphics, you have to specify explicitly all operations that must happen on this graphics:
pdf.strokeWeight(i);
pdf.stroke(10*i);
and so on.
pdf.strokeWeight(i);
pdf.stroke(10*i);
and so on.