handle the case where the window is narrow to put the username and password.
allow a pdf output of 100000 elements