phpsymfonysymfony4knp-snappy

how to open the generated pdf in new tab on symfony 4


on my Symfony 4 app, i have a botton that used to generate pdf from html using knp snappy bundle but the generated pdf get displayed in the same page , so i'm looking for a way to open the generated pdf on new tab, is there a way to accomplish that ?
Thank you in advance .


Solution

  • can you post the code?

    however you should add the target="_blank" where the pdf is opened like this:

    <a target="_blank" href="http://your_url.html">Link to the route that generates the pdf</a>