Copy link to clipboard
Copied
Using the Embed API.
I am trying to create a list of pdf showing only the first page thumbnails either as an image, or base 64 image
I don't see a way for Embed to generate a jpg or a base64 img of the first page.
Taking a look at the API, my guess it that i would need to create a new AdobeDC.View for each pdf document and show them on the page, and show it in Sized container, but how would i get the first page only. I feel this way could be too expensive for the client as we could have 20-30 pdfs at a time, generating thubmnails for diffeent pdf maybe something i would have to do outside the scopr of embed api?
Thanks.
Embed API does not support export to image. We do have an API that will render the PDF to an image but it does all the pages so you're be paying for pages that you don't use. However, there are some very basic but free libraries that will let you convert just one page to an image. Try Goolgeing for one of those that meets your needs.
Copy link to clipboard
Copied
Embed API does not support export to image. We do have an API that will render the PDF to an image but it does all the pages so you're be paying for pages that you don't use. However, there are some very basic but free libraries that will let you convert just one page to an image. Try Goolgeing for one of those that meets your needs.
Copy link to clipboard
Copied
Thanks, yes you are correct, many libraries like graphics magik,image magic, infact i been doing that for years quite effectivley, however they all require a server or a serverless function, and since the embed api is all on the client side, i was hoping there was a neat way to do this in the browser. pdf-js is one option by mozilla but its bloated at 400kb for the client to download is a bit too much.
thanks Joel.