jsPDF: pdf uploaded to s3, png image is distorted/corrupt
Hey I’m wondering if anyone has any ideas on this, it is probably not an issue of the library but thought you smart guys might have some ideas. Sorry in advance for polluting the issues 😦
I have generated my .png file using dataurl.net. When I add it to the pdf and use doc.save()
, it looks great and works perfectly. However, I am trying to upload it directly to s3, using doc.output()
instead, and when it gets there it looks like this: https://imgur.com/a/ZuOd0
I am using Angular FWIW and my code to PUT in to s3 looks like this:
const headers = new HttpHeaders().set('Content-Type', 'application/pdf');
this.http.put(url, file, {headers})
with file = doc.output()
Anyone have any ideas of what may cause this?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 18
I am travelling right now. I will definitely check it out when I have better internet