How to Solve NameError: name 'A4' is not defined -- reportlab
Solution: Import the 'A4' module
To Solve the error, add the following line to the top of your code.
from reportlab.lib.pagesizes import A4
For more information:
Python reportlab A4