I figured out the solution:
cb.AddTemplate(template1, pageSize.GetLeft(330), pageSize.GetTop(30));
cb.SetLineWidth(2);
cb.MoveTo(0, pageSize.Top - 34 );
cb.LineTo(pageSize.Width, pageSize.Top - 34);
cb.Stroke();
I should have had the stroke after Add.Template.
Hope this helps someone having the same issue.