I am looking for a way to print a PDF file in my laravel application. I have only found on the internet solutions to print the PDF in the web browser. Is there a package that allows me to view a PDF directly in a native Control webBrowser? Thanks in advance!
2
Answers
https://github.com/niklasravnsborg/laravel-pdf
This package allows you to use the "stream" function to return the pdf back to the browser without downloading it.
If you just need to output the pdf directly in the browser – and not referring to a pdf generation library – you can output the correct pdf headers and then print the file.
for example, see this code snippet: