Implemented the flow for view the pdf