:panda_face: Extracted methods from the middleware method render_as_pdf?.
Merge branch 'render_as_pdf_refactoring'