Answer the question
In order to leave comments, you need to log in
Displaying pdf coming from the server?
Good afternoon, the task is to display a pdf document for printing.
The user selects the data in the window, presses the button, and the data goes from us to the server, if the request is successful, in response we receive a generated pdf file, but not a link, but the content itself
How to display this mess as a pdf file on a new page?
Answer the question
In order to leave comments, you need to log in
specify in the server response headers that it is a PDF,
header('Content-Type: application/pdf');
header('Content-Disposition: inline; filename="'.$name.'"');
use this mozilla.github.io/pdf.js/examples/index.html#inter... .
"PORRIDGE" is not a problem.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question