Updated specific locations to be searchable, take a look at Las Vegas as an example.

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

5
Help please with angular BLOB to downloadable PDF with NODEJS for backend
Post Flair (click to view more posts with a particular flair)
Post Body

Hey everyone, Angular and node's aren't my strong suits and I've had the misfortune of inheriting an angular 13 project where I'm tasked with implementing a minor JasperReport integration.

To put it brief, 3 different fields from the form are grouped into params that get sent to the backend NODEJS server, which sends it to JasperReports Rest_v2 API which then generates a report with them, however the trouble I'm having is taking return data BLOB and converting it to a PDF file that appears as a file download browser side.

My NODEJS method:

https://preview.redd.it/caswz3873qc91.png?width=1420&format=png&auto=webp&s=11a379e47c5809f406e48b717b9b3b56f9b2353c

This does return the BLOB that is the raw PDF file data e.g:

https://preview.redd.it/wwikk1gx3qc91.png?width=950&format=png&auto=webp&s=1d69e62eb7fa5efdb2158def57368f535d9fade6

However the problem I'm having now is taking said data and making it to a downloadable PDF file in angular side. Ive got these methods that I've hacked together from various google searches but none of them can produce a working PDF file.

There is an one of the methods I've attempted in my .ts file:

the console logger prints the raw BLOB to just confirm, but then with various methods I've tried I get type conversion errors or just blank PDF files, I can never receive the actual report.

https://preview.redd.it/w2xa1tig5qc91.png?width=1472&format=png&auto=webp&s=d866b4888dae4895465d5622c41956c083ccc0ec

Author
Account Strength
100%
Account Age
13 years
Verified Email
Yes
Verified Flair
No
Total Karma
52,155
Link Karma
8,802
Comment Karma
43,249
Profile updated: 5 days ago
Posts updated: 7 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
2 years ago