Hey guys,
I want to implement pdf preview and i have to name the pdf from api. How can I get a preview on Behalf of the name?
Hey guys,
I want to implement pdf preview and i have to name the pdf from api. How can I get a preview on Behalf of the name?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Naimish MakwanaPosted Feb 2, 2024, 5:06 AM
To implement a PDF preview in Angular, you can use the
pdf.jslibrary. Here’s a basic example of how you can do it:Assuming you have a function
getPdfUrl()that returns the URL of the PDF from your API, you can use the following code to fetch the PDF and display it:In this example, replace
'the-canvas'with the id of your canvas element. This code will fetch the PDF from the API, load it, and render the first page to a canvas element.Thanks
Tuhin PaulPosted Feb 3, 2024, 9:14 AM
I need more information about your setup and goals:
1. Programming Language and Framework:
2. API Details:
3. Naming Mechanism: