Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function show_pdfAction($id)
- {
- $em = $this->getDoctrine()->getManager();
- $mypdf = $em->getRepository('AppBundle:Article')->find($id);
- $pdfFile = stream_get_contents($mypdf->getArtPdf()); //returns pdf file stored as mysql blob
- $response = new Response($pdfFile, 200, array('Content-Type' => 'application/pdf'));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement