Home > Back-end >  EDIT Download PDF file symfony
EDIT Download PDF file symfony

Time:08-17

I follow this documentation enter image description here

Don't forget you stored your PDF in a private folder. You can't get it with the asset function.

CodePudding user response:

First thanks to SuperBob and I found the solution: I modify services.yaml. like this:[![enter image description here][1]][1] I add a route to list all products :[![enter image description here][2]][2]
In my view I loop on products and I create a route to download the PDF file :[![enter image description here][3]][3] Before adding the route I modify Product entity like this : [![enter image description here][4]][4] And finaly I add my download route : [![enter image description here][5]][5]

I hope this solution can help someone ! [1]: https://i.stack.imgur.com/wXXm7.jpg [2]: https://i.stack.imgur.com/1g6ME.jpg [3]: https://i.stack.imgur.com/T9AQx.jpg [4]: https://i.stack.imgur.com/kVBPp.jpg [5]: https://i.stack.imgur.com/RR1Mu.jpg

  • Related