Skip to Content

Assign client side generated pdf to Fileuploader (jspdf)

Jul 11, 2017 at 08:00 AM


avatar image

Hi guys

I'm generating a pdf on the client side using jspdf. Now I have the file so there is no need for the "browse" feature, I just need to attach it to the fileuploader but I can't seem to find the property to set the actual file (to be uploaded to gateway).

My pdf file value looks like this: "%PDF-1.3 3 0 obj <</Type /Page /Parent 1 0 R....."

How do I attach it to file uploader?



10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Ram Burugu Jul 18, 2017 at 02:05 PM

Looks like jspdf api is returning with the blob of the pdf, try doing one of the below

1) Save the blob into a temporary file ( and continue with your process as there is a file now

2) Since you already have the file contents, submit this to the ODATA request to create the attachment, I dont think you will need a physical file on the client to perform this activity.

10 |10000 characters needed characters left characters exceeded