Answer the question
In order to leave comments, you need to log in
What is the pdf format please?
Contents of the pdf:
%PDF-1.4
%
5 0 obj
</DeviceRGB/Subtype/Image/Height 1/Filter/FlateDecode/Type/XObject/Width 1/Length 11/BitsPerComponent 8>>stream
x?
endstream
endobj
6 0 obj
</FlateDecode/Length 435>>stream ....
echo json_encode(["mm"=>"kkk","pdf"=>"содержимое pdf"],JSON_HEX_QUOT | JSON_HEX_TAG | JSON_HEX_QUOT | JSON_INVALID_UTF8_IGNORE | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_NUMERIC_CHECK);
Answer the question
In order to leave comments, you need to log in
https://medium.com/octopus-labs-london/downloading...
PDF content is encoded in base64, the user is given a link like
<a href="data:application/pdf;base64,[base64]" download="file.pdf">
- and the browser obediently opens the contents of this file on his computer or offers to save it. Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question