[QAE1032] PDF Generation: refactoring of conditions and use decorators