How to use URL.createObjectURL?

My goal is to have a form that sends a URL to an endpoint that returns a base64 PDF encoding that appears on the screen without a window.open.

Example output I want: https://s.natalian.org/2017-04-04/index.html Desired output, web page with embedded PDF

I am confused how to use the resulting objectURL to show the answer data: application / pdf; base64 .

From https://s.natalian.org/2017-04-04/ObjectURL.html I assume that I am not correctly decoding the base64 response? I don’t know how to make it display as PDF, as the output I want above.

+4
3

PDF? , - https://github.com/mozilla/pdf.js, , . URL-, URL- blob Blob .

+1

. , ...

0

: " Blob(), PDF", , base64.

, serverless : https://github.com/calvintychan/serverless-html-pdf/pull/2

0

Source: https://habr.com/ru/post/1671554/


All Articles