AI generated this. Not even fitted properly to the selected size. There is an extreme amount of space left on the document. Please fix the code so when the size is selected, the document created fits the document perfectly.