-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to show PDF in browser instead of downloading? #1969
Comments
I had the same problem and i found a solution that may help you.
You have to open this pdf file generated in a new window. |
There is also this light JavaScript utility; PDFObject, just discovered when searching around similar solution; PDFObject - I know, I know... I'm late about a year, but better late than never, right? :) |
thank you so much, its really working |
this is not working for me, it opens a new window: Untitled, blank and does not render my pdf. pdf.save is working and my pdf downloads perfectly but I am not being able to open the pdf in new window. Can someone help me? Thanks |
For me too, the code is not working |
Use an iframe and set its source:
|
I tried, but did not work. Do u have any other solution? I am using React |
I use PDFObject to embed, works great - https://pdfobject.com/ Here is an example;
|
Estuve teniendo ese problema con jsPDF y esta fue la solucion mas sencilla que encontre, me funciono! |
use useState to store the output of jspdf like this setPdf1(doc.output('bloburi')) make the output as bloburi (tried blob and uristring also both didn't work only bloburi worked) |
does anyone have the solution for svelte? how to show preview of an image as pdf using jsPDF |
It worked like a charm |
I am using JSPDF 1.4.1
When I'm done generating the PDF, I'm calling:
UUID added to create unique file names.
Is there a way to display the file in the browser instead of saving it? I didn't see anything in the documentation about this.
The text was updated successfully, but these errors were encountered: